Math.floor vs Math.round vs parseInt (v141)

Revision 141 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Math.floor
Math.floor(89.938 / 293.3);
Math.floor(83784 / 9289.2);
Math.floor(7 / 60);
ready
Math.round
Math.round(89.938 / 293.3);
Math.round(83784 / 9289.2);
Math.round(7 / 60);
ready
parseInt
parseInt(89.938 / 293.3);
parseInt(83784 / 9289.2);
parseInt(7 / 60);
ready
parseInt Base
parseInt(89.938 / 293.3, 10);
parseInt(83784 / 9289.2, 10);
parseInt(7 / 60, 10);
ready
bitwise OR
(89.938 / 293.3) | 0;
(83784 / 9289.2) | 0;
(7 / 60) | 0;
ready
bitwise OR asm.js
"use asm";
(89.938 / 293.3) | 0;
(83784 / 9289.2) | 0;
(7 / 60) | 0;
ready

Revisions

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