python / python/pyperformance

A more pythonic Richards benchmark?

未关闭
#101 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
1k
派生
203
平均合并
1 小时 20 分钟
30 天内合并 PR
2

描述

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.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先阅读 pyperformance/benchmarks/bm_richards.py,并将其与 adsharma/richards-benchmark 中的 Python 3 变体进行比较。检查所提议的 dataclasses、enums、类型注解以及基于 py2many 的转译方案。该 issue 未定义验收标准;要完成此项工作,需要维护者就是否以及如何在 pyperformance 中更新此变体达成一致。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
performance
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。