parseFloat vs. plus (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script>
  var i = '1.6', n;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
parseFloat
n = parseFloat(i)
ready
plus
n = +i;
ready
parseInt
n += parseInt(i)
ready
Number
n = Number(i)
ready
Multiply by 1
n = i*1
ready

Revisions

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