373
submitted 2 days ago* (last edited 2 days ago) by cypherpunks@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] 418_im_a_teapot@sh.itjust.works 14 points 2 days ago

We could probably improve on that significantly without losing speed.

return $x < 8

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).

[-] Blass_Rose@pawb.social 1 points 3 hours ago

I've seen so many game jam entries where the code is like this. Delicately balanced and using so many assumptions to just get the thing out the door.

It's funny when they decide to make a full game out of it and realize that it's gonna take them 6 months just to undo the tech debt of the original "demo"

this post was submitted on 22 Feb 2026
373 points (99.0% liked)

Programmer Humor

41128 readers
234 users here now

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

Rules:

founded 6 years ago
MODERATORS