Double Tilde vs. ParseInt (v10)

Revision 10 of this benchmark created on


Setup

var i = '1561565', j;

Test runner

Ready to run.

Testing in WebKit 537.36 / undefined
TestOps/sec
Double Tilde
j = ~~i;
ready
ParseInt
j = parseInt(i, 10);
ready
parseInt with ~~
j = ~~parseInt(i, 10);
ready
parseInt without radix
j = parseInt(i);
ready
bitwise OR
j = i | 0;
ready

Revisions

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