Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 GLS/100.10.9939.100
Chrome 125
Windows
Desktop
18 days ago
Test name Executions per second
floor 191777152.0 Ops/sec
~~ 184234880.0 Ops/sec
>> 0 182086688.0 Ops/sec
| 0 194576960.0 Ops/sec
<< 0 189374000.0 Ops/sec
& 0xFFFFFFFFFFFF 180409984.0 Ops/sec
^ 0x000000000000 190283776.0 Ops/sec
Math.trunc() 186082240.0 Ops/sec
x - (x % 1) 829210368.0 Ops/sec
parseInt() 193202960.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;