How to make scala or java jvm remove branching if condition is same in runtime?
For example I have expression like this
Why more threads than logical cores leads to greater performance on this CPU bound work
I’m a bit puzzled by this one, as I was expecting (just goes to show how surprising performance can be!) the results with 20 threads and 100 threads to be very similar, and if anything the 20 to be marginally faster (due to reduced context switching).