3 ms·
In many C/C++ optimizing compiler, this is replaced with `counter = 1000;`. I have no idea how java handle this.. Does the AOT compiler do any optimization? Wo
by j16sdiz 4y ago
In many C/C++ optimizing compiler, this is replaced with `counter = 1000;`.
I have no idea how java handle this.. Does the AOT compiler do any optimization? Would this defer to the JIT?
- thfuran 4y agoThere is aot native compilation in javaland these days, but I assume you mean javac, the compiler that transforms source into jvm bytecode. It defers pretty much all optimization to the JITs and won't remove empty loops.
- pwagland 4y agoNo, but in this case, the JIT will get rid of this empty loop.