-
Notifications
You must be signed in to change notification settings - Fork 276
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
feat: plonk circuit optimizations #972
Conversation
recursion/compiler/src/ir/builder.rs
Outdated
@@ -103,6 +103,7 @@ pub struct Builder<C: Config> { | |||
pub(crate) p2_hash_num: Var<C::N>, | |||
pub(crate) debug: bool, | |||
pub(crate) is_sub_builder: bool, | |||
pub program_options: HashMap<String, String>, |
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.
What is program_options
and why is it a String
, String
? That's one of the worst data types since it offers basically no type safety
also should have a comment
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.
Ya, I'm aware of it not having any type safety. This is used for general options/flags that the user of a builder can set to read in the program (similar to environment variables, which also doesn't have any type safety).
e.g. i needed a way to tell the builder which specific exp_reverse_bit_len
to use here: https://github.com/succinctlabs/sp1/pull/972/files#diff-db73ffd500d0fa7feab9026c2f484f505d78d0fea40c55448c60c055c8c3d138R127
I didn't want to add a program specific field to the builder struct, so added a general lookup table for this. Also, there are other flags with a similar need that uses this lookup table.
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.
Actually, I'll change it to a HashMap<String, bool>
type, since all the existing entries are bools.
No description provided.