-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Replace Tuple
with unary sums
#891
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #891 +/- ##
==========================================
+ Coverage 85.55% 85.68% +0.12%
==========================================
Files 78 78
Lines 14396 14417 +21
Branches 14396 14417 +21
==========================================
+ Hits 12317 12353 +36
+ Misses 1445 1430 -15
Partials 634 634
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Edit: done |
We could also add an explicit single-element variant to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds some actual benchmarks, mainly extracted from the unit tests: - Construct a complex `Type` - Construct a `DFG` hugr - Construct a `CFG` hugr I intended to include these in a PR implementing this optimisation suggestion #891 (comment), but the actual tests showed a consistent 4% slowdown on the hugr builders. So I'd say it's important to have benchmarks :)
Closes #864.
Updates the
Display
impl ofSum
as part of this change, sois now rendered as
And tuples appear directly as
[usize, usize, ...]
.We were incorrectly using the debug formatter for the internal types.
drive-by: Add rust snapshots to the pre-commit ignores. We don't want it to modify whitespaces.