[Haskell-cafe] Re: Non-technical Haskell question

Lennart Augustsson lennart at augustsson.net
Tue Dec 7 10:09:41 EST 2004

John Goerzen wrote:
> On Tue, Dec 07, 2004 at 12:43:27PM +0100, Lennart Augustsson wrote:
>>>slightly slower than statically linked ones), but you still have the
>>>versioning issue.
>>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.
> AFAIK, these problems are negligible on many other platforms.
> This is just folk knowledge from a few years ago, so please correct me
> if I'm wrong.

If your data is position independent then you need more complex
address calculations (i.e., an extra addition of the base register).
Sometimes this is available as an addressing mode, but sometimes not.
So it has some impact in addition to using an extra register.

Furthermore, every function call to a dynamically linked function
(typically) uses an indirection, so you get a small hit there as

But it only adds up to a few percent, so no sweat. :)

	-- Lennart

More information about the Haskell-Cafe mailing list