[darcs-devel] What happened to Printer.lhs?

Juliusz Chroboczek jch at pps.jussieu.fr
Wed Feb 9 12:33:38 PST 2005


Hi,

In June 2004, after extensive profiling, I modified Printer to avoid
unpacking strings whenever possible.  The trick was to make Printer
work on strings of arbitrary tokens rather than just strings of
characters.  Profiling showed that that made the printer five times
faster than it previously was (GC times excluded) on darcs what
through a pipe, and almost two times faster when doing darcs what to a
terminal.

I recently happened to look at Printer again, and it turns out that
all of that work was replaced by some strange scheme based on ``Both''
strings and PackedStrings.  The change was apparently done by Ian
Lynagh (the original author of the Printer) on November 30.

Ian, have you done any profiling when you committed your change?  I
understand that you may feel that my version was too complex for you
to maintain; if so, however, I would like to suggest that you revert
to your original simple printer rather than using the current hybrid
scheme, unless profiling shows that it is significantly more efficient
than the original.

Additionally, I would have appreciated it if you could have sent me an
e-mail telling me why you undid my changes.

                                        Juliusz





More information about the darcs-devel mailing list