Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
Firefox 117
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
floor 243453568.0 Ops/sec
~~ 241933888.0 Ops/sec
>> 0 230574464.0 Ops/sec
| 0 232278928.0 Ops/sec
<< 0 240890656.0 Ops/sec
& 0xFFFFFFFFFFFF 243408320.0 Ops/sec
^ 0x000000000000 240528144.0 Ops/sec
Math.trunc() 242432880.0 Ops/sec
x - (x % 1) 378090848.0 Ops/sec
parseInt() 220628320.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;