Improving representative benchmarks for typing ecosystem
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 1k
- Forks
- 203
- Merge moyen
- 1 h 20 min
- PR mergées (30 j)
- 2
Description
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).
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner les trois domaines de benchmarks décrits dans l’issue ainsi que les benchmarks pydantic existants qui y sont liés. Comparez ces options avec la suite actuelle de benchmarks de pyperformance, puis précisez quels cas et quels programmes de benchmark devraient être inclus. Le travail est terminé lorsqu’un périmètre de benchmarks représentatif a été convenu et que les benchmarks sélectionnés ont été intégrés upstream.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- performance
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100