  ajb at spamcop.net ajb at spamcop.net Mon Sep 20 21:09:30 EDT
2004  G'day all.  Quoting Henning Thielemann <iakd0 at
clusterf.urz.uni-halle.de>:  > Efficiency is always a reason to
mess everything.  OTOH, when efficiency matters, it REALLY
matters.  (The flip side of this is that "efficiency" doesn't
always mean what you think it means.)  The problem is that the
current representation causes problems with text-heavy
applications.  Assume for a moment that Char is a 16-bit code
point.  Then under GHC, on a 32 bit architecture, [Char] uses
four times as much memory as an unboxed array of Char.  While
I'm not for scrounging cycles when it's not necessary to do so,
if a text-heavy Haskell program can only handle 25% of the data
of the equivalent program on the same computer written in
another language (say, ML), then that's a problem for Haskell.
And text processing is a very large, important area these days.
> But the inefficiency > applies to lists of every data type, so
why optimizing only Strings, why > n