News for hackers. Stuff that matters.
Re:Building the Rust Compiler with GCC by juxhindb on Monday July 07, 2025 @05:38AM (#44488444)
> Really, think about it. How often do you see somebody inexperienced use ifs instead of a switch? This pattern is common enough for most compilers to recognize, and more importantly, optimize it.

This made me chuckle. Playing dumb so that gcc optimizes you away is both hilarious and genius

Re:Building the Rust Compiler with GCC by 1718627440 on Monday July 07, 2025 @09:00AM (#44489942)
Actually the compiler converts the switch to ifs not the other way around.