Tests:
  • 1

    x
     
    let array = [10, 0, 0, 20, 1, 0, 12, 2, 0];
    for(let i = 0, l = array.length; i < l; i += 3) {
        console.log(array[i], array[i + 1], array[i + 2]);
    }
  • 2

     
    let array = [{id:10, x:0, y:0}, {id:20, x:1, y:0}, {id:12, x:2, y:0}];
    for(let i = 0, l = array.length, current = null; i < l; ++i) {
        current = array[i];
        console.log(current.id, current.x, current.y);
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    1
    2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50
Safari 10 on Mac OS X 10.11.6
View result in a separate tab
Test name Executions per second
1 163495.3 Ops/sec
2 166454.9 Ops/sec