Skip to content
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

Use new multi-output hints to improve bit decomposition #221

Closed
gbotrel opened this issue Jan 3, 2022 · 1 comment
Closed

Use new multi-output hints to improve bit decomposition #221

gbotrel opened this issue Jan 3, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@gbotrel
Copy link
Collaborator

gbotrel commented Jan 3, 2022

Current bit decomposition extracts bits one by one in the solver (IthBit). Would now make sense to extract them all in the same hint call to avoid converting to big int & decomposing a field element in bits n times (n == nbBits).

@gbotrel gbotrel added the perf label Jan 3, 2022
@gbotrel gbotrel added this to the v0.7.0 milestone Jan 3, 2022
@gbotrel gbotrel self-assigned this Feb 18, 2022
@gbotrel
Copy link
Collaborator Author

gbotrel commented Feb 23, 2022

https://github.com/ConsenSys/gnark/tree/hint-to-binary

Adds some changes to the hint API though (cc @ivokub ), holding off on that because:

On large circuits with many bit decompositions, the current hint (i-th bit) is called... millions of time 😅 . Part of the perf hit is actually on the big int thing; having a Constraint system + Hint system that's typed with field elements through generics (#172 ) will again change the API.

@gbotrel gbotrel closed this as completed Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant