test parseInt() and Math.floor() (v17)

Revision 17 of this benchmark created by auffret on


Setup

const num = 5.123456;

Test runner

Ready to run.

Testing in
TestOps/sec
parseInt()
const numFloor = parseInt(num);
ready
Math.trunc
const numFloor = Math.trunc(num);
ready
bit
const numBit = num << 0;
ready
Math.floor
const numFloor = Math.floor(num);
ready
ref
const ref = num;
ready
Math.round
const numRound = Math.round(num);
ready
Math.ceil
const numCeil = Math.ceil(num);
ready

Revisions

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

  • Revision 1: published by Dave on
  • Revision 2: published on
  • Revision 3: published by Arkadiusz Sygulski on
  • Revision 4: published by Arkadiusz Sygulski on
  • Revision 5: published by Rafał Matysiak on
  • Revision 6: published by Kuba on
  • Revision 8: published by Rafał Matysiak on
  • Revision 9: published by Rafał Matysiak on
  • Revision 10: published by Arkadiusz Sygulski on
  • Revision 12: published by Slim GAIGI on
  • Revision 13: published by Slim GAIGI on
  • Revision 14: published by auffret on
  • Revision 15: published by auffret on
  • Revision 16: published by auffret on
  • Revision 17: published by auffret on
  • Revision 20: published by Yurij Krot on
  • Revision 21: published by Yurij Krot on