Number vs. plus vs. parseInt vs. parseFloat vs. /1 vs. *1 vs. 0+ vs. 1* (v33)

Revision 33 of this benchmark created by Joshua Wise on


Preparation HTML

<script>
  var num = '56.430000000000000';
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Number
Number(num);
ready
+
+(num);
ready
parseFloat
parseFloat(num);
ready
divide by 1
(num) / 1;
ready
multiply by 1
(num) * 1;
ready
1*
1 * (num);
ready

Revisions

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