Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36
Chrome Mobile 114
Android
Mobile
one year ago
Test name Executions per second
floor 3390769.2 Ops/sec
~~ 6419146.0 Ops/sec
>> 0 6252973.5 Ops/sec
| 0 6189161.5 Ops/sec
<< 0 6151708.5 Ops/sec
& 0xFFFFFFFFFFFF 6181150.0 Ops/sec
^ 0x000000000000 6271963.0 Ops/sec
Math.trunc() 3167124.2 Ops/sec
x - (x % 1) 3679289.2 Ops/sec
parseInt() 3124131.2 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;