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

perf: add optional support for keccak-asm #466

Merged
merged 9 commits into from
Dec 27, 2023
Merged

perf: add optional support for keccak-asm #466

merged 9 commits into from
Dec 27, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Dec 26, 2023

Motivation

Closes #414
See https://github.com/DaniPopes/keccak-asm, https://github.com/DaniPopes/bench-keccak256

Solution

Add "asm-keccak" feature which overrides the tiny-keccak implementation with keccak-asm

Benches

https://github.com/DaniPopes/bench-keccak256

Local:

RUSTFLAGS=""
2.60-2.75 µs -> 2.10-2.20 µs

primitives/keccak256/32 time:   [2.1212 µs 2.1285 µs 2.1373 µs]                                     
                        change: [-21.731% -21.336% -20.849%] (p = 0.00 < 0.05)
                        Performance has improved.

RUSTFLAGS="-Ctarget-cpu=native" (AVX512VL)
2.08-2.20 µs -> 2.04-2.10 µs

primitives/keccak256/32 time:   [2.0734 µs 2.0747 µs 2.0761 µs]                                     
                        change: [-5.1237% -5.0213% -4.8902%] (p = 0.00 < 0.05)
                        Performance has improved.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

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.

[Feature] Assembly Accelerated Keccak
2 participants