3 ms·
It's fast and simple but not a good heuristic. It's like judging a car by how expensive it is. It has nothing to do with how the thing performs. Optimising for
by 1_player 5y ago
It's fast and simple but not a good heuristic. It's like judging a car by how expensive it is. It has nothing to do with how the thing performs.
Optimising for size is such a waste of time in this day and age. I know I would rather choose a 5 MB statically linked binary than a 5 KB dynamically linked one, because they take pretty much the same amount of perceived time to transfer over the internet, yet the smaller file might take more of my time because I need to find and install missing dependencies.
On the list of priorities for language developers, size optimisation is towards the bottom, unless we're talking about embedded but we aren't.
- int_19h 5y agoCompiling dynamically is not really optimizing for size, since you have to include size of said dependencies. As far as whether size matters - it really depends. Some parts of the world are still mostly on dialup (or very slow mobile).
- stephc_int13 5y agoYou are right to some extent. Except in very specific context, shaving bytes is pointless, and a few kilobytes are barely relevant. But in the real world we're often talking about several orders of magnitude differences. I would still accept a Hello World that is around 100Kbytes, but not an order of magnitude more. And I am talking about statically linked app, this is an other subject but I tend to think that dynamically linking is way overused and rarely justified.
- kaba0 5y agoBut that assumes that file size grows linearly with code length, which is not the case. Twice the code size for a hello wold will be barely any larger than the hello world itself.