function performanceTestDouble(arrayLength) { let uTime = Engine.GetMicroseconds(); let testArray1 = []; for (let i = 0; i < arrayLength; ++i) { testArray1[i] = new Uint16Array(arrayLength); for (let j = 0; j < arrayLength; ++j) testArray1[i][j] = randIntInclusive(0, 10); } let testArray2 = []; for (let i = 0; i < arrayLength; ++i) { testArray2[i] = new Uint16Array(arrayLength); for (let j = 0; j < arrayLength; ++j) testArray2[i][j] = randIntInclusive(0, 10); } let vTime = Engine.GetMicroseconds(); warn("Double array creation took " + (vTime - uTime)); } function performanceTestSingle(arrayLength) { let uTime = Engine.GetMicroseconds(); let testArray1 = []; for (let i = 0; i < arrayLength; ++i) { testArray1[i] = new Array(arrayLength); for (let j = 0; j < arrayLength; ++j) testArray1[i][j] = {"a":randIntInclusive(0, 10), "b":randIntInclusive(0, 10)}; } let vTime = Engine.GetMicroseconds(); warn("Single array creation took " + (vTime - uTime)); }