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
global COUNT = 400;fnmain() -> pub BoundedVec<[Field;1],COUNT>{letmut result = BoundedVec::new();letmut x = 0;for _ in0..COUNT{if(x < 1){
result.push([0]);}}
result
}
Expected Behavior
The code compiles fast.
Bug
The code takes 30 seconds to compile on my machine.
To Reproduce
Compile the code
Project Impact
Nice-to-have
Impact Context
No response
Workaround
Yes
Workaround Description
No response
Additional Context
No response
Installation Method
None
Nargo Version
nargo version = 0.28.0 noirc version = 0.28.0+7dfa151da95c7ca9e1aaa752347b62f9fafe2c2c
NoirJS Version
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:
I've confirmed this takes about 24s for me on commit 7dfa151, so it has been fixed on master since then.
After a git bisect I determined #4716 is the culprit for optimizing this. Although everything was known at compile-time, that PR reduced the number of instructions to merge the arrays in this case from N = 400 each iteration to just the 1 differing element.
Closing this issue - you should see this change once #4716 is included in a release.
Aim
Getting this code to compile considerably fast:
Expected Behavior
The code compiles fast.
Bug
The code takes 30 seconds to compile on my machine.
To Reproduce
Project Impact
Nice-to-have
Impact Context
No response
Workaround
Yes
Workaround Description
No response
Additional Context
No response
Installation Method
None
Nargo Version
nargo version = 0.28.0 noirc version = 0.28.0+7dfa151da95c7ca9e1aaa752347b62f9fafe2c2c
NoirJS Version
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: