Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36
Chrome Mobile 127
Android
Mobile
3 months ago
Test name Executions per second
floor 1327788.0 Ops/sec
~~ 2338727.0 Ops/sec
>> 0 2312803.0 Ops/sec
| 0 2313050.8 Ops/sec
<< 0 2327617.2 Ops/sec
& 0xFFFFFFFFFFFF 2333452.2 Ops/sec
^ 0x000000000000 2312168.8 Ops/sec
Math.trunc() 1318390.4 Ops/sec
x - (x % 1) 1407431.5 Ops/sec
parseInt() 1318123.8 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;