Optimize patch 251 a tiny bit

Before:

    $ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
    2000 loops, best of 5: 157 usec per loop

    $ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
    2000 loops, best of 5: 162 usec per loop

    $ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
    1000 loops, best of 5: 146 usec per loop

After:

    $ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
    5000 loops, best of 5: 75.9 usec per loop

    $ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
    5000 loops, best of 5: 77.1 usec per loop

    $ python3.14 -m timeit -s 'import sysconfig' 'sysconfig.get_paths()'
    5000 loops, best of 5: 76.2 usec per loop

The results are inconclusive on 3.12,
but we want the patch to be identical (if possible).

This can be shipped with the next update.
This commit is contained in:
Miro Hrončok 2024-12-05 12:02:54 +01:00
commit e84b7727f4
2 changed files with 3 additions and 3 deletions

View file

@ -336,7 +336,7 @@ Source11: idle3.appdata.xml
# (Patches taken from github.com/fedora-python/cpython)
# 00251 # 7f0caf37f83f1e591194e93fd0f8cefede49bba6
# 00251 # 6a4ec74157aa01f1ada9f29f30a371cd9e5369e8
# Change user install location
#
# Set values of base and platbase in sysconfig from /usr