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

ML-KEM: AVX2 target feature edition #636

Merged
merged 18 commits into from
Oct 21, 2024
Merged

Conversation

jschneider-bensch
Copy link
Collaborator

This is a first step of addressing #633.
It should get us most of the way back to reasonable performance, e.g. on my machine the difference between a RUSTFLAGS="-C target-feature=+avx2" cargo bench --features pre-verification and simply cargo bench --features pre-verification seems to be within 10-20% across keygen, encaps & decaps.

So, there seem to be more things still, and I didn't particularly look at key validation, yet. But it should be a good first step, anyway.

Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

Thanks!
We should keep all the inlines but clean up the unsafe a bit.

libcrux-ml-kem/benches/ml-kem.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/hash_functions.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/ind_cca/instantiations.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/lib.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/mlkem768.rs Outdated Show resolved Hide resolved
Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

Lets get this in

@franziskuskiefer franziskuskiefer added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit 13a5dea Oct 21, 2024
49 checks passed
@franziskuskiefer franziskuskiefer deleted the jonas/ml-kem-target-feature branch October 21, 2024 21:19
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