Script Preparation code:
AخA
 
const data = Array.from({length: 1_000_000}, () => [
    Math.random(),
    Math.random(),
    Math.random(),
]);
Tests:
  • Array Destructuring

    x
     
    let sum1 = 0;
    for (let i = 0; i < data.length; i++) {
        const [a, b, c] = data[i];
        sum1 += a + b + c;
    }
  • Index Access

     
    let sum2 = 0;
    for (let i = 0; i < data.length; i++) {
        const arr = data[i];
        sum2 += arr[0] + arr[1] + arr[2];
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array Destructuring
    Index Access

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137 on Windows
View result in a separate tab
Test name Executions per second
Array Destructuring 146.2 Ops/sec
Index Access 226.1 Ops/sec