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.