☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 days agotimeoutSortlemmy.mlimagemessage-square8fedilinkarrow-up195arrow-down11cross-posted to: programmer_humor@programming.dev
arrow-up194arrow-down1imagetimeoutSortlemmy.ml☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 days agomessage-square8fedilinkcross-posted to: programmer_humor@programming.dev
minus-squareVinapocalypse@lemmy.mllinkfedilinkarrow-up3·edit-210 hours agoPR: - setTimeout(() => console.log(item), item) + setTimeout(() => console.log(item), Math.log(item)) Comment: This will speed up sort time greatly. However, sort order may become erratic for longer lists, and lists with numbers less than 1
PR:
- setTimeout(() => console.log(item), item) + setTimeout(() => console.log(item), Math.log(item))Comment: This will speed up sort time greatly. However, sort order may become erratic for longer lists, and lists with numbers less than 1