On 29 June 2014 16:34, Jussi Kivilinna wrote:
> This patch adds ARM NEON assembly implementation of SHA-512 and SHA-384
> algorithms.
>
> tcrypt benchmark results on Cortex-A8, sha512-generic vs sha512-neon-asm:
>
> block-size bytes/updateold-vs-new
> 16 16 2.99x
> 64 16 2.67x
> 64 64 3.00x
> 256 16 2.64x
> 256 64 3.06x
> 256 256 3.33x
> 102416 2.53x
> 1024256 3.39x
> 102410243.52x
> 204816 2.50x
> 2048256 3.41x
> 204810243.54x
> 204820483.57x
> 409616 2.49x
> 4096256 3.42x
> 409610243.56x
> 409640963.59x
> 819216 2.48x
> 8192256 3.42x
> 819210243.56x
> 819240963.60x
> 819281923.60x
>
Nice speedup!
> Changes in v2:
> - Use ENTRY/ENDPROC
> - Don't provide Thumb2 version
>
Please move Changelog below '---'
> Signed-off-by: Jussi Kivilinna
Acked-by: Ard Biesheuvel
Tested-by: Ard Biesheuvel
Tested on Exynos-5250 (Cortex-A15)
ARM-asm
[ 1715.164122] testing speed of sha512
[ 1715.164150] test 0 ( 16 byte blocks, 16 bytes per update, 1
updates): 136277 opers/sec, 2180437 bytes/sec
[ 1718.159959] test 1 ( 64 byte blocks, 16 bytes per update, 4
updates): 126636 opers/sec, 8104746 bytes/sec
[ 1721.159962] test 2 ( 64 byte blocks, 64 bytes per update, 1
updates): 136605 opers/sec, 8742720 bytes/sec
[ 1724.159958] test 3 ( 256 byte blocks, 16 bytes per update, 16
updates): 41576 opers/sec, 10643541 bytes/sec
[ 1727.159957] test 4 ( 256 byte blocks, 64 bytes per update, 4
updates): 45984 opers/sec, 11771989 bytes/sec
[ 1730.159959] test 5 ( 256 byte blocks, 256 bytes per update, 1
updates): 47479 opers/sec, 12154794 bytes/sec
[ 1733.159977] test 6 ( 1024 byte blocks, 16 bytes per update, 64
updates): 13410 opers/sec, 13731840 bytes/sec
[ 1736.160027] test 7 ( 1024 byte blocks, 256 bytes per update, 4
updates): 15916 opers/sec, 16298325 bytes/sec
[ 1739.159975] test 8 ( 1024 byte blocks, 1024 bytes per update, 1
updates): 16095 opers/sec, 16481280 bytes/sec
[ 1742.159993] test 9 ( 2048 byte blocks, 16 bytes per update, 128
updates): 7042 opers/sec, 14423381 bytes/sec
[ 1745.159994] test 10 ( 2048 byte blocks, 256 bytes per update, 8
updates): 8438 opers/sec, 17281024 bytes/sec
[ 1748.159995] test 11 ( 2048 byte blocks, 1024 bytes per update, 2
updates): 8541 opers/sec, 17492650 bytes/sec
[ 1751.160001] test 12 ( 2048 byte blocks, 2048 bytes per update, 1
updates): 8560 opers/sec, 17531562 bytes/sec
[ 1754.159975] test 13 ( 4096 byte blocks, 16 bytes per update, 256
updates): 3612 opers/sec, 14794752 bytes/sec
[ 1757.160103] test 14 ( 4096 byte blocks, 256 bytes per update, 16
updates): 4350 opers/sec, 17820330 bytes/sec
[ 1760.160122] test 15 ( 4096 byte blocks, 1024 bytes per update, 4
updates): 4405 opers/sec, 18042880 bytes/sec
[ 1763.159957] test 16 ( 4096 byte blocks, 4096 bytes per update, 1
updates): 4463 opers/sec, 18280448 bytes/sec
[ 1766.160049] test 17 ( 8192 byte blocks, 16 bytes per update, 512
updates): 1829 opers/sec, 14988629 bytes/sec
[ 1769.160328] test 18 ( 8192 byte blocks, 256 bytes per update, 32
updates): 2209 opers/sec, 18101589 bytes/sec
[ 1772.160318] test 19 ( 8192 byte blocks, 1024 bytes per update, 8
updates): 2238 opers/sec, 18333696 bytes/sec
[ 1775.160278] test 20 ( 8192 byte blocks, 4096 bytes per update, 2
updates): 2245 opers/sec, 18393770 bytes/sec
[ 1778.160025] test 21 ( 8192 byte blocks, 8192 bytes per update, 1
updates): 2267 opers/sec, 18576725 bytes/sec
ARM-neon
=
[ 1810.729100] testing speed of sha512
[ 1810.729130] test 0 ( 16 byte blocks, 16 bytes per update, 1
updates): 330941 opers/sec, 5295066 bytes/sec
[ 1813.724958] test 1 ( 64 byte blocks, 16 bytes per update, 4
updates): 277607 opers/sec, 17766890 bytes/sec
[ 1816.724958] test 2 ( 64 byte blocks, 64 bytes per update, 1
updates): 330251 opers/sec, 21136085 bytes/sec
[ 1819.724956] test 3 ( 256 byte blocks, 16 bytes per update, 16
updates): 89849 opers/sec, 23001429 bytes/sec
[ 1822.724961] test 4 ( 256 byte blocks, 64 bytes per update, 4
updates): 113344 opers/sec, 29016149 bytes/sec
[ 1825.724963] test 5 ( 256 byte blocks, 256 bytes per update, 1
updates): 127466 opers/sec, 32631381 bytes/sec
[ 1828.724960] test 6 ( 1024 byte blocks, 16 bytes per update, 64
updates): 27818 opers/sec, 28485632 bytes/sec
[ 1831.724984] test 7 ( 1024 byte blocks, 256 bytes per update,