3 ms·
I think the point he tried to make was that if only "hello world" produces a 1.3 megabytes executable, the file size of a fairly complicated program made in Go
by SBullet01 12y ago
I think the point he tried to make was that if only "hello world" produces a 1.3 megabytes executable, the file size of a fairly complicated program made in Go will be significantly larger than the same program implemented in another language.
- enneff 12y agoWhich makes no sense, anyway. The reason a Hello World program in Go is large is because it must include the baseline runtime support that is included in any Go program. A 10 line program won't be 13mb.
- hueving 12y agoThat's like trying to predict the cost of a flight by cost per mile using a quote from SFO to SJC as a baseline.
- nutate 12y agoThat's not a reasoned point then.
- falcolas 12y agoYou're right - it will be significantly larger. But then again, it doesn't depend on your system having all of the necessary libraries of the correct version and the overhead of dynamic linking. It's a tradeoff, and worth it in my opinion.
- danieldk 12y agoA dependency parser (in other words, serious program) in Go, linking in some external dependencies and a C++ machine learning library (statically): % du -k eval/eval 2040 eval/eval % strip eval/eval % du -k eval/eval 1864 eval/eval Don't just assume. Measure.
- dvirsky 12y agoI'm looking at an executable of a medium program I'm working on, probably around 5k LOC of my own code, using tons of standard library modules and linking to probably another 10-20k LOC of 3rd party libraries, all debug symbols in place. Weighs 5MB. I don't think this program in C++ would weigh much less. Anyway it can be improved, but to me there are far more important things to be improved about Go than the binary size of small programs.