Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36
Chrome Mobile 123
Android
Mobile
7 months ago
Test name Executions per second
floor 5098867.0 Ops/sec
~~ 9217525.0 Ops/sec
>> 0 9172824.0 Ops/sec
| 0 9186089.0 Ops/sec
<< 0 9233901.0 Ops/sec
& 0xFFFFFFFFFFFF 9470656.0 Ops/sec
^ 0x000000000000 9375147.0 Ops/sec
Math.trunc() 5323144.5 Ops/sec
x - (x % 1) 5374706.5 Ops/sec
parseInt() 5274609.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;