Math.trunc vs parseInt

Benchmark created by samanthaming on


Setup

const number = 80.1;

Test runner

Ready to run.

Testing in
TestOps/sec
Math.trunc()
Math.trunc(number);
ready
parseInt()
parseInt(number);
ready

Revisions

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

  • Revision 1: published by samanthaming on