Shared vs static link performance hit --and Windows?

Daniel Dittmar daniel at dittmar.net
Thu Jul 10 00:10:21 CEST 2003


Christos TZOTZIOY Georgiou wrote:
> I might say something stupid since I am not an "expert" on Windows
> architectures, but would it be feasible (and useful) to build a static
> python.exe on windows?  Or is it that there would be no difference
> performance-wise in the final interpreter?

On windows, DLLs (and .pyd) can only call function in other DLLs, not in 
the EXE they are called from. So building a statically linked python 
would make it impossible to load dynamically .pyd files.

OT: One could of course change the Python extending API so that every 
extension function gets a pointer to the interpreter instances and all 
API functions are members of the interpreter object. This adds an 
additional indirection, so it wouldn't help the performace. On the plus 
side, this would make it at least feasable that extenions are binary 
compatible to newer Pythons the same way they often are on Unix.

Daniel





More information about the Python-list mailing list