Barry Gershenfeld wrote:
I originally understood that you ran the k3b md5'er separately. I guess
this isn't possible, which is, (say it with me) un-Unix-like. So maybe
someone who thinks C++ is easy, and the source clear and simple, can compile
us a standalone "kmd5" program to test with.
Done. I stripped out all the Qt/KDE bits to make it easier to build. The code is at:
http://rijmen.xman.org/md5bench.tar.bz2
I didn't spend any time optimizing this, and in particular, I think the I/O could most definitely be tuned. I also probably could more carefully select compiler optimizations and use something cleaner than the evil hack I used for writing out the hash values, but all-in-all, I expect it's a fair representation of the kind of performance you can get from this stuff. I compiled with:
g++ -O3 -o md5bench kmdcodec.cpp md5bench.cpp
Performance is about 25% slower than md5sum. Not great, but certainly much less than the kind of performance differences we're talking about. I haven't profiled it, but I'd be willing to bet most of the lost time is not spent doing md5 calculations.
--Chris -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
