Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Firefox 116
Linux
Desktop
one year ago
Test name Executions per second
floor 221425408.0 Ops/sec
~~ 215684448.0 Ops/sec
>> 0 216763008.0 Ops/sec
| 0 216643840.0 Ops/sec
<< 0 215641168.0 Ops/sec
& 0xFFFFFFFFFFFF 215902336.0 Ops/sec
^ 0x000000000000 215818288.0 Ops/sec
Math.trunc() 216814176.0 Ops/sec
x - (x % 1) 894278528.0 Ops/sec
parseInt() 216838976.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;