Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    floor
    ~~
    >> 0
    | 0
    << 0
    & 0xFFFFFFFFFFFF
    ^ 0x000000000000
    Math.trunc()
    x - (x % 1)
    parseInt()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: yesterday)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36
Chrome Mobile 130 on Android
View result in a separate tab
Test name Executions per second
floor 4055907.5 Ops/sec
~~ 5658052.0 Ops/sec
>> 0 5565977.5 Ops/sec
| 0 5528512.0 Ops/sec
<< 0 5524293.0 Ops/sec
& 0xFFFFFFFFFFFF 5366570.5 Ops/sec
^ 0x000000000000 5007286.0 Ops/sec
Math.trunc() 3160662.8 Ops/sec
x - (x % 1) 2532486.5 Ops/sec
parseInt() 2728165.8 Ops/sec


;