5 ms·
> statically compiled languages I don’t think it’s relevant here, the JIT compiler can do the same optimizations here. If the branch predictor can basically 1
by kaba0 3y ago
> statically compiled languages
I don’t think it’s relevant here, the JIT compiler can do the same optimizations here.
If the branch predictor can basically 100% guess correctly (which will be the case in any correct program), it should not have any additional cost, besides taking up place in i$, so I would assume that that is responsible for the difference.
- iscoelho 3y ago> I don’t think it’s relevant here, the JIT compiler can do the same optimizations here. Correct. I was clarifying that the issue can be replicated in a "simpler" statically compiled benchmark. > If the branch predictor can basically 100% guess correctly (which will be the case in any correct program), it should not have any additional cost That isn't true. The CPU branch predictor has a cost no-matter what. Of course, it's a complicated story: https://blog.cloudflare.com/branch-predictor https://blog.cloudflare.com/branch-predictor
- kaba0 3y agoThanks! I definitely have to do some readup on that!