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

Add digest.Compute benchmark #4518

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Add digest.Compute benchmark #4518

merged 1 commit into from
Aug 10, 2023

Conversation

bduffany
Copy link
Member

@bduffany bduffany commented Aug 9, 2023

BenchmarkDigestCompute/SHA256/1-8                2624952               455.7 ns/op
BenchmarkDigestCompute/BLAKE3/1-8                 713340              1601 ns/op
BenchmarkDigestCompute/SHA256/10-8               2636890               463.4 ns/op
BenchmarkDigestCompute/BLAKE3/10-8                812553              1558 ns/op
BenchmarkDigestCompute/SHA256/100-8              2019846               587.7 ns/op
BenchmarkDigestCompute/BLAKE3/100-8               904671              2409 ns/op
BenchmarkDigestCompute/SHA256/1000-8              515154              2291 ns/op
BenchmarkDigestCompute/BLAKE3/1000-8              546352              3174 ns/op
BenchmarkDigestCompute/SHA256/10000-8              55933             19288 ns/op
BenchmarkDigestCompute/BLAKE3/10000-8             238008              8266 ns/op
BenchmarkDigestCompute/SHA256/100000-8              6258            188327 ns/op
BenchmarkDigestCompute/BLAKE3/100000-8             49518             23969 ns/op

Related issues: N/A

@bduffany bduffany requested a review from sluongng August 9, 2023 15:41
@bduffany bduffany mentioned this pull request Aug 9, 2023
Copy link
Contributor

@sluongng sluongng left a comment

Choose a reason for hiding this comment

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

LGTM.

nit: it would be nice to have a separate BUILD target (perhaps manual tagged) to run this with -test.bench=. in args.

@bduffany
Copy link
Member Author

bduffany commented Aug 10, 2023

LGTM.

nit: it would be nice to have a separate BUILD target (perhaps manual tagged) to run this with -test.bench=. in args.

I have done this in the past - defining a separate {package}_benchmark_test target - one downside I noticed is that gazelle doesn't seem to work on the benchmark target, but haven't looked into whether there is a good workaround

@bduffany bduffany merged commit 12374df into master Aug 10, 2023
2 checks passed
@bduffany bduffany deleted the digest-bench branch August 10, 2023 15:38
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