Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Firefox 124
Windows
Desktop
7 months ago
Test name Executions per second
floor 319818752.0 Ops/sec
~~ 319308320.0 Ops/sec
>> 0 319649696.0 Ops/sec
| 0 318205088.0 Ops/sec
<< 0 317900832.0 Ops/sec
& 0xFFFFFFFFFFFF 318023488.0 Ops/sec
^ 0x000000000000 318612960.0 Ops/sec
Math.trunc() 318927744.0 Ops/sec
x - (x % 1) 1960320256.0 Ops/sec
parseInt() 318821632.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;