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

chore(perf): Simplify poseidon2 algorithm #5811

Merged
merged 7 commits into from
Aug 27, 2024
7 changes: 0 additions & 7 deletions noir_stdlib/src/hash/poseidon2.nr
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ impl Poseidon2 {
}
// By this point, we should have a non-empty cache. Pop one item off the top of the cache and return it.
let result = self.cache[0];
for i in 1..RATE {
if i < self.cache_size {
self.cache[i - 1] = self.cache[i];
}
}
self.cache_size -= 1;
self.cache[self.cache_size] = 0;
result
}

Expand Down
Loading