Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
2 months ago
Test name Executions per second
floor 4297779.5 Ops/sec
~~ 7378248.5 Ops/sec
>> 0 7413612.0 Ops/sec
| 0 7423468.0 Ops/sec
<< 0 7341826.5 Ops/sec
& 0xFFFFFFFFFFFF 7513393.0 Ops/sec
^ 0x000000000000 7477200.0 Ops/sec
Math.trunc() 4361188.5 Ops/sec
x - (x % 1) 5179508.5 Ops/sec
parseInt() 4251789.5 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;