Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36
Chrome Mobile 117
Android
Mobile
one year ago
Test name Executions per second
floor 1064852.4 Ops/sec
~~ 2120439.5 Ops/sec
>> 0 2061039.8 Ops/sec
| 0 2072943.6 Ops/sec
<< 0 2135977.5 Ops/sec
& 0xFFFFFFFFFFFF 2127670.5 Ops/sec
^ 0x000000000000 2144368.8 Ops/sec
Math.trunc() 1085048.0 Ops/sec
x - (x % 1) 1303480.2 Ops/sec
parseInt() 1099417.9 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;