[erlang-questions] erlang:md5/1 vs crypto:md5/1 difference: speed
Scott Lystig Fritchie
Sat Jan 31 05:43:01 CET 2009
Hi, all. Two years ago, Roberta Saccon asked a question of the
difference between erlang:md5/1 vs crypto:md5/1.
One answer was, "none." Another answer was, "You need to start the
crypto application before calling crypto:md5/1."
I've discovered a third answer: speed. On a newer Intel Xeon single
CPU, dual-core box @ 2.33GHz, and on an AMD X2 single CPU, dual-core
box, crypto:md5/1 is 3.0-3.5 times faster on a 64KByte blob than
erlang:md5. On an older 3.4GHz single core Xeon, the difference is over
almost 7x, and on a several-year-old Pentium M laptop @ 1.33GHz, the
difference is 8x.(*)
I'm curious ... do others see similar differences? Or is erlang:md5/1
faster on some platforms, e.g. PowerPC?
(*) All of these builds have included OpenSSL 0.9.6something or 0.9.7a.
Without it, the crypto app won't be built.
More information about the erlang-questions