by giaour · 11y ago · 0 comments
Interop with existing libraries is certainly a worthy enough feature to add to the Go toolchain, and it's an optional feature, so ease of deployment is still a primary concern, but if you need DLLs, this is available.
Personally, I find that kind of thinking to be a relic of the past when memory and disk space were expensive and compilation took a long time.
Sure, if you're running on a raspberry pi, a few megs here and there might actually matter... but even my phone has 2gigs of RAM and 32gigs of disk space.
The nature of the modern computer is that cpu speed has increased more than memory speed, so if your data doesn't fit into cache your cpu will be do nothing quickly.
Even with shared libraries, this phenomena has such an impact that the Linux kernel now has a memory de-duplication feature (mostly for VMs):
The size of the binary is completely irrelevant when considering if the code fits in the CPU cache. What's important is the size of code that actually executes. Dynamic linking changes nothing.
That's not at all surprising considering that with static linking, each package is also built only once.
OTOH, it does well with the culture of making a lot of small, specialized executables rather than a single, monolithic application.
My point was rather that a 3MB executable used to be "large" and now it's not, even if you have 100 of them.
I don't know the background on this choice, but I've spoken to a few Go shops that have complained about memory usage when running a bunch of different Go binaries on the same machine, so hopefully this will help there.
However, this will probably deprecate or diminish the RPC and code generation techniques for implementing plugin architectures.