by throwaway4good · 5y ago · 0 comments
https://github.com/LesnyRumcajs/grpc_bench/blob/master/kotli...
https://github.com/LesnyRumcajs/grpc_bench/blob/master/java_...
Looking at the build files, different versions of the libraries appears to be used. The Java implementation is configurable but defaults to something called "direct executor".
Maybe that explains the difference.
In my case, I have a programming language interpreter implemented in Kotlin, and as an experiment I made the entire interpreter using suspending calls so that I could call asynchronous functions, and my performance tests dropped by about 20%.
Irreducible loops make many optimizations much more complex. Bytecode generated by javac never contains irreducible loops, and since bytecode generated by javac is the number 1 use case targeted by JVM JIT compilers, they probably just don't bother trying to be that smart about irreducibility.