That's so backwards. That you're a good programmer is precisely the reason you DO need optimizations.
-
-
-
Bad programmers who write unrolled spaghetti C that looks like asm can usually get away with minimal or no optimization. Programmers who write clean high-level code need optimization. Optimization de-incentivizes bad code.
- 15 more replies
New conversation -
-
-
That HN thread is cursed. I think at least some of the people in there want the compiler to *automatically* prove things instead of assuming them. I wonder if they also hope P=NP, it would explain a lot.
-
I had a phase like that in highschool, and it took a lot of online arguing to get it out of my system, so I should be more sympathetic. But this is C we're talking about so,,,
End of conversation
New conversation -
-
-
I don't want to read the code of any programmer who actually says this...
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Wait, really? I've never heard anyone say this. The programmers I work with love having good compiler optimizations, and in particular like the freedom to write their code in a straight-ahead style and have it perform as if it had been hand-optimized.
-
There's obviously some sadness about optimizations that are hard to predict. I have a definite preference for performance I can reason about!
End of conversation
New conversation -
-
-
I compile with -O0. Almost always. I only turn on optimizations for release builds.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Who does this? I write plenty of code with the assumption that the compiler will delete it.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
You must have heard someone argue before that there are other valid intermediate positions. I certainly wish C++ had moved forward defining signed integer overflow, those optimizations I could have lived without. (Though I appreciate someone somewhere might need them.)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.