parseFloat.toFixed vs Math.round variable

Benchmark created by Georgi Mihaylov on


Test runner

Ready to run.

Testing in
TestOps/sec
test1
var test = '5.25';
parseFloat(test).toFixed(0);
ready
test2
var test = '5.25';
Math.round(test);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Georgi Mihaylov on