
Someone on IRC talked about how md5 seemed so slow to him. To which I answered on a whim that he could try openssl md5
to see if it was faster.
A few moments later, I realized this might really be true, so I did an (completely unscientific) test:
First check /sbin/md5 speed:
ice:~>md5 -t
MD5 time trial. Digesting 100000 10000-byte blocks ... done
Digest = 766a2bb5d24bddae466c572bcabca3ee
Time = 16.492340 seconds
Speed = 60751261.054943 bytes/second
Then openssl md5 speed:
ice:~>openssl speed | grep -E 'md5 .* 1024'
Doing md5 for 3s on 1024 size blocks: 210230 md5's in 3.00s
Ok, that makes (210230×1024 / 3) bytes/second. Les see....
ice:~>dc
210230 1024 * 3 / p
71758506
60751261 4k / p
1.1811
Wow. Openssl md5 is 18% faster. A short test with an 700MB file resulted in 26.6 vs 21.4 seconds (best of three), which sort of proves the difference.