Script Preparation code:
x
 
var sorted = new Array(200000);
var shuffled = new Array(200000);
class Vector { 
    constructor() {
      this.x = 0;
      this.y = 0;
      this.z = 0;
    }
}
for (let i=0; i<200000; i++) {
  const obj = { position: new Vector(), scale: new Vector(), rotation: new Vector() };
  sorted[i] = obj;
  shuffled[i] = obj;
}
for (let i=0; i<200000; i++) {
  const index = Math.floor(Math.random() * 200000);
  const temp = shuffled[i];
  shuffled[i] = shuffled[index];
  shuffled[index] = temp;
}
Tests:
  • Shuffled

     
    for (let i=0; i<200000; i++) {
        if (shuffled[i].position) {}
    }
  • Sorted

     
    for (let i=0; i<200000; i++) {
        if (sorted[i].position) {}
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Shuffled
    Sorted

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 16_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1
Mobile Safari 16 on iOS 16.7.2
View result in a separate tab
Test name Executions per second
Shuffled 15.7 Ops/sec
Sorted 31.3 Ops/sec