[Toybox] md5sum cleanup

Ivo van Poorten ivopvp at gmail.com
Sat Jun 7 07:39:10 PDT 2014


On Sat, 7 Jun 2014 15:36:27 +0200 Ivo van Poorten <ivopvp at gmail.com>
wrote:
> On Sun, 01 Jun 2014 12:00:08 -0500 Rob Landley <rob at landley.net>
> wrote:
> > On 05/15/14 11:50, Ivo van Poorten wrote:
> > > cur-hg      8.6
> > > daniel      6.7
> > > ivo         4.9
> > > md5sum      2.8
> > > openssl     2.7
> 
> The attached patch averages out to 3.2s on the same dataset and cpu.
> [bloatcheck] total                         1448
> 
> [...]
> Perhaps the memcpy() is becoming a bottleneck.

Here's the same, but with memcpy largely removed (only used for partial
frames). Speed averages to 3.0s and it adds less bloat, probably
because it can keep the buffer pointer in a register between calls.

BTW sha1sum could use a similar treatment. Currently it is 4x slower
than gnu's sha1sum :)

Regards,
Ivo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: md5sum-ivo-unrolled-less-memcpy.patch
Type: text/x-diff
Size: 9196 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140607/0359da11/attachment-0002.patch>


More information about the Toybox mailing list