Thread: How to trash your code quality with awful hacks to make up for LLVM being so much worse than GCC.https://twitter.com/chandlerc1024/status/918034746587803648 …
-
Show this thread
-
Replying to @RichFelker
I would consider a number (not all) of
@chandlerc1024's suggestions improvements to code quality. Move rarely-used paths out-of-line? Great!4 replies 0 retweets 6 likes -
Replying to @stephentyrone @chandlerc1024
Unless already tightly coupled, putting code in headers is usually a big offense. Factoring based on perf rather than logic even moreso.
2 replies 0 retweets 1 like -
Replying to @RichFelker @chandlerc1024
When perf is important, factoring based on perf is appropriate. It'll also help both GCC and your own optimization efforts.
1 reply 0 retweets 0 likes -
Replying to @stephentyrone @chandlerc1024
As a last resort, yes. Compiler tech should be eliminating that, though (LTO, etc.) not bringing it back.
1 reply 0 retweets 0 likes -
I freely admit to doing the same fairly often, but it's not something I'm proud of or consider clean. It's "cos the compiler sucks".
1 reply 0 retweets 0 likes -
Replying to @RichFelker @chandlerc1024
It is the cleanest solution I know. There is a vast supply of compilers worse than LLVM that will need it, even if LLVM doesn't.
1 reply 0 retweets 0 likes -
Unless one is fortunate to live in Cloudcuckooland where only ToT GCC or LLVM exists, that's the way it's gonna be.
1 reply 0 retweets 0 likes -
Replying to @stephentyrone @chandlerc1024
GCC is really still the only compiler with near-universal target support and production-grade optimization.
2 replies 0 retweets 0 likes
That's not to say GCC is at all well-designed or clean, just that others have a long way to go achieving better with good design.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.