Re: F41 Change Proposal - Python Built with gcc -03 (self-contained)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 12, 2024 at 4:54 PM Aoife Moloney <amoloney@xxxxxxxxxx> wrote:
>
> Wiki - https://fedoraproject.org/wiki/Changes/Python_built_with_gcc_O3
> Discussion.fpo -
> https://discussion.fedoraproject.org/t/f41-change-proposal-python-built-with-gcc-03-self-contained/112743
>
>
> This is a proposed Change for Fedora Linux.
> This document represents a proposed Change. As part of the Changes
> process, proposals are publicly announced in order to receive
> community feedback. This proposal will only be implemented if approved
> by the Fedora Engineering Steering Committee.
>
>
>
> == Summary ==
> Instead of [https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags
> Fedora's default `-O2` compiler flag], we will use `-O3` to build
> CPython.
> This only impacts the interpreter and Python standard library, not any
> 3rd party extension modules built as RPM or on developer machines.
> This aligns with the way Python is built upstream.
> According to our performance measurements, it makes Python
> significantly faster (pyperformance geometric mean: 1.04x faster).
>
> == Owner ==
> * Name: [[User:churchyard|Miro Hrončok]]
> * Email: mhroncok@xxxxxxxxxx
>
>
> == Detailed Description ==
>
> We will replace the `-O2` compiler flag with `-O3` when building the
> python3.13 package. This change may be backported to older Pythons if
> desired. [[Changes/Python3.13|Python 3.13 should be the main Python
> version in Fedora 41+]].
>
> The [https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags
> Fedora packaging guidelines] about compiler flags explicitly say:
>
> ''> Overriding these flags for performance optimizations (for
> instance, `-O3` instead of `-O2`) is generally discouraged. If you can
> present benchmarks that show a significant speedup for this particular
> code, this could be revisited on a case-by-case basis.''
>
> This change proposal presents such benchmarks and a case for Python to
> use `-O3`.
>
> This change is limited to CPython interpreter and extension modules
> from the Python standard library only thanks to
> [[Changes/Python_Extension_Flags_Reduction]] (since Fedora 39). Other
> Python extension modules will remain bulidng as before, e.g. in RPM
> packages, they will still be built with `-O2`, unless Fedora changes
> that globally. The extension modules built with `-O2` still work with
> Python built with `-O3`.

I would like for us to consider evaluating a global change to -O3. I
am not convinced that there's a good reason anymore to remain at -O2.

If we get this kind of benefit from Python, I would be interested in
seeing what we'd get elsewhere.



-- 
真実はいつも一つ!/ Always, there's only one truth!
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux