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
3 months ago
Test name Executions per second
floor 2610010.8 Ops/sec
~~ 4238797.0 Ops/sec
>> 0 4462728.5 Ops/sec
| 0 4258227.5 Ops/sec
<< 0 5096668.5 Ops/sec
& 0xFFFFFFFFFFFF 4790326.5 Ops/sec
^ 0x000000000000 4859302.0 Ops/sec
Math.trunc() 2850172.8 Ops/sec
x - (x % 1) 3189104.2 Ops/sec
parseInt() 2704950.5 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;