Script Preparation code:
AخA
 
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>

Previous results

Experimental features:

  • Test case name Result
    Math.abs access
    abs function
    compare

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
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
Chrome 132 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Math.abs access 153945616.0 Ops/sec
abs function 0.0 Ops/sec
compare 111615520.0 Ops/sec