Double Tilde vs. ParseInt (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script>
  var i = 1.62873,
      j;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Double Tilde
j = ~~i;
ready
ParseInt
j = parseInt(i);
ready
Shift left
j = i << 0;
ready
or ZERO
j = i | 0;
ready
right shift 0
j = i >>> 0;
ready
parseInt base10
j = parseInt(i,10);
ready

Revisions

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