A more pythonic Richards benchmark?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1k
- Fork
- 203
- Merge medio
- 1h 20m
- PR unite (30g)
- 2
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo pyperformance/benchmarks/bm_richards.py e confrontandolo con la variante Python 3 in adsharma/richards-benchmark. Esamina le dataclasses, gli enum, le annotazioni di tipo e l’approccio di transpilation basato su py2many proposti. L’issue non definisce un criterio di accettazione; per completare il lavoro sarebbe necessario che i maintainer concordassero se e come aggiornare questa variante in pyperformance.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- performance
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100