lavu/sha: Fully unroll the transform function loops
authorJames Almer <jamrial@gmail.com>
Mon, 9 Sep 2013 23:16:39 +0000 (20:16 -0300)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Sep 2013 19:55:59 +0000 (21:55 +0200)
commit7e4fe5162ab94a413e04caae19193c5e7a4c6478
tree2536c44ebb788333459e5040c7066c738235c992
parenta8e00cf926f34e91d5694cd4e3a5ada6677058fd
lavu/sha: Fully unroll the transform function loops

crypto_bench SHA-1 and SHA-256 results using an AMD Athlon X2 7750+, mingw32-w64 GCC 4.7.3 x86_64

Before:
lavu       SHA-1        size: 1048576  runs:   1024  time:    9.012 +- 0.162
lavu       SHA-256      size: 1048576  runs:   1024  time:   19.625 +- 0.173

After:
lavu       SHA-1        size: 1048576  runs:   1024  time:    7.948 +- 0.154
lavu       SHA-256      size: 1048576  runs:   1024  time:   17.841 +- 0.170

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/sha.c