Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Mobile Safari/537.36
Chrome Mobile 118
Android
Mobile
one year ago
Test name Executions per second
floor 3135710.5 Ops/sec
~~ 4279621.0 Ops/sec
>> 0 4376562.5 Ops/sec
| 0 5197518.0 Ops/sec
<< 0 5754418.5 Ops/sec
& 0xFFFFFFFFFFFF 5902016.5 Ops/sec
^ 0x000000000000 5883702.0 Ops/sec
Math.trunc() 3142538.2 Ops/sec
x - (x % 1) 3449136.8 Ops/sec
parseInt() 3178646.8 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;