Ned Deily <n...@python.org> added the comment:

> Clang 6.0 doesn't support LTO and PGO?

No, it appears not.  And it's not an oversight that we don't use the these 
options.

As Łukasz points out, for the current macOS installer variants we supply are 
designed to run on all Mac systems from macOS 10.9 on. To accomplish that 
safely, we build the Python binaries on macOS 10.9 system to ensure they will 
be compatible, in other words, we build on the oldest system support and rely 
on upward compatibility when running on newer systems. The other approach is to 
build on the newest systems available after adding runtime checks throughout 
the C code to test for the presence of newer features (i.e. runtime calls that 
have been added in an operating system release newer than the oldest one 
support).  While this ("weaklinking") can be a viable option, it's a lot more 
work to implement initially and then keep updated over each o/s release to 
avoid segfaults and other failures when users on older systems try to use newer 
features.  Eventually we would like to fully support weaklinking so that we 
could provide one installer variant for all supported o/s versions that has all 
features available at each o/s version, it's not a high priority item at the 
moment (for example, supporting the upcoming 11.0 Big Sur with Apple Silicon 
is) and the current practices have worked well for many years.

Keep in mind that the main goal of the python.org macOS installers is to 
provide a single installable binary that works correctly on a wide-range of 
macOS releases and hardware.  What we provide today works on all Macs capable 
of running macOS 10.9 or later.  In particular, it is *not* a goal to provide 
the most optimized configuration for a particular system.  In general, consider 
the range of hardware and operating system releases, that's not easy to do. I 
believe that the intended users for the python.org macOS pythons are (1) 
beginners (like in a teaching environment where ease of deployment and 
uniformity is key) and (2) third-party Mac applications developers who want an 
embeddable Python that will allow their applications to work on multiple levels 
of macOS. If you are looking for the highest performance for a particular use, 
like benchmarking, you should look elsewhere - like one of the third-party 
distributors who specialize in numeric Pythons - or build it yourself on your 
own system.

So, thanks for the suggestion but we won't be using it now. Sometime in the 
future, if and when we support weaklinking and/or use newer toolchains across 
the board we will look at adding and other optimizations.

----------
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to