this post was submitted on 13 Dec 2025
371 points (97.9% liked)

Programmer Humor

27836 readers
1093 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Hirom@beehaw.org 28 points 13 hours ago (2 children)

The compiler will optimize it anyway. /s

[–] Dumhuvud@programming.dev 15 points 11 hours ago* (last edited 11 hours ago) (1 children)

You jest, but you aren't wrong. At least if we are talking about C, C++ or Rust. https://godbolt.org/z/oPPfdfcf5

.NET compiler is weak when it comes to optimizing your code; I assume Go's is as bad.

[–] yggstyle@lemmy.world 4 points 10 hours ago

Technically yes... But I think he was more making the excuse for the gore "from the goresmith's perspective."

And I'm not sure if the compiler in any language would change a random check function... The others are a possibility.

Not sure about the last one though. The other two are trivial to optimize away.