Test name | Executions per second |
---|---|
a32 | 102.1 Ops/sec |
34234 | 102.3 Ops/sec |
let a = [];
const n1 = 1;
const s1 = '1';
for (let i = 0; i < 100000; i++) {
a.push(n1);
a.push(s1);
}
for (const c of a) {
const d = typeof c === 'number' ? c : Number(c);
}
let a2 = [];
const n12 = 1;
const s12 = '1';
for (let i = 0; i < 100000; i++) {
a2.push(n12);
a2.push(s12);
}
for (const c of a2) {
const d = Number(c);
}