Run details:
Mozilla/5.0 (Android 10; Mobile; rv:93.0) Gecko/93.0 Firefox/93.0
Firefox Mobile 93
Android
Mobile
3 years ago
Test name Executions per second
floor 418285120.0 Ops/sec
~~ 376213184.0 Ops/sec
>> 0 380154752.0 Ops/sec
| 0 378896032.0 Ops/sec
<< 0 379718080.0 Ops/sec
& 0xFFFFFFFFFFFF 379675008.0 Ops/sec
^ 0x000000000000 379825952.0 Ops/sec
Math.trunc() 419277248.0 Ops/sec
x - (x % 1) 468392928.0 Ops/sec
parseInt() 26705840.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;