Math.abs(Math.round)) on each cycle vs memo

Benchmark created on


Setup

const memoValue = Math.abs(Math.round(0.0249999 * 1000) / 1000);

Test runner

Ready to run.

Testing in
TestOps/sec
Math on every cycle
const value = Math.abs(Math.round(0.0249999 * 1000) / 1000);

return value > 0.025;
ready
memoed
return memoValue > 0.025;
ready

Revisions

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