Skip to content

Commit 64e4283

Browse files
authored
add Python performance benchmark pipeline via PyPy
- Create specialized GitHub Action workflow for Python iterator benchmarking. - Configure PyPy 3.10 environment to validate Position Pro algorithm efficiency. - Decouple Python performance tracking from existing C++ infrastructure. - Standardized Markdown table output for performance trend visualization (N=10..12).
1 parent 7401b65 commit 64e4283

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/python_bench.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Python Iter Performance Bench
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
python-bench:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up PyPy 3.10
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: 'pypy-3.10'
20+
21+
- name: Run PP Iter Benchmark
22+
run: |
23+
echo "### 🐍 Position Pro Iterator Performance (PyPy)" >> $GITHUB_STEP_SUMMARY
24+
echo "Comparing Python Implementation vs. C-based itertools" >> $GITHUB_STEP_SUMMARY
25+
# 假设文件在 python 子目录下
26+
cd python
27+
python pp_iter.py >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)