perf!: remove bound-caching from Type, do in SumType::General instead#3022
perf!: remove bound-caching from Type, do in SumType::General instead#3022acl-cqc wants to merge 4 commits intoacl/type_wraps_termfrom
Conversation
Merging this PR will improve performance by 19.59%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | construction |
20.4 µs | 17.1 µs | +19.59% |
Comparing acl/boundless_type (4ceb59e) with acl/type_wraps_term (80f1934)
Footnotes
-
6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## acl/type_wraps_term #3022 +/- ##
=======================================================
- Coverage 81.33% 81.31% -0.02%
=======================================================
Files 239 239
Lines 45271 45270 -1
Branches 39039 39038 -1
=======================================================
- Hits 36821 36813 -8
- Misses 6449 6455 +6
- Partials 2001 2002 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| SumType::General(general) => { | ||
| let changed = general.rows.transform(tr)?; | ||
| if changed { | ||
| *general = GeneralSum::new(std::mem::take(&mut general.rows)); |
There was a problem hiding this comment.
Does this need a comment to say, recompute the bound?
|
This PR contains breaking changes to the public Rust API. cargo-semver-checks summary |
Follows #2895
&mut GeneralSumyou can update the rows without updating the bound.BREAKING CHANGE: any match on
SumType::General {rows}becomesSumType::General(GeneralSum { rows }); construct GeneralSum with ::new