Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Linux
Desktop
6 months ago
Test name Executions per second
floor 4526756.5 Ops/sec
~~ 7980905.0 Ops/sec
>> 0 8003312.5 Ops/sec
| 0 8115380.5 Ops/sec
<< 0 7949837.0 Ops/sec
& 0xFFFFFFFFFFFF 8032524.5 Ops/sec
^ 0x000000000000 8006851.0 Ops/sec
Math.trunc() 4450178.0 Ops/sec
x - (x % 1) 4462020.0 Ops/sec
parseInt() 4486364.5 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()