Re: RFC: Adding zlib dependency to libgio



On Wed, 2009-11-11 at 09:33 +0100, Thiago Macieira wrote:

> Actually, it does.
> 
> There's a performance penalty in loading each library, plus a combined penalty 
> of symbol resolution. Remember that each library has a different symbol 
> resolution search order, so the dynamic linker needs to keep the map for each 
> library. And the more libraries you have, the more libraries you have to walk 
> through with failed resolutions before you reach the library that provides the 
> symbol you're searching for.
> 
> Moreover, inter-library symbol dependency requires expensive relocations. When 
> it's inside the same library, a cheaper absolute relocation is possible. This 
> affects more C++ code (the vtables) than C code (which would go through lazy-
> binding PLT), but still affects enough to be relevant.

This is exactly why we're adding stuff to libgio.so rather than adding a
new library for every new feature.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]