Sorry about replying twice but I missed this one too:
> C++ has also linker problem: dynamic linking is a lot slower (number of
> function, but also because long names, which differentiate only at the
> end)
This is annoyingly true. However, this has pretty much been rectified.
With recent binutils (I think 2.17.50 or later?) a new hash table format is used for ELF
dynamic binaries which significantly reduces the amount of string comparisons that must be
done in order to properly load a symbol. Of course long symbol names still take a while to
load so it is important to reduce the amount of symbols used to the minimum necessary. If you
have recent binutils you may already be able to see the fruits of this, you can use readelf -d
to see if you have a GNU_HASH section of a binary or a .so.
g++ since 4.0 has supported visibility for symbols, including symbols defined as part of C++
class and template generation, which takes care of that problem. The problem is that C++
libraries must specifically support it, but support for that is growing.
prelinking provides benefits on top of that. There are patches from Michael Meeks floating
around to allow a flag called -Bsymbolic which apparently also helps, but I don't really know
what it does beyond that, and it does not look like it will make it into binutils anyways.
But there's lots of work being done to rectify these problems, so it lookslike we're *almost*
getting to the point to where we can have our cake and eat it too. :)