]> Cypherpunks repositories - gostls13.git/commit
crypto/cipher: add VSX implementation of xorBytes for ppc64x
authorCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Wed, 19 Sep 2018 21:37:08 +0000 (18:37 -0300)
committerCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Thu, 1 Nov 2018 15:56:48 +0000 (15:56 +0000)
commit0ff6e5f1b48dfdff9ebf77796eeca1a5ec097def
tree43e846dd6949fd0cfd83ad65aa0c34536bccd285
parentf5b695030b857b079a4cbcfb79564ff933c0c8f2
crypto/cipher: add VSX implementation of xorBytes for ppc64x

This change adds asm implementations of xorBytes for ppc64x that
takes advantage of VSX registers and instructions.

name                   old time/op    new time/op     delta
XORBytes/8Bytes-8        16.4ns ± 0%     11.1ns ± 0%   -32.32%  (p=0.000 n=5+4)
XORBytes/128Bytes-8      45.6ns ± 0%     16.2ns ± 0%   -64.50%  (p=0.008 n=5+5)
XORBytes/2048Bytes-8      433ns ±13%      129ns ± 1%   -70.29%  (p=0.000 n=5+4)
XORBytes/32768Bytes-8    7.16µs ± 0%     1.83µs ± 0%   -74.39%  (p=0.008 n=5+5)

name                   old speed      new speed       delta
XORBytes/8Bytes-8       488MB/s ± 0%    721MB/s ± 0%   +47.75%  (p=0.016 n=5+4)
XORBytes/128Bytes-8    2.80GB/s ± 0%   7.89GB/s ± 0%  +181.33%  (p=0.008 n=5+5)
XORBytes/2048Bytes-8   4.77GB/s ±13%  15.87GB/s ± 0%  +232.68%  (p=0.016 n=5+4)
XORBytes/32768Bytes-8  4.58GB/s ± 0%  17.88GB/s ± 0%  +290.47%  (p=0.008 n=5+5)

Change-Id: Ic27d9b858f8ec2d597fdabc68a288d6844eba701
Reviewed-on: https://go-review.googlesource.com/c/145997
Run-TryBot: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
src/crypto/cipher/xor_generic.go
src/crypto/cipher/xor_ppc64x.go [new file with mode: 0644]
src/crypto/cipher/xor_ppc64x.s [new file with mode: 0644]