-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: lookup blueprint compile time improvement #899
Conversation
@ivokub did replace the weird Yields further perf improvements (against previoous commit on this branch):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now makes much more sense. Looks good! Dunno about having some checks behing debug tag - if these cases happen then it is a bug in gnark anyway, but I think it would be slightly easier to report and debug when having unique identifiers (instead of generic out-of-bounds err)
Partially fixes #898 (compile part).
Essentially, the
Blueprint
WireWalker(inst Instruction) (w WireWalker, maxLevel int)
now returns amaxLevel
which, alongside the fact that the callback passed into the walker returns themaxLevel
of a wire, allows stateful blueprints likeBlueprintLookupHint
to cache some info avoiding useless computation by the compiler to figure out the instruction dependency tree.Added a reference benchmark in
logderivlookup
: