Shared vs static link performance hit --and Windows?

Skip Montanaro skip at pobox.com
Tue Jul 8 09:45:36 EDT 2003


    Christos> ....  I did some speed comparisons, and pystone reported ~6090
    Christos> pystones for the shared and ~7680 pystones for the (default)
    Christos> static build.

    Christos> This is quite a difference, and while I do know what impact
    Christos> position independent code has on libraries, this was the first
    Christos> time I measured a difference of 25% in performance...

It's possible that the Python interpreter makes (percentage-wise) more calls
through the indirect links of the position-independent code.  We know it
makes lots of function calls (often to extension modules) to implement its
functionality, so it's quite possible that the interpreter takes a much
larger hit than your typical C program would.

Skip






More information about the Python-list mailing list