Math.ceil vs. bitwise (v2)

Revision 2 of this benchmark created on


Description

...and some extra logic to handle ints. ::sigh::

Preparation HTML

<script>
  // am I insane?
  var n = Math.random() * (Math.random() + '').substr(2);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Math.ceil
var f = Math.ceil(n);
ready
<<
var f = parseInt(n) + 1
ready

Revisions

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