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

Fix ignored clippy::needless_range_loop lints #776

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

divergentdave
Copy link
Collaborator

This rewrites various loops in Prio2 and Prio3 code to address ignored clippy::needless_range_loop lints. This improves some benchmarks by 2%-3%. None of the benchmarks regressed.

This improves Prio2 sharding benchmarks on large inputs by about a
percent.
These had a negligible effect on benchmark performance.
This saves a couple percent in FFT benchmarks
@divergentdave divergentdave requested a review from a team as a code owner October 2, 2023 21:38
Copy link
Contributor

@tgeoghegan tgeoghegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chris argued that the C-style loops are easier to resolve against the papers, but I prefer to embrace Rust style (and fervently pray that cryptography papers and specifications will stop using C or Python inspired pseudocode). And I don't think we can argue with the performance improvement.

@divergentdave divergentdave merged commit 1260498 into main Oct 3, 2023
@divergentdave divergentdave deleted the david/needless-range-loop branch October 3, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants