Script Preparation code:
x
 
var v1 = 12345678.12345;
var v2 = 23456789.01234;
var arr = [v2, v1]
Tests:
  • sort

     
    var a = arr.sort((a,b) => a - b).pop();
  • max

     
    var a = Math.max(...arr)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    sort
    max

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103 on Windows
View result in a separate tab
Test name Executions per second
sort 9338019.0 Ops/sec
max 3624611.0 Ops/sec