String2integer: Number vs parseInt vs unary (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script>
  var n = "0" + Math.floor(Math.random() * 10000).toString(8);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
unary
+n
ready
Number
Number(n)
ready
parseInt
parseInt(n, 10)
ready
minus zero
n - 0
ready

Revisions

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