Repository navigation
Conversation
These do not appear to be on by default and provide a consistent speed-up
|
Comparing to a build from def short_calcul(n):
result = 0
for i in range(1, n+1):
result += i
return result
def long_calcul(num):
result = 0
for i in range(num):
result += short_calcul(i) - short_calcul(i)
return result
number = 1000
number_long_calcul=100
for _ in range(number_long_calcul):
long_calcul(number)The only obvious difference is I was building without LTO — presuming that it'd be a faster build and that performance would be worse (and an improvement would only be under measured). So, apparently LTO is making things slower here? I downloaded a binary from CI and am running the pyperformance suite on an x86-64 Linux machine for further confirmation. |
|
Computed gotos were correctly detected and enabled by configure at some point: I definitely spot verified this years ago. |
|
Thanks for confirming! It's a sysconfig display bug (https://github.com/python/cpython/blob/main/Lib/sysconfig/__init__.py#L452) — unfortunately just a rabbit hole for me to go down :) Going to explore #529 next. |
These do not appear to be on by default and provide a consistent speed-up. I noticed this while comparing the conda-forge build flags to ours.
It's not clear why they're not enabled. The upstream documentation says they are enabled by default on support compilers and the configure-code is quite straight-forward. Furthermore, we have problems with computed-gotos in PGO / BOLT so they must be available in some capacity? Discussion with the upstream suggests this may be a sysconfig bug — which would mean the following performance improvement isn't true. It's possible there's some other difference I need to dig into.
Using a benchmark derived from #535 on macOS aarch64:
I plan to test an artifact with the pyperformance suite on Linux as well