Run details:
Mozilla/5.0 (Linux; Android 13; Pixel 6) 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 2775816.5 Ops/sec
~~ 5197100.0 Ops/sec
>> 0 5149278.5 Ops/sec
| 0 5161635.5 Ops/sec
<< 0 5130472.5 Ops/sec
& 0xFFFFFFFFFFFF 5113333.0 Ops/sec
^ 0x000000000000 5135065.0 Ops/sec
Math.trunc() 2698601.0 Ops/sec
x - (x % 1) 3075964.5 Ops/sec
parseInt() 2696282.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;