fix: Use froundeven for lowering float roundings - #2286
Conversation
|
This should be backported to v1.0.X as well, if we can do it (considering dependency constraints) |
|
| Project | guppylang |
| Branch | mr/fix/froundeven |
| Testbed | Linux |
Click to view all benchmark results
| Benchmark | hugr_bytes | Benchmark Result bytes x 1e3 (Result Δ%) | Upper Boundary bytes x 1e3 (Limit %) | hugr_nodes | Benchmark Result nodes (Result Δ%) | Upper Boundary nodes (Limit %) |
|---|---|---|---|---|---|---|
| tests/benchmarks/test_big_array.py::test_big_array_compile | 📈 view plot 🚷 view threshold | 62.10 x 1e3(0.00%)Baseline: 62.10 x 1e3 | 62.72 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 4,585.00(0.00%)Baseline: 4,585.00 | 4,630.85 (99.01%) |
| tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile | 📈 view plot 🚷 view threshold | 27.80 x 1e3(0.00%)Baseline: 27.80 x 1e3 | 28.08 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 1,301.00(0.00%)Baseline: 1,301.00 | 1,314.01 (99.01%) |
| tests/benchmarks/test_queue_push_pop.py::test_queue_push_benchmark_compile | 📈 view plot 🚷 view threshold | 7.24 x 1e3(0.00%)Baseline: 7.24 x 1e3 | 7.32 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 310.00(0.00%)Baseline: 310.00 | 313.10 (99.01%) |
| tests/benchmarks/test_queue_push_pop.py::test_queue_push_pop_benchmark_compile | 📈 view plot 🚷 view threshold | 9.86 x 1e3(0.00%)Baseline: 9.86 x 1e3 | 9.96 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 411.00(0.00%)Baseline: 411.00 | 415.11 (99.01%) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## mr/perf/upgrade-toolchain #2286 +/- ##
=============================================================
- Coverage 93.23% 93.23% -0.01%
=============================================================
Files 162 162
Lines 15824 15828 +4
=============================================================
+ Hits 14754 14757 +3
- Misses 1070 1071 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 40.31%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_queue_push_pop_benchmark |
4.4 s | 3.1 s | +40.93% |
| ⚡ | test_queue_push_benchmark |
3.4 s | 2.4 s | +39.69% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mr/fix/froundeven (37834a6) with main (3560b6e)
| "guppylang-internals==1.0.1", | ||
| "numpy>=2.2.6,<3", | ||
| "selene-hugr-qis-compiler~=0.4.2", | ||
| "selene-hugr-qis-compiler~=0.4.3", |
There was a problem hiding this comment.
This is fine for backporting, but for guppy 1.1 we should bump it to qis-compiler 0.5
There was a problem hiding this comment.
Yes, that upgrade will be done separately. I have now pulled out the actual dependency upgrades in #2284, so that this PR does not have a perf improvement attached that it should not have.
Ensures that we use tie-to-even instead of tie-away-from-zero, for more consistency with Pythons
round.