How does a programming joke cause me physical pain?
I mean, it’s basically O(1), right? :p
I mean, it does scale with the size of the input. Just not with the count of inputs, but rather the size of each input element.
Or just the size of the largest input?
Oh yeah, I do think setTimeout executes in parallel, so only the largest element determines the execution time. It was difficult enough to make that sentence make sense, so I didn't want to cram that detail in as well. 🙃
O(shit)
If it is stupid and it works it’s not stupid.
I’m going to use it
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:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 6 years ago
MODERATORS