3 ms·
Not the op your responding too, but If this bit of of code is gonna run many billions of time it could very well be worth that cost.
by anfilt 5y ago
Not the op your responding too, but If this bit of of code is gonna run many billions of time it could very well be worth that cost.
- foota 5y agoIn a lot of cases you're working with code where you're storing divisors as a part of a data structure, so a JIT isn't really going to help with that.
- olliej 5y agoThere are plenty of times when you’re processing data where you load what is a runtime constant value but not a compile time constant. I mean the extreme case is obviously a scripting language , where lowering to multiplication may well be possible. That said you are correct in a JIT being vastly more heavyweight than most cases would need - but mostly due to the cost of making an indirect call rather than the cost of the jit itself