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 1316854.4 Ops/sec
~~ 2427006.0 Ops/sec
>> 0 2434901.2 Ops/sec
| 0 2448258.0 Ops/sec
<< 0 2433108.0 Ops/sec
& 0xFFFFFFFFFFFF 2428388.2 Ops/sec
^ 0x000000000000 2450700.2 Ops/sec
Math.trunc() 1321349.1 Ops/sec
x - (x % 1) 1437167.9 Ops/sec
parseInt() 1339902.2 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()