python / python/cpython

Add "Total Machine Code Cost" of UOps to PyStats

Offen
#119,692 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

interpreter-core topic-JIT type-feature
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

At the sprints at PyConUS 2024, @brandtbucher suggested an improvement to pystats data. Right now, the Tier 2 stats include a count of how many times each UOp is executed, but Brandt suggested another useful table would be UOp Execution Count * Length of UOp in Machine Instructions, sorted by this metric.

In this way, UOps that are extremely common but cheap can be deprioritized, and work can be focused on improving UOps that are less common but take up more 'time' overall (with machine code length as a proxy for time).

I'm happy to take this on.

Linked PRs
  • gh-119693

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

Überprüfe zuerst die CPython-Tier-2-PyStats-Implementierung und den verknüpften PR gh-119693; im Issue werden weder eine Datei noch ein Testeinstiegspunkt genannt. Erledigt ist die Aufgabe, wenn PyStats die Anzahl der UOp-Ausführungen multipliziert mit der Länge der Maschineninstruktion meldet und die Einträge nach dieser Summe sortiert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
performance
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

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