3 ms·
Should the compiler get to decide arbitrarily at which point a program becomes important enough to optimize, or should it apply the same level of optimization (
by kungtotte 7y ago
Should the compiler get to decide arbitrarily at which point a program becomes important enough to optimize, or should it apply the same level of optimization (based on compiler flags etc.) constantly so that you can reason about what will happen when you compile the code?
The blog post isn't even about how optimized the end result is. It's to get you, the programmer, to think about the cost you incur by going further down in this table when choosing your language/environment. Sometimes that's fine; Drew himself writes a lot of Python for example for his web stuff because it's the best choice for it and writing it in C or Zig is a pointless effort. The key thing to note though is that he picked Python while being well aware of this table.
Lots of programmers today aren't aware of this table. That's the point of the post.
- cycloptic 7y ago>Should the compiler get to decide arbitrarily at which point a program becomes important enough to optimize It probably already does. In a real program run with a real compiler you cannot reasonably know what the optimization process is going to do. You have to look at the output. >It's to get you, the programmer, to think about the cost you incur by going further down in this table when choosing your language/environment. >Lots of programmers today aren't aware of this table. Please don't. You don't have to be a CS prodigy to notice the size of an executable or the fact that a program is starting slow.