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: Improve blake2 precompile #239

Merged
merged 7 commits into from
May 24, 2024
Merged

perf: Improve blake2 precompile #239

merged 7 commits into from
May 24, 2024

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented May 21, 2024

Improve some of the internal logic of BLAKE2 precompile.

Yields around 19.1% savings.

@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label May 21, 2024
@Nashtare Nashtare self-assigned this May 21, 2024
@Nashtare Nashtare added the performance Performance improvement related changes label May 21, 2024
@@ -1,14 +1,14 @@
// 64-bit right rotation
%macro rotr_64(rot)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Identical modification to the one done for SHA2, except this one is a 64-bit rotation instead of 32.

@Nashtare Nashtare requested a review from hratoanina May 21, 2024 23:24
Copy link
Contributor

@hratoanina hratoanina left a comment

Choose a reason for hiding this comment

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

LGTM!

@Nashtare Nashtare merged commit 7003764 into develop May 24, 2024
5 of 6 checks passed
@Nashtare Nashtare deleted the blake2_speedup branch May 24, 2024 13:51
Nashtare added a commit that referenced this pull request May 27, 2024
* ci: add cargo audit job (#236)

* fix: Revert interpreter stack display (#238)

* Fix clippy doc_lazy_continuation (#247)

* perf: Improve blake2 precompile (#239)

* Speed-up some blake2 components

* Some more optimizations

* Cleanup

* Endline

* Some more speed-up

* Fix comments

* Clippy

---------

Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate. performance Performance improvement related changes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants