Run details:
Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/110.0 Firefox/110.0
Firefox Mobile 110
Android
Mobile
one year ago
Test name Executions per second
floor 408601888.0 Ops/sec
~~ 412952992.0 Ops/sec
>> 0 413730016.0 Ops/sec
| 0 412173696.0 Ops/sec
<< 0 413731232.0 Ops/sec
& 0xFFFFFFFFFFFF 413935200.0 Ops/sec
^ 0x000000000000 413200320.0 Ops/sec
Math.trunc() 420895552.0 Ops/sec
x - (x % 1) 453529984.0 Ops/sec
parseInt() 14147679.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()