var dst = Array.from({ length: 1000 * 1000 })
var src = Array.from({ length: 1000 * 1000 })
Array.prototype.pushAll = function (items) {
let index = this.length
for (const item of items) this[index++] = item
this.length = index
return this
}
Array.prototype.pushArrayOneSrc = function pushArray(other) {
let c = 0;
for (let i = 0; i < other.length; i++) {
this.push(other[i]);
c++;
}
return c;
};
Array.prototype.pushArrayOneSrcNoCount = function pushArray(other) {
for (let i = 0; i < other.length; i++) {
this.push(other[i]);
}
};
Array.prototype.pushArrayOneSrcNoCountForOf = function pushArray(other) {
for (const e of other) {
this.push(e);
}
};
Array.prototype.pushArray = function pushArray(...otherList) {
let c = 0;
for (let a = 0; a < otherList.length; a++) {
const other = otherList[a];
for (let i = 0; i < other.length; i++) {
this.push(other[i]);
c++;
}
}
return c;
};