Commit Graph

1 Commits (707117aef03894eaa3e93fd1b89c53490a6a3a95)

Author SHA1 Message Date
Gustavo Serra Scalet 3f128e4667 Improved sha256 performance on ppc64 by 4x
Results: I removed the other hash algorithm on test.cpp and gave as an
input a ~700MB file.

Upstream:
$ time ./cryptest.exe m ~/ubuntu-16.10-server-ppc64el.iso
SHA-256: d14bdb413ea6cdc8d9354fcbc37a834b7de0c23f992deb0c6764d0fd5d65408e

real    0m18.811s
user    0m18.456s
sys     0m0.356s

This patch:
$ time ./cryptest.exe m ~/ubuntu-16.10-server-ppc64el.iso
SHA-256: d14bdb413ea6cdc8d9354fcbc37a834b7de0c23f992deb0c6764d0fd5d65408e

real    0m4.158s
user    0m3.992s
sys     0m0.168s

This approach used altivec + VSX instructions found on POWER8 systems
and newer.

If unwanted on PPC, "cmake" it with -DDISABLE_ALTIVEC=1 or "make" it
with USE_ALTIVEC=0.
2017-03-20 08:56:23 -03:00