Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Linux
Desktop
24 days ago
Test name Executions per second
floor 4068259.0 Ops/sec
~~ 7372621.5 Ops/sec
>> 0 7093881.5 Ops/sec
| 0 7276175.0 Ops/sec
<< 0 7275616.0 Ops/sec
& 0xFFFFFFFFFFFF 7249734.5 Ops/sec
^ 0x000000000000 7268872.0 Ops/sec
Math.trunc() 4175718.5 Ops/sec
x - (x % 1) 4839508.5 Ops/sec
parseInt() 4187963.2 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;