Script Preparation code:
Tests:
  • someFloat.toFixed(2);

  • Math.round(someFloat * 100) / 100;

  • ((someFloat * 100) | 0 ) / 100;

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    someFloat.toFixed(2);
    Math.round(someFloat * 100) / 100;
    ((someFloat * 100) | 0 ) / 100;

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Linux; Android 12; SM-N975F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36
Chrome Mobile 112 on Android
View result in a separate tab
Test name Executions per second
someFloat.toFixed(2); 4289698.5 Ops/sec
Math.round(someFloat * 100) / 100; 3824472.5 Ops/sec
((someFloat * 100) | 0 ) / 100; 11622679.0 Ops/sec