A more pythonic Richards benchmark?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1k
- Forks
- 203
- Ø Merge
- 1 Std. 20 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
The richard's benchmark included with pyperformance seems to be a C -> C++ -> Java -> Python port. It makes heavy use of object oriented programming and doesn't look anything like the original C code.
I've been playing with the python2 version distributed from their website. I ported it to python3. It looks more like the C version, which has some good things and a few bad things:
+ Covers non-OO programming use case
- Overloads variables as in Union[int, Type1, Type2]
I'm in the process of improving it to Optional[Type1] and Optional[Type2]
My goal is to explore a dialect of statically typed python using modern pythonic constructs:
- dataclasses
- enums
- python3 type annotations
- static transpilation via py2many
The code is here: https://github.com/adsharma/richards-benchmark. Let me know if this sounds interesting and if you'd like to update the variant in the repo at some point in the future. I hear some of the faster cpython work is using these benchmarks.
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
Beginnen Sie mit dem Lesen von pyperformance/benchmarks/bm_richards.py und vergleichen Sie die Datei mit der Python-3-Variante in adsharma/richards-benchmark. Überprüfen Sie die vorgeschlagenen dataclasses, Enums, Typannotationen und den auf py2many basierenden Transpilierungsansatz. Der Issue definiert kein Akzeptanzkriterium; für den Abschluss wäre die Zustimmung der Maintainer erforderlich, ob und wie diese Variante in pyperformance aktualisiert werden sollte.
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
- 20/100