perf testing, idk

materials
Valerie 2021-06-26 14:01:11 -04:00
parent 8a9f6096ee
commit 3554aef803
1 changed files with 15 additions and 0 deletions

15
perf.js 100644
View File

@ -0,0 +1,15 @@
console.clear();
const n = 10 ** 8;
// const map = new Map();
console.log('sequential insertion');
for(let run = 0; run < 10; run ++) {
const arr = [];
console.time('array');
for(let i = 0; i < n; i ++) {
arr.push(133769420)
}
console.timeEnd('array')
}