Commit 8b51ee83 authored by Lynn Boger's avatar Lynn Boger Committed by Minux Ma

crypto/cipher: xorBytes performance ppc64le/ppc64

Update supportsUnaligned in xor.go to be true for
GOARCH values ppc64le and ppc64.  This allows the
xor of long buffers to be done on double words
(8 bytes) instead of a single byte at a time, which
significantly improves performance.

Fixes #14350

Change-Id: Iccc6b9d3df2e604a55f4c1e4890bdd3bb0d77ab0
Reviewed-on: https://go-review.googlesource.com/19519Reviewed-by: default avatarMinux Ma <minux@golang.org>
parent eb6ee75a
......@@ -10,7 +10,7 @@ import (
)
const wordSize = int(unsafe.Sizeof(uintptr(0)))
const supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "amd64"
const supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le"
// fastXORBytes xors in bulk. It only works on architectures that
// support unaligned read/writes.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment