Change the build tags for xor.go and xor_unaligned.go to perform better on ppc64/ppc64le. This improves performance for these sha3 benchmarks: benchmark old MB/s new MB/s speedup BenchmarkSha3_512_MTU 68.42 76.03 1.11x BenchmarkSha3_384_MTU 91.12 105.38 1.16x BenchmarkSha3_256_MTU 110.19 132.63 1.20x BenchmarkSha3_224_MTU 114.46 139.12 1.22x BenchmarkShake128_MTU 129.77 163.14 1.26x BenchmarkShake256_MTU 125.01 151.93 1.22x BenchmarkShake256_16x 110.60 129.44 1.17x BenchmarkShake256_1MiB 128.51 154.23 1.20x BenchmarkSha3_512_1MiB 74.18 82.39 1.11x Fixes golang/go#14847 Change-Id: I59ba763b4eaf3e567399b132ad820fb2dcbbf129 Reviewed-on: https://go-review.googlesource.com/20821 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
17 lines
413 B
Go
17 lines
413 B
Go
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build !amd64,!386,!ppc64,!ppc64le appengine
|
|
|
|
package sha3
|
|
|
|
var (
|
|
xorIn = xorInGeneric
|
|
copyOut = copyOutGeneric
|
|
xorInUnaligned = xorInGeneric
|
|
copyOutUnaligned = copyOutGeneric
|
|
)
|
|
|
|
const xorImplementationUnaligned = "generic"
|