this post was submitted on 22 Feb 2026
312 points (98.8% liked)
Programmer Humor
41092 readers
492 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
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
We could probably improve on that significantly without losing speed.
That should yield one additional correct answer, while also confusing anyone who thinks it just returns false.
And if we just hard coded and checked the first 20 or so primes before always returning false, we would probably get noticeable improvement (depending on the total range).