Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Linux
Desktop
17 days ago
Test name Executions per second
floor 3727765.8 Ops/sec
~~ 6451349.5 Ops/sec
>> 0 6374034.5 Ops/sec
| 0 6438461.5 Ops/sec
<< 0 6390762.5 Ops/sec
& 0xFFFFFFFFFFFF 6431832.5 Ops/sec
^ 0x000000000000 6482842.0 Ops/sec
Math.trunc() 3745353.5 Ops/sec
x - (x % 1) 4288765.5 Ops/sec
parseInt() 3717662.5 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;