Number vs. plus vs. parseInt vs. parseFloat (v3)

Revision 3 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Number
Number(num);
ready
+
+num;
ready
parseInt
parseInt(num, 10);
ready
parseFloat
parseFloat(num);
ready

Revisions

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