It turns out that the overhead of dynamic linking on Linux amd64 is 2 CPU cycles per cross-module call. I usually take forever to get to the point in my writing, so I thought I would change this for once :-)
In MySQL, there has been a historical tendency to favour static linking, in part because to avoid the overhead (in execution efficiency) associated with dynamic linking. However, on modern systems there are also very serious drawbacks when using static linking.
The particular issue that inspired this article is that I was
working on MWL#74, building a proper shared
libmysqld.so library for the MariaDB embedded
server. The lack of a proper libmysqld.so in MySQL
and MariaDB has caused no end of grief for packaging Amarok for the
various Linux distributions. My patch …