Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Math.sign speed
(version: 0)
Comparing performance of:
Math.abs access vs abs function vs compare
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var x = -200000 var abs = Math.sign
Tests:
Math.abs access
Math.sign(x)
abs function
sign(x)
compare
x < 0 ? -1 : x > 0 ? 1 : 0
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Math.abs access
abs function
compare
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser/OS:
Chrome 132 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Math.abs access
153945616.0 Ops/sec
abs function
0.0 Ops/sec
compare
111615520.0 Ops/sec
Related benchmarks:
Math.abs speed
math.abs vs branchless absolute val 2
Negate Number
Math.abs speed vs multiply
Comments
Confirm delete:
Do you really want to delete benchmark?