| Store | Cart

Re: [Python-Dev] Status of C compilers for Python on Windows

From: Steve Dower <Stev...@microsoft.com>
Sat, 11 Oct 2014 17:44:14 +0000
DLLs linked by import library at compile time (ie. not using LoadLibrary calls) and placed in the same directory as the .pyd should be exempt from DLL hell - Python already creates an activation context when importing pyds to let them load their own dependencies. Multiple CRTs are also okay as long as they don't try and share state (such as file descriptors) across boundaries.

I do understand the lack of knowledge and experience though. I've helped out in the past but I personally don't have the bandwidth to contribute more, nor the persuasiveness to get someone else to.

Top-posted from my Windows Phone
________________________________
From: Sturla Molden<mailto:stur...@gmail.com>
Sent: ý10/ý11/ý2014 9:59
To: pyth...@python.org<mailto:pyth...@python.org>
Subject: Re: [Python-Dev] Status of C compilers for Python on Windows

Steve Dower <Stev...@microsoft.com> wrote:

> Is there some reason the Fortran part can't be separated out into a DLL?

DLL hell, I assume. Using the Python extension module loader makes it less
of a problem. If we stick with .pyd files where everything is statically
linked we can rely on the Python dev team to make sure that DLL hell does
not bite us. Most of the contributors to projects like NumPy and SciPy are
not computer scientists. So the KISS principle is important, which is why
scientific programmers often use Fortran in the first place. Making sure
DLLs are resolved and loaded correctly, or using stuff like COM or .NET to
mitigate DLL hell, is just in a different league. That is for computer
engineers to take care of, but we are trained as physicists, matematicians,
astronomers, chemists, biologists, or what ever... I am sure that engineers
at Microsoft could do this correctly, but we are not the kind of guys you
would hire :-)


OT: Contrary to common belief, there is no speed advantage of using Fortran
on a modern CPU, because the long pipeline and the hierarchical memory
alleviates the problems with pointer aliasing. C code tends to run faster
then Fortran, often 10 to 20 % faster, and C++ tends to be slightly faster
than C. In 2014, Fortran is only used because it is easier to program for
non-specialists. And besides, correctness is far more important than speed,
which is why we prefer Python or MATLAB in the first place. If you ever see
the argument that Fortran is used because of pointer aliasing, please feel
free to ignore it.


Sturla

_______________________________________________
Python-Dev mailing list
Pyth...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40microsoft.com

_______________________________________________
Python-Dev mailing list
Pyth...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/python-dev-ml%40activestate.com

Recent Messages in this Thread
Victor Stinner Oct 10, 2014 12:29 am
Nathaniel Smith Oct 10, 2014 12:53 am
Sturla Molden Oct 10, 2014 09:12 am
Paul Moore Oct 10, 2014 07:07 am
Sturla Molden Oct 10, 2014 09:18 am
Victor Stinner Oct 10, 2014 09:29 am
Larry Hastings Oct 10, 2014 09:26 am
Victor Stinner Oct 10, 2014 09:50 am
Sturla Molden Oct 10, 2014 11:24 am
Paul Moore Oct 10, 2014 12:05 pm
Julian Taylor Oct 10, 2014 04:49 pm
M.-A. Lemburg Oct 10, 2014 10:21 am
Sturla Molden Oct 10, 2014 11:20 am
Sturla Molden Oct 10, 2014 11:27 am
Tres Seaver Oct 10, 2014 02:36 pm
Matthieu Brucher Oct 10, 2014 02:45 pm
Paul Moore Oct 10, 2014 02:56 pm
Larry Hastings Oct 10, 2014 11:45 pm
Sturla Molden Oct 11, 2014 12:30 am
Antoine Pitrou Oct 11, 2014 01:41 pm
Sturla Molden Oct 11, 2014 01:59 pm
Antoine Pitrou Oct 11, 2014 02:08 pm
Sturla Molden Oct 11, 2014 02:21 pm
Steve Dower Oct 11, 2014 05:44 pm
Sturla Molden Oct 11, 2014 04:58 pm
Nick Coghlan Oct 12, 2014 01:04 am
Nathaniel Smith Oct 11, 2014 06:32 pm
Paul Moore Oct 11, 2014 09:12 pm
Sturla Molden Oct 11, 2014 02:15 pm
Steve Dower Oct 11, 2014 03:33 pm
Nathaniel Smith Oct 11, 2014 02:01 pm
Merlijn van Deen Oct 10, 2014 11:00 am
Sturla Molden Oct 10, 2014 11:29 am
Rafael Villar Burke Oct 10, 2014 11:49 am
Brian Curtin Oct 10, 2014 02:31 pm
Mark Lawrence Oct 10, 2014 04:28 pm
Paul Moore Oct 10, 2014 05:01 pm
Roumen Petrov Oct 12, 2014 09:21 am
Steve Dower Oct 10, 2014 10:59 pm
Donald Stufft Oct 10, 2014 11:39 pm
Sturla Molden Oct 11, 2014 12:23 am
Roumen Petrov Oct 12, 2014 08:43 am
Ray Donnelly Oct 12, 2014 02:31 pm
Messages in this thread