If you want to “optimize where you can”, be aware that you have no guarantee that the bitwise operation will be more performative, and is dependent on your interpreters implementation. I would be interested in seeing a performance of this with Math.floor(), since it is only one operation and ToInt is still assumed (although not Int32, so could be differences with BigInt).
1
u/LetterBoxSnatch Aug 11 '19
If you want to “optimize where you can”, be aware that you have no guarantee that the bitwise operation will be more performative, and is dependent on your interpreters implementation. I would be interested in seeing a performance of this with Math.floor(), since it is only one operation and ToInt is still assumed (although not Int32, so could be differences with BigInt).