[rproxy-devel] Re: rsync md4sum code.

Donovan Baarda abo at minkirri.apana.org.au
Sun Apr 28 07:00:02 EST 2002


On Sun, Apr 28, 2002 at 11:48:14PM +1000, Donovan Baarda wrote:
[...]
> Ok, preliminary results are in. Because I'm primarily interested in Python
> interface stuff at the moment, I chose to make my benchmark by hacking
> together swig wrappers for the libmd md4c.c and the librsync mdfour.c, and
> whipping up a python test rig. The wrappers should have identical overheads.
> I used pre-generated random data for the input.
> 
> The results for a Celeron-366 doing 10K md4sums on 4K blocks of random data
> are; libmd 3.1secs, librsync 2.5secs. Both gave identical checksum results
> so the bug Tridge found didn't rear it's head. 

Additional results; libmd native module based on existing python md5module
instead of using swig wrapper; 1.6secs.

> Conclusion: the librsync md4 is pretty fast. However, it was also slightly
> harder to swig-wrap in isolation from the rest of librsync, as it had a few
> tie-ins with the rs_trace stuff.

also, the C implemention matters far less than how you interface it with
Python. For the swig wrappers I was using shadow class's which adds an extra
level of indirection. It looks like for the swig tests, 1.5secs was
overhead, which makes the librsync md4 look even more impressive...

-- 
----------------------------------------------------------------------
ABO: finger abo at minkirri.apana.org.au for more info, including pgp key
----------------------------------------------------------------------




More information about the rsync mailing list