You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial tests against the aztec-packages repository suggest the elaborator is roughly 2-4x as slow as our current name resolution and type checking passes.
Happy Case
We should optimize the elaborator since it theoretically should be no slower than our existing solution.
We could look for cases in which large objects, e.g. FuncMetas are merged or profile with a flame graph.
Project Impact
None
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered:
# Description
## Problem\*
Resolves#5194
## Summary\*
Fixes a performance issue where the elaborator was ~2x as slow running
`nargo t --use-elaborator` on aztec-nr versus the same tests without the
elaborator (4s versus 2s).
Found via flamegraph - `self.type_variables` wasn't cleared after each
function was elaborated. This Vec is meant to just store type variables
local to a function so that we can check if any need type hints after it
is done but since it wasn't cleared out, we'd be checking an
increasingly large Vec for each function.
## Additional Context
With this change the elaborator is slightly faster (but not noticeably)
than our current code. 1.9 versus 2.0s average across 10 runs for `nargo
t` (with lower std. deviation than our current code as well).
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
Problem
Initial tests against the aztec-packages repository suggest the elaborator is roughly 2-4x as slow as our current name resolution and type checking passes.
Happy Case
We should optimize the elaborator since it theoretically should be no slower than our existing solution.
We could look for cases in which large objects, e.g. FuncMetas are merged or profile with a flame graph.
Project Impact
None
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: