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
A HashMap is a useful container type but constrained Noir is limited to std::collections::HashMap which can be slow and limiting in a comptime context where a Turing-complete context is available.
Happy Case
Add a CtHashMap type which can grow and shrink as needed and can use break when finding an element.
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#5479
## Summary\*
Mostly copied over from our existing hash map with a few changes.
- Uses slices and grows automatically
- Uses `break`
## Additional Context
Like other comptime code, I'm avoiding documenting this until comptime
as a whole is stable
## Documentation\*
Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [x] **[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.
---------
Co-authored-by: Michael J Klein <[email protected]>
Problem
A HashMap is a useful container type but constrained Noir is limited to
std::collections::HashMap
which can be slow and limiting in acomptime
context where a Turing-complete context is available.Happy Case
Add a
CtHashMap
type which can grow and shrink as needed and can usebreak
when finding an element.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: