-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PCALIGN gives a ~12% performance improvement so we really want it, if you are using a previous version of go, too bad please upgrade.
- Loading branch information
Showing
3 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//go:build amd64 && !appengine && gc && !purego && !go1.22 | ||
// +build amd64,!appengine,gc,!purego,!go1.22 | ||
|
||
// The avx512 impl relies on PCALIGN. | ||
|
||
package xxhash | ||
|
||
// Sum64 computes the 64-bit xxHash digest of b with a zero seed. | ||
func Sum64(b []byte) uint64 { | ||
return sum64Scalar(b) | ||
} | ||
|
||
//go:noescape | ||
func sum64Scalar(b []byte) uint64 | ||
|
||
// extra is a first block before b, it may be nil then skip it. | ||
func writeBlocks(d *Digest, extra *[32]byte, b []byte) { | ||
return writeBlocksScalar(d, extra, b) | ||
} | ||
|
||
//go:noescape | ||
func writeBlocksScalar(d *Digest, extra *[32]byte, b []byte) |
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