[Haskell-cafe] Re: Non-technical Haskell question
Ben Rudiak-Gould
Benjamin.Rudiak-Gould at cl.cam.ac.uk
Tue Dec 7 10:57:45 EST 2004
John Goerzen wrote:
>On Tue, Dec 07, 2004 at 12:43:27PM +0100, Lennart Augustsson wrote:
>>Yay! :) Dynamically linked libraries are slower than statically linked
>>ones in just about every implementation I know of. I don't care.
>
>My understanding was that this was mostly limited to x86 platforms.
>From memory, an additional register is consumed when using dynamic
>libraries on that platform, and due to its already limited number of
>registers, that can mean a hit.
I'm not sure what this would be unless it's the frame pointer (ebp). I
don't know of any reason you can't omit the frame pointer in dynamically
linked applications, though, unless one of the DLLs you're linking with
wants to unwind your stack, in which case you'd have the same problem
linking statically.
Dynamic linking has other costs. If the library is relocated, you have
to use a jump table (slows down every call) or patch all calls directly
(interferes with demand paging). Code cache locality is reduced because
the linker can't discard unused library functions. And there are
problems with inlining. :-)
-- Ben
More information about the Haskell-Cafe
mailing list