Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
absolute
(version: 0)
Comparing performance of:
Math vs custom
Created:
4 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var a1 = 148423134.4; var a2 = -462841; var a3 = 0; var customAbs= function(input){ return (input + (input >> 31)) ^ (input >> 31); }
Tests:
Math
Math.abs(a1); Math.abs(a2); Math.abs(a3);
custom
customAbs(a1); customAbs(a2); customAbs(a3);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Math
custom
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Round Numbers to 2 digits
toFixed vs toPrecision vs Math.round() vs Math.floorfast vs MDN round_to_precision
Decimal rounding
Decimal Rounding - Exponential notation vs Number.EPSILON vs Double rounding vs Double rounding v2
Formatting number, including NaN
Comments
Confirm delete:
Do you really want to delete benchmark?