this post was submitted on 15 Jul 2025
459 points (94.9% liked)

Programmer Humor

37249 readers
9 users here now

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

Rules:

founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] sik0fewl@lemmy.ca 10 points 3 days ago (2 children)

This code would run a lot faster as a hash table look up.

[–] PieMePlenty@lemmy.world 6 points 2 days ago

I agree. Just need a table of even numbers. Oh and a table of odd numbers, of course, else you cant return the false.. duh.

[–] Valmond@lemmy.world 5 points 2 days ago

In a Juliana tree, or a dictionary tree if you want. For speed.