Merged
Conversation
Contributor
|
The change seems fine, but I think the benchmarks might need to save the result to a global variable to avoid dead code elimination. |
* pool *xxhash.Digest objects
* use fmt.Fprintf to write to hash
benchmark stats
oos: linux
goarch: amd64
pkg: github.com/dolthub/go-mysql-server/sql
cpu: AMD Ryzen 9 7900 12-Core Processor
│ b1 │ b2 │
│ sec/op │ sec/op vs base │
HashOf-24 79.65n ± 4% 70.86n ± 7% -11.03% (p=0.002 n=6)
ParallelHashOf-24 10.47n ± 4% 11.85n ± 19% ~ (p=0.368 n=6)
geomean 28.88n 28.98n +0.32%
│ b1 │ b2 │
│ B/op │ B/op vs base │
HashOf-24 4.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6)
ParallelHashOf-24 4.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6)
geomean 4.000 ? ¹ ²
¹ summaries must be >0 to compute geomean
² ratios must be >0 to compute geomean
│ b1 │ b2 │
│ allocs/op │ allocs/op vs base │
HashOf-24 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6)
ParallelHashOf-24 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6)
geomean 2.000 ? ¹ ²
¹ summaries must be >0 to compute geomean
² ratios must be >0 to compute geomean
Contributor
Author
fixed. we're checking the error return value so the call will not be eliminated by the compiler. |
max-hoffman
approved these changes
Mar 12, 2024
Contributor
max-hoffman
left a comment
There was a problem hiding this comment.
lgtm! thanks for taking the time to contribute
This file contains hidden or 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
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.
benchmark stats