4 ms·
I know Sufficiently Smart Compilers are a running joke, and I know a lot of people think the idea is a bad one, but come on...this should be the job of a compil
by saosebastiao 10y ago
I know Sufficiently Smart Compilers are a running joke, and I know a lot of people think the idea is a bad one, but come on...this should be the job of a compiler. The first example is way more understandable. Yes, it branches, and yes it is more code and less efficient. But a compiler should be able to derive the more efficient version from the more understandable code. And it's a shame that it doesn't.
- zodiac 10y agoI think Linus argued that the second version is more understandable. In fact if you read the article there's no claim being made that the second version is more efficient, and I don't think it is