Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36
Chrome Mobile 123
Android
Mobile
7 months ago
Test name Executions per second
floor 412115.1 Ops/sec
~~ 791416.3 Ops/sec
>> 0 799817.9 Ops/sec
| 0 776021.1 Ops/sec
<< 0 799907.0 Ops/sec
& 0xFFFFFFFFFFFF 805900.8 Ops/sec
^ 0x000000000000 805298.6 Ops/sec
Math.trunc() 421166.2 Ops/sec
x - (x % 1) 483622.5 Ops/sec
parseInt() 426409.1 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;