Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Mobile Results:
Chrome 7 runs
Round
98.4M/s
bitwise invert2
96.5M/s
floor
92.5M/s
trunc
89.0M/s
bitwise or
87.1M/s
parseInt
77.4M/s

Fastest: Round (1.3x faster)

View exact numbers
  • Round: 98,431,208 ops/sec
  • bitwise invert2: 96,546,168 ops/sec
  • floor: 92,459,952 ops/sec
  • trunc: 89,027,120 ops/sec
  • bitwise or: 87,146,768 ops/sec
  • parseInt: 77,441,456 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    trunc
    floor
    parseInt
    bitwise invert2
    bitwise or
    Round

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
floor
528.7M/s
parseInt
510.8M/s
bitwise invert2
508.5M/s
bitwise or
496.6M/s
trunc
476.7M/s
Round
475.3M/s
View exact numbers
Test name Executions per second
floor 528,718,944 Ops/sec
parseInt 510,750,848 Ops/sec
bitwise invert2 508,538,688 Ops/sec
bitwise or 496,610,592 Ops/sec
trunc 476,706,592 Ops/sec
Round 475,278,464 Ops/sec