4 ms·
Yes, although quite interestingly C suffered from the same lack of steady state reaching as the Java code due to something in Malloc (see part 1). As well as su
by jerven 8y ago
Yes, although quite interestingly C suffered from the same lack of steady state reaching as the Java code due to something in Malloc (see part 1). As well as suffering from optimizations in a compiler actually making existing code slower (of course in C/C++ new, valid, optimizations also have the side effect of breaking code :( UB values are called poison in LLVM IR for a reason...)
Problem with JIT based languages is that they tend to inhibit the optimizations that developers can make. Mostly because these days the largest benefit for performance is well organized memory access, which is inhibited in the widely used JITs. (e.g. pointer chasing happy java/python/js/ruby) code)
On the other hand JITs can really run with simple optimizations because they can assume (virtual calls assumed to have a single target are run as if they are static calls).
In the end neither of this matters for most developers as things are "fast enough" i.e. See Ruby on MRI, R, or CPython today.