Script Preparation code:
Tests:

Historical Performance Data aggregated from 14 community runs

Desktop Results:
Chrome 14 runs
Bitwise invert2
48.7M/s
Floor
36.3M/s
Trunc
34.3M/s
ParseInt
31.5M/s

Fastest: Bitwise invert2 (1.5x faster)

View exact numbers
  • Bitwise invert2: 48,685,432 ops/sec
  • Floor: 36,312,848 ops/sec
  • Trunc: 34,255,964 ops/sec
  • ParseInt: 31,540,396 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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Windows
View result in a separate tab
Bitwise invert2
132.3M/s
Trunc
122.2M/s
Floor
116.9M/s
ParseInt
95.3M/s
View exact numbers
Test name Executions per second
Bitwise invert2 132,347,064 Ops/sec
Trunc 122,237,208 Ops/sec
Floor 116,850,576 Ops/sec
ParseInt 95,307,352 Ops/sec