Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Linux
Desktop
8 days ago
Test name Executions per second
floor 1701177.6 Ops/sec
~~ 2644406.5 Ops/sec
>> 0 3719248.5 Ops/sec
| 0 3816882.2 Ops/sec
<< 0 3787638.8 Ops/sec
& 0xFFFFFFFFFFFF 3835080.5 Ops/sec
^ 0x000000000000 3861572.2 Ops/sec
Math.trunc() 2719616.0 Ops/sec
x - (x % 1) 2636114.0 Ops/sec
parseInt() 1933302.9 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;