On 2013-10-10 13:21, Andreas Lauser wrote:
Besides avoiding the wrath of corporate IT, it also comes with small
performance benefits, since (as far as I understood it) dynamic linking
requires indirect function calls which basically makes any entrypoint of the
library a virtual method...

Dynamic linking requires a fixup at load time; but the overhead caused by this is very small (probably much smaller than disk I/O). There is no indirect calls at runtime. But the dynamic linker cannot inline methods the same way as the compiler can.

It does however imply position-independent code for accessing globals (which is why the -fPIC option is added when building an .so) which incurs a performance penalty. However, on x86_64 this is much less than it used to be due to new addressing modes, so I wonder if it would be noticeable at all. (will have to experiment with that one day -- if we could build everything with -fPIC we could do .a and .so at the same time)

--
        Roland.

_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm

Reply via email to