Number() vs parseInt() vs plus (v61)

Revision 61 of this benchmark created on


Setup

var x = String(Math.random() * 100000);

Test runner

Ready to run.

Testing in
TestOps/sec
Number Constructor
Number(x);
ready
parseInt
parseInt(x, 10);
ready
floor
Math.floor(x);
ready
~~
~~x
ready

Revisions

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