|
From: | Bob Friesenhahn |
Subject: | Re: size of output libraries on different platforms... |
Date: | Mon, 24 Jul 2006 14:53:34 -0500 (CDT) |
On Mon, 24 Jul 2006, Noah Misch wrote:
Whereas with a shared library, the size of the library might be important, because the library is loaded at run-time, and larger files will be harder to keep in buffers than small files, as I understand it.Yes. The dynamic linker will map the entire shared library into the process address space; a larger library will take longer to map at startup, and it may yield more cache misses during operation.
In practice, it is not worth worrying about. It takes hardly any time to map a disk file into memory and I have never noticed/heard that it takes more time to map a large file than a smaller file. The run time loaders typically use lazy loading which defers symbol resolution until the time the symbols are actually used in order to decrease the overhead of a complex/large shared library. Likewise, modern systems use MMUs which only read a page from disk when it is actually used. The caches on RISC CPUs are normally sized/tuned so that it does not matter that the code size is 10-30% larger.
Most of the bloat difference between libraries is likely due to differences in the way symbol information is stored. Much of it can likely be removed using the 'strip' utility without impacting operation (other than ability to debug).
Bob ====================================== Bob Friesenhahn address@hidden, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
[Prev in Thread] | Current Thread | [Next in Thread] |