mirror of
https://github.com/golang/go
synced 2024-11-23 05:40:04 -07:00
crypto/subtle: use PCALIGN in xorBytes
goos: linux
goarch: amd64
pkg: crypto/subtle
cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
│ master │ HEAD │
│ sec/op │ sec/op vs base │
XORBytes/8Bytes-8 10.90n ± 1% 10.96n ± 5% ~ (p=0.617 n=10)
XORBytes/128Bytes-8 14.85n ± 2% 12.05n ± 2% -18.82% (p=0.000 n=10)
XORBytes/2048Bytes-8 88.30n ± 2% 72.64n ± 1% -17.73% (p=0.000 n=10)
XORBytes/32768Bytes-8 1.489µ ± 2% 1.442µ ± 1% -3.12% (p=0.000 n=10)
geomean 67.91n 60.99n -10.19%
│ master │ HEAD │
│ B/s │ B/s vs base │
XORBytes/8Bytes-8 700.5Mi ± 1% 696.5Mi ± 5% ~ (p=0.631 n=10)
XORBytes/128Bytes-8 8.026Gi ± 2% 9.890Gi ± 2% +23.22% (p=0.000 n=10)
XORBytes/2048Bytes-8 21.60Gi ± 2% 26.26Gi ± 1% +21.55% (p=0.000 n=10)
XORBytes/32768Bytes-8 20.50Gi ± 2% 21.16Gi ± 1% +3.21% (p=0.000 n=10)
geomean 7.022Gi 7.819Gi +11.34%
For #63678
Change-Id: I3996873773748a6f78acc6575e70e09bb6aea979
GitHub-Last-Rev: d9129cb8ea
GitHub-Pull-Request: golang/go#63754
Reviewed-on: https://go-review.googlesource.com/c/go/+/537856
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
7546c79e91
commit
29b80397a8
@ -18,6 +18,7 @@ TEXT ·xorBytes(SB), NOSPLIT, $0
|
|||||||
aligned:
|
aligned:
|
||||||
MOVQ $0, AX // position in slices
|
MOVQ $0, AX // position in slices
|
||||||
|
|
||||||
|
PCALIGN $16
|
||||||
loop16b:
|
loop16b:
|
||||||
MOVOU (SI)(AX*1), X0 // XOR 16byte forwards.
|
MOVOU (SI)(AX*1), X0 // XOR 16byte forwards.
|
||||||
MOVOU (CX)(AX*1), X1
|
MOVOU (CX)(AX*1), X1
|
||||||
@ -28,6 +29,7 @@ loop16b:
|
|||||||
JNE loop16b
|
JNE loop16b
|
||||||
RET
|
RET
|
||||||
|
|
||||||
|
PCALIGN $16
|
||||||
loop_1b:
|
loop_1b:
|
||||||
SUBQ $1, DX // XOR 1byte backwards.
|
SUBQ $1, DX // XOR 1byte backwards.
|
||||||
MOVB (SI)(DX*1), DI
|
MOVB (SI)(DX*1), DI
|
||||||
|
Loading…
Reference in New Issue
Block a user