85
timeoutSort (lemmy.ml)
you are viewing a single comment's thread
view the rest of the comments
[-] Vinapocalypse@lemmy.ml 3 points 1 month ago* (last edited 1 month ago)

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

this post was submitted on 04 Nov 2025
85 points (100.0% liked)

Programmer Humor

39390 readers
233 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS