parseInt px (v5)

Revision 5 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
parseInt with radix parameter
var x = parseInt("10px", 10);
ready
parseInt without radix parameter
var x = parseInt("10px");
ready
bitwise operator
var x = "10px" | 0;
ready
slice
var x = Number("10px".slice(0, -2));
ready

Revisions

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