Script Preparation code:
Tests:
  • Simple rounding

  • Rounding with epsilon and string conversion

  • Rounding with "if" statement

  • Rounding by toLocaleString

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Simple rounding
    Rounding with epsilon and string conversion
    Rounding with "if" statement
    Rounding by toLocaleString

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Android 4.4.2; Tablet; rv:68.0) Gecko/68.0 Firefox/68.0
Android 4 on Android 4.4.2
View result in a separate tab
Test name Executions per second
Simple rounding 10991604.0 Ops/sec
Rounding with epsilon and string conversion 184544.5 Ops/sec
Rounding with "if" statement 5203109.5 Ops/sec
Rounding by toLocaleString 954.4 Ops/sec