2 ms·
Well, maybe I missed your point then. Is your critique that the author used "printf"? I was responding to this statement: > This appears to have been written
by overgard 7y ago
Well, maybe I missed your point then. Is your critique that the author used "printf"?
I was responding to this statement:
> This appears to have been written by someone who thinks the point of "Hello World" is to print the string "Hello World" as efficiently as possible.
To me... that would straightforwardly seem to be the point of writing a hello world program.
- tptacek 7y agoMy critique is that the author missed the point of "Hello World".
- overgard 7y agoOk, I'll bite: In your mind, what is the point of "hello world"? Because I think the author's perspective is that it's a "small program that does something interesting". That seems pretty reasonable. I'm completely lost on what you're trying to say. I don't mean that in a snarky sense. Obviously you're a well regarded poster here and I'm interested in what you have to say. I just have no idea what you're communicating.
- tptacek 7y agoThe point of "Hello world" is to be the minimum program to demonstrate a programming environment (and verify that you have it working). Optimizing it is a very weird idea.
- kungtotte 7y agoShould 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.