Subject: Re: OpenSSL md5 vs. NetBSD md5
To: None <current-users@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: current-users
Date: 01/28/2004 13:15:46
Christian Biere wrote:

> can anyone confirm that OpenSSL's md5 uses only about half as much CPU/user
> time as NetBSD's own md5?
> 
> $ time /usr/bin/openssl md5 some-big-file
> $ time /usr/bin/md5 some-big-file

"It depends" :-)

For a 300ishMB file on a 2.8GHz SMP Xeon box:

	/usr/bin/openssl <hash>		/usr/bin/<hash>
md5	0.881u 1.351s 0:02.23 100.0%	 1.628u 2.407s 0:04.03  99.7%
sha1	3.039u 1.439s 0:04.47  99.7%	 5.104u 2.311s 0:07.41 100.0%
rmd160	3.051u 1.300s 0:04.35 100.0%	11.205u 2.171s 0:13.49  99.1%

For a 100ishMB file on a 600MHz MIPS box:

	/usr/bin/openssl <hash>		/usr/bin/<hash>
md5	2.031u 0.844s 0:02.95  97.2%	 2.180u 0.950s 0:03.13 100.0%
sha1	2.751u 0.844s 0:03.67  97.8%	 2.810u 0.943s 0:03.75 100.0%
rmd160	4.599u 0.759s 0:05.42  98.5%	 3.498u 0.962s 0:04.46  99.7%

These numbers were for the fastest of three tests for each case.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/