3 ms·
Not familiar with .NET, but I've done this for Java. There is nothing magical about the JIT, you can let it warm up, suspend the process and look at the compil
by PhilipRoman 3y ago
Not familiar with .NET, but I've done this for Java.
There is nothing magical about the JIT, you can let it warm up, suspend the process and look at the compiled code with a debugger (prepare to be disappointed though). When working with primitive arrays, its not very different from C. Lack of value types / reinterpreting memory is a big problem for Java, but not so much for C# IIRC. Fingers crossed for project Valhalla :)
The only thing that is kind of opaque is the GC, you need to learn the basics of how the algorithm works. There are some surprising relevations, like time of GC being proportional to surviving objects, not dead ones. Not to mention the new generation of GCs which use all kinds of tricks inside their read/write barriers to trade a little bit of throughput for low latency.
- doikor 3y ago> Not familiar with .NET, but I've done this for Java. Java only has intrinsics for core jdk APIs and some auto-vectorization (which in my experience are between very hard to impossible to use reliably). A proper Vector API is in the works but that is waiting for Valhalla (value objects). https://openjdk.org/jeps/460 https://openjdk.org/jeps/460
- pjmlp 3y agoOne advantage of having multiple implementations, is that there is Java the language (like ISO C), and then there are the JVM implementations (like GCC). Azul and OpenJ9 have intrisics for object layout, ART has intrisics for faster JNI, microJ has intrisics for SNI (a simpler JNI alternative), and so on.