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
I'm guessing this is due to having many copies of ROOTS being inlined across the codebase which tanks compilation speed due to the amounts of memory necessary. I'd expect that #6071 would help with this.
While makearray could help since it'd deduplicate constants per function, I think what would be the most effective solution to this is introducing globals in SSA, so this constant would appear exactly once in the program
2 potential bugs here.
Checkout this branch: iAmMichaelConnor/blob-lib#5
Update the Nargo.toml to point to v0.4.0 (or later... I was testing it against
main
, locally).Turn your attention to the
config.nr
andnegative_roots.nr
files. You'll see thousands of hard-coded constants.Now observe:
Run
nargo execute
onmain.nr
. This took 28 minutes on my old 2019 MacBook Pro i9.Now comment-out all those constants and uncomment the "array of zeros" version. Do it in both
config.nr
andnegative_roots.nr
.E.g. see this pic for what to uncomment:
Again, run
nargo execute
onmain.nr
. It'll break with some kind of "stack too deep" error. Very strange.Now delete those thousands of lines of commented-out hard-coded constants.
Again, run
nargo execute
onmain.nr
. The "stack too deep" error will disappear. This took 3 mins 50 seconds.Observations:
Thanks to @MirandaWood for first spotting this!
The text was updated successfully, but these errors were encountered: