this post was submitted on 15 Jul 2025
434 points (94.7% liked)

Programmer Humor

37258 readers
7 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 4 days ago (2 children)

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

[–] PieMePlenty@lemmy.world 6 points 3 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 3 days ago

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