Skip to content

Commit c9fcbc0

Browse files
committed
docs: recommend disabling pytest-benchmark timeouts and update benchmark commands to include specific file patterns and timeout options.
1 parent c7870bd commit c9fcbc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CYTHON_README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ python setup.py build_ext --inplace
6565
```
6666

6767
### 2. Run Benchmarks
68-
Run the benchmark suite using `pytest-benchmark`:
68+
Run the benchmark suite using `pytest-benchmark`. We recommend disabling timeouts to allow sufficient warmup time:
6969
```bash
70-
pytest benchmarks/
70+
pytest -o "python_files=bench_*.py" --timeout=0 benchmarks/
7171
```
7272

7373
### 3. Compare with Python
7474
You can force the use of the Pure Python implementation by setting `REDUX_FORCE_PYTHON=1`. This allows you to verify the performance gains directly.
7575

7676
```bash
7777
# Run Python Baseline
78-
REDUX_FORCE_PYTHON=1 pytest benchmarks/ --benchmark-json=baseline.json
78+
REDUX_FORCE_PYTHON=1 pytest -o "python_files=bench_*.py" --timeout=0 benchmarks/ --benchmark-json=baseline.json
7979

8080
# Run Cython Optimized
81-
pytest benchmarks/ --benchmark-json=optimized.json
81+
pytest -o "python_files=bench_*.py" --timeout=0 benchmarks/ --benchmark-json=optimized.json
8282

8383
# Compare
8484
pytest-benchmark compare baseline.json optimized.json

0 commit comments

Comments
 (0)