[FFmpeg-devel] [PATCH 2/5] fate: avoid framemd5, use framecrc its faster
Nicolas George
nicolas.george at normalesup.org
Fri May 17 10:55:27 CEST 2013
L'octidi 28 floréal, an CCXXI, Michael Niedermayer a écrit :
> in that case comparing plain C of both against each other would be
> interresting too
> if openssl is faster in plain C too then we should consider completely
> replacing our code by it otherwise it would be better to keep our C
> code with openssls asm or something like that
I built openssl with:
./Configure no-asm linux-x86_64 shared --prefix=/tmp/ossl
and compared. Here are the result of the benchmark, doctored to have both
OpenSSL asm and OpenSSL no-asm together:
lavu MD5 size: 1048576 runs: 1024 time: 8.212 +- 0.121
openssl-noasm MD5 size: 1048576 runs: 1024 time: 5.424 +- 0.353
openssl-asm MD5 size: 1048576 runs: 1024 time: 5.085 +- 0.320
lavu SHA-1 size: 1048576 runs: 1024 time: 7.034 +- 0.227
openssl-noasm SHA-1 size: 1048576 runs: 1024 time: 8.194 +- 0.223
openssl-asm SHA-1 size: 1048576 runs: 1024 time: 4.694 +- 0.182
lavu SHA-224 size: 1048576 runs: 1024 time: 14.966 +- 0.431
openssl-noasm SHA-224 size: 1048576 runs: 1024 time: 17.409 +- 0.999
openssl-asm SHA-224 size: 1048576 runs: 1024 time: 12.882 +- 0.407
lavu SHA-256 size: 1048576 runs: 1024 time: 15.018 +- 0.866
openssl-noasm SHA-256 size: 1048576 runs: 1024 time: 17.391 +- 1.019
openssl-asm SHA-256 size: 1048576 runs: 1024 time: 12.921 +- 0.821
Clearly, their C MD5 is faster and there are tricks that may be borrowed.
OTOH, their C SHA are worse than lavu's, but there would be benefit in
importing / reimplementing an assembly version.
Regards,
--
Nicolas George
More information about the ffmpeg-devel
mailing list