Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36
Chrome Mobile 113
Android
Mobile
one year ago
Test name Executions per second
floor 2059481.2 Ops/sec
~~ 4078355.0 Ops/sec
>> 0 3728166.0 Ops/sec
| 0 3737465.0 Ops/sec
<< 0 3908738.5 Ops/sec
& 0xFFFFFFFFFFFF 3809644.0 Ops/sec
^ 0x000000000000 3841619.8 Ops/sec
Math.trunc() 2078004.9 Ops/sec
x - (x % 1) 2312900.8 Ops/sec
parseInt() 2258015.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;