Commit ad678ff
authored
test(benchmarks): cover all uint types (#235)
Summary
- add constructor benchmarks for every uint width discovered from
`evmspec.data.uints`
- exercise both zero and max values per type to cover edge-case
boundaries
Rationale
- ensure microbenchmarks cover all uint types to spot performance
regressions or discrepancies across widths
Details
- builds the param matrix dynamically from `uint<N>` classes and uses
HexBytes zero/max inputs
- tests: `PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
PYTHONPATH=/home/takopi/projects/evmspec/build/lib.linux-x86_64-cpython-313:/home/takopi/projects/evmspec
/home/takopi/projects/evmspec/.venv/bin/pytest -p pytest_codspeed.plugin
/home/takopi/projects/evmspec/benchmarks/test_uints_benchmarks.py
--codspeed`
- mypyc check:
`PYTHONPATH=/home/takopi/projects/evmspec/build/lib.linux-x86_64-cpython-313:/home/takopi/projects/evmspec
/home/takopi/projects/evmspec/.venv/bin/python -c "import evmspec._new
as m; print(m.__file__)"` ->
`.../build/lib.linux-x86_64-cpython-313/evmspec/_new.cpython-313-x86_64-linux-gnu.so`1 parent 5c477d5 commit ad678ff
1 file changed
+42
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
0 commit comments