Which Runs Faster?

let array = [];
for(let i = 0; i < 1000; i++) {
    array[i] = i;
}

for(let i = 10000; i < 11000; i++) {
    array[i] = i;
}

let sum = 0;
for(let i = 0; i < 1000; i++) {
    sum += array[i];
}

for(let i = 10000; i < 11000; i++) {
    sum += array[i];
}
let array = [];
for(let i = 0; i < 2000; i++) {
    array[i] = i;
}

for(let i = 0; i < 2000; i++) {
    sum += array[i];
}
https://jsbench.me/2gku4daywx/2

20 / 24