Rounding test (v4)

Revision 4 of this benchmark created by Disturbed on


Setup

var somenum = 10.864;
    var rounded = null;

Test runner

Ready to run.

Testing in
TestOps/sec
(0.5 + somenum) << 0;
rounded = (0.5 + somenum) << 0;
ready
(somenum + 0.5) << 0;
rounded = (somenum + 0.5) << 0;
ready

Revisions

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

  • Revision 1: published by Oliver Caldwell on
  • Revision 2: published by Oliver Caldwell on
  • Revision 3: published on
  • Revision 4: published by Disturbed on
  • Revision 6: published on