-
Notifications
You must be signed in to change notification settings - Fork 382
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
Cipher 1.9x speedup #198
Merged
Merged
Cipher 1.9x speedup #198
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simplify cipher loop and unroll once. ``` λ benchcmp before.txt after.txt | grep -v "naive" benchmark old ns/op new ns/op delta BenchmarkCipher/bytes=7;offset=1-32 7.17 7.79 +8.65% BenchmarkCipher/bytes=125;offset=0-32 24.5 23.1 -6.07% BenchmarkCipher/bytes=1024;offset=0-32 126 63.4 -49.87% BenchmarkCipher/bytes=4096;offset=0-32 462 244 -47.26% BenchmarkCipher/bytes=4100;offset=4-32 460 249 -45.93% BenchmarkCipher/bytes=4099;offset=3-32 463 250 -45.93% BenchmarkCipher/bytes=32775;offset=49-32 3619 1936 -46.50% benchmark old MB/s new MB/s speedup BenchmarkCipher/bytes=7;offset=1-32 976.74 898.93 0.92x BenchmarkCipher/bytes=125;offset=0-32 5092.84 5423.57 1.06x BenchmarkCipher/bytes=1024;offset=0-32 8103.00 16159.29 1.99x BenchmarkCipher/bytes=4096;offset=0-32 8870.86 16818.08 1.90x BenchmarkCipher/bytes=4100;offset=4-32 8917.63 16491.32 1.85x BenchmarkCipher/bytes=4099;offset=3-32 8854.38 16379.58 1.85x BenchmarkCipher/bytes=32775;offset=49-32 9056.37 16926.83 1.87x ``` I tried a few variations, but this seemed fine without too many changes.
cristaloleg
reviewed
May 2, 2024
Seems like autobahn is a bit flaky. |
Yeah, it's:( |
cristaloleg
approved these changes
May 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simplify cipher loop and unroll once.
I tried a few variations, but this seemed fine without too many changes.