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

Revision 2 of this benchmark created on


Setup

var num = 5.7;

Test runner

Ready to run.

Testing in
TestOps/sec
parseInt()
var numFloor = parseInt(num);
ready
Math.floor
var numFloor = Math.trunc(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