Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Windows
Desktop
10 months ago
Test name Executions per second
floor 279684032.0 Ops/sec
~~ 279473824.0 Ops/sec
>> 0 279530272.0 Ops/sec
| 0 277850656.0 Ops/sec
<< 0 279012704.0 Ops/sec
& 0xFFFFFFFFFFFF 279004576.0 Ops/sec
^ 0x000000000000 279915136.0 Ops/sec
Math.trunc() 279232096.0 Ops/sec
x - (x % 1) 588832256.0 Ops/sec
parseInt() 280115136.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;