4 ms·
I dont really understand the link between software bloat and static linking...
by Galanwe 11y ago
I dont really understand the link between software bloat and static linking...
- adrusi 11y agoWhen you statically link and executable, all the code from the libraries that it links to (at least the code that is directly or indirectly called by the application) is bundled into the binary. If you have 13 applications running that each statically link in 60% of a 2MB library, then you're using 15.6MB of memory where with dynamic linking you only need 2MB.
- TheLoneWolfling 11y agoOn the flip side, if you have a small tool that pulls in 1% of that 2MB library you only need 20KB of memory, whereas with dynamic linking you still need the full 2MB. Ditto, static linking leads to a lot more optimization opportunities, both in terms of performance and in terms of size. I would be very surprised if that 13 x 60% of a 2MB library was actually anywhere near 15.6MB.
- deleted 11y ago[deleted]