Improving representative benchmarks for typing ecosystem
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1k
- Forks
- 203
- Ø Merge
- 1 Std. 20 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
Due to a current lack of representative macrobenchmarks, it is very difficult to decide on whether complex accelerators for some parts of typing are worth implementing in the future. Hence, I'm trying to upstream some benchmarks into pyperformance.
IMO, there are three main areas:
- Performance of static type checkers implemented in Python (e.g. mypy). (Fixed by #102)
- Performance of programs using types at runtime (e.g. pydantic, attrs, etc.).
- Runtime overhead of typed code vs fully untyped code.
For case 2, I plan to use one of pydantic's benchmarks here https://github.com/samuelcolvin/pydantic/tree/master/benchmarks, installed without compiled binaries.
Case 3 is very tricky because there are so many ways to use typing. I don't know how often people use certain features, whether they type-hint inside tight loops, etc. So I'm struggling to find a good benchmark. An idea: grabbing one of the existing pyperformance benchmarks, fully type-hinting it, then comparing the performance delta may work.
CC @JelleZijlstra, I would greatly appreciate hearing your opinion on this (especially for case 3). Maybe I can post this on typing-sig too if I need more help.
Afterword:
All 3 cases benefit from general CPython optimizations. But usually only 3. benefits greatly from typing module-only optimizations (with 1. maybe not improving much if at all, depending on implementation).
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Prüfung der drei im Issue beschriebenen Benchmark-Bereiche und der dort verlinkten bestehenden pydantic-Benchmarks. Vergleiche diese Optionen mit der aktuellen pyperformance-Benchmark-Suite und kläre anschließend, welche Fälle und Benchmark-Programme einbezogen werden sollten. Als erledigt gilt die Aufgabe, wenn ein repräsentativer Benchmark-Umfang vereinbart und die ausgewählten Benchmarks upstream übernommen wurden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- performance
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100