Run details:
Mozilla/5.0 (Linux; Android 11; M2007J20CG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
Chrome Mobile 111
Android
Mobile
one year ago
Test name Executions per second
floor 1173652.6 Ops/sec
~~ 2271137.5 Ops/sec
>> 0 2278801.8 Ops/sec
| 0 2292319.5 Ops/sec
<< 0 2300217.8 Ops/sec
& 0xFFFFFFFFFFFF 2287959.5 Ops/sec
^ 0x000000000000 2296025.8 Ops/sec
Math.trunc() 1171102.4 Ops/sec
x - (x % 1) 1426775.2 Ops/sec
parseInt() 1166702.9 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()