chore: store function purities on the SSA#9357
Conversation
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: f20a89e | Previous: b61f5eb | Ratio |
|---|---|---|---|
test_report_zkpassport_noir-ecdsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
| struct Context<'brillig, 'purities> { | ||
| purities: &'purities FunctionPurities, | ||
| use_constraint_info: bool, | ||
| brillig_info: Option<BrilligInfo<'a>>, | ||
| brillig_info: Option<BrilligInfo<'brillig>>, |
There was a problem hiding this comment.
I think we can get away with the single lifetime here.
There was a problem hiding this comment.
Sorry, what do you mean?
There was a problem hiding this comment.
Presumably that the additional 'purities lifetime is not necessary here
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
…to ab/no-purities-on-dfgs
|
This looks pretty stale at this point. @asterite shall we close this or is it worth reviving? |
|
Let's close this. We could always revive it later. I feel like it might be worth it because there was at least one bug where we forgot to copy purities. |
Description
Problem
Made on top of #9355, just trying something.
Summary
This is just an experiment to see how the code looks like if we avoid storing function purities on every function dfg and instead store it once in the SSA and pass it around as needed.
I'm not 100% this is worth it, but it does seem to make the code a bit easier to follow (we can't forget to set purities in some functions, etc.), so I'm mainly interested in your opinion.
Additional Context
Documentation
Check one:
PR Checklist
cargo fmton default settings.