2 ms·
Can anyone explain to me why this is a lot faster than j.toString() or String(j) for (let i = 0; i < 20; i++) { for (let j = 0; j < 1000000; j++) {
by tuananh 6y ago
Can anyone explain to me why this is a lot faster than j.toString() or String(j)
for (let i = 0; i < 20; i++) {
for (let j = 0; j < 1000000; j++) {
`${j}`
}
}
I got
Executed in 177.12 millis fish external
usr time 159.12 millis 91.00 micros 159.03 millis
sys time 17.96 millis 443.00 micros 17.52 millis