Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Mac OS X 10.15.7
Desktop
10 days ago
Test name Executions per second
floor 5644090.5 Ops/sec
~~ 8023775.0 Ops/sec
>> 0 8008183.0 Ops/sec
| 0 8009496.5 Ops/sec
<< 0 8006017.5 Ops/sec
& 0xFFFFFFFFFFFF 8025707.0 Ops/sec
^ 0x000000000000 8017843.0 Ops/sec
Math.trunc() 5645136.0 Ops/sec
x - (x % 1) 4819172.5 Ops/sec
parseInt() 5674027.5 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;