String2integer: Number vs parseInt vs unary (v2)

Revision 2 of this benchmark created by kay 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

Revisions

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