[darcs-devel] FastPackedString issues

Donald Bruce Stewart dons at cse.unsw.edu.au
Sat Aug 27 04:42:13 PDT 2005


droundy:
> On Sat, Aug 27, 2005 at 05:10:50PM +1000, Donald Bruce Stewart wrote:
> > Further on the FastPackedString code, I've reimplemented pscmp as
> > comparePS, to use memcmp. It is much faster (96%) on large (ie.. 100M
> > strings), and uses around 1/5 the space (though space before wasn't
> > bad). Performance of == is basically unchanged.
> > 
> > I thought this worth submitting back to darcs, although I'm not sure how
> > important a fast compare is to darcs.
> 
> Indeed, the code looks simpler, smaller and faster... hard to argue with
> that! (And hard to beat memcmp in speed...)  Have you checked that it gives
> the same results? I would imagine so, but it seems worth asking...

Yep, I've got some QuickCheck properties and HUnit testing set up in the
fps package, and everything appears to make sense. Also, it doesn't seem
to break any darcs tests.

> I'd prefer that this one goes through unstable (since it's not a bugfix or
> critical performance fix), so hopefully Ian will take a look at it and
> approve it.

No worries :)

-- Don




More information about the darcs-devel mailing list