Script Preparation code:
Tests:
  • trunc

  • round

  • floor

  • parseFloat to int

  • ~~

  • |0

  • parseInt

  • parseInt, 10

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    trunc
    round
    floor
    parseFloat to int
    ~~
    |0
    parseInt
    parseInt, 10

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 11 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Firefox 123 on Windows
View result in a separate tab
Test name Executions per second
trunc 3857105.2 Ops/sec
round 3845987.2 Ops/sec
floor 3858572.5 Ops/sec
parseFloat to int 11734.7 Ops/sec
~~ 3888677.5 Ops/sec
|0 3912829.8 Ops/sec
parseInt 3732859.0 Ops/sec
parseInt, 10 3873018.2 Ops/sec