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

AVX2 vectorization of Poseidon S-box #244

Merged
merged 3 commits into from
Sep 15, 2021
Merged

AVX2 vectorization of Poseidon S-box #244

merged 3 commits into from
Sep 15, 2021

Conversation

nbgl
Copy link
Member

@nbgl nbgl commented Sep 14, 2021

Shaves 4% 5% off hash times for width 8 and 9% 10% for width 12.

The function need interleaved to observe an improvement. My original attempt computed x^7 for one vector before moving onto another vector; this resulted in dependency chains that were too long, and the loop had too many instructions for CPU reordering to work. The compiler did not interleave the instructions itself, so I had to do it manually.

@nbgl nbgl requested a review from dlubarov September 14, 2021 15:18
Copy link
Member

@dlubarov dlubarov left a comment

Choose a reason for hiding this comment

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

👍

@nbgl nbgl merged commit b411a27 into main Sep 15, 2021
@nbgl nbgl deleted the jakub/avx2-poseidon-sbox branch September 15, 2021 02:26
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.

None yet

2 participants