On Sun, Jan 29, 2017 at 10:44:49PM +0100, Kurt Roeckx wrote: > On Sun, Jan 29, 2017 at 09:09:56PM +0000, Greg Rubin wrote: > > Mind running the timings with the legacy interfaces as well? We may > > determine that the speed benefits are outweighed by the risks and > > complexities of an older API, but it would be good to have the data so we > > can make an informed decision. > > > > https://www.openssl.org/docs/man1.0.2/crypto/md5.html > > https://www.openssl.org/docs/man1.0.2/crypto/sha.html > > On an i5-2500 @ 3.3 GHz, with openssl 1.0.1t: > openssl speed md5 sha1: > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > md5 57722.54k 170970.22k 379334.74k 545487.19k 625227.09k > sha1 67990.28k 189759.61k 407470.34k 571764.74k 649565.53k > > openssl speed -evp md5 sha1: > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > md5 69949.09k 196024.75k 407446.02k 561352.70k 628984.49k > sha1 67922.42k 189184.53k 407347.80k 571157.85k 649428.99k > > (Note that it changed the order of sha1 and md5, but I've made the order the > same) > > Instead with the 1.1.0d version: > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > 16384 bytes > md5 108391.99k 257522.09k 468072.79k 586233.51k > 633440.94k 636813.31k > sha1 105271.81k 253953.34k 485931.43k 629915.65k > 688802.47k 693933.40k > > vs: > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > 16384 bytes > md5 56006.90k 165390.34k 372050.26k 541776.48k > 626789.03k 631794.35k > sha1 106968.33k 259511.66k 491601.07k 631022.93k > 690307.07k 694250.15k
So in 1.1.0, not using the -evp switch actually makes the MD5 call use the legacy interface, and you'll get less overhead. Didn't really look at how things are implemented. Kurt _______________________________________________ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel