Intify

Benchmark created on


Setup

function withParseInt(o) {
      return parseInt(o)
    }
    
    function withNegateTwice(o) {
      return ~~o
    }

Test runner

Ready to run.

Testing in
TestOps/sec
With NegateTwice
for (var i = 0; i < 1000; i++) withNegateTwice(i + 0.29802);
ready
With parseInt
for (var i = 0; i < 1000; i++) withParseInt(i + 0.29802);
ready

Revisions

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