python / python/cpython

[PGO] Provide Pre-Generated Profiles

Offen
#127,425 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

build type-feature
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Feature or enhancement

PGO (Profile-Guided Optimization) offers significant performance benefits for Python. However, the current approach has a drawback: it makes the builds non-reproducible.

This issue could be resolved if upstream provided pre-generated profiles (perhaps via CI pipelines). These profiles could then be included in the distributed tarball, similar to how Chromium handles it. By doing so, distributions wouldn't need to:

  1. Compile the source code twice.
  2. Perform profiling themselves.
    In addition to streamlining the process for maintainers, this would also help maintain package reproducibility—a key consideration for many distributions.

I am not sure, about the integration with GCC, since in my testing the compilation failed with a preset profile (but I didnt dig deeper into this yet.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es sind keine Dateien, Tests oder Einstiegspunkte angegeben. Beginne mit der Untersuchung von CPythons PGO-Build und CI-Pipeline, insbesondere wie GCC ein voreingestelltes Profil verwendet. Als abgeschlossen gilt die Aufgabe, wenn ein reproduzierbares Profil in CI erzeugt und in das verteilte Tarball aufgenommen wird, ohne Profiling durch nachgelagerte Projekte oder eine zweite Kompilierung zu erfordern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system, performance
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.