[Shootout-list] Sum a column of Integers (ghc)
Brent Fulgham
bfulg@pacbell.net
Sat, 02 Oct 2004 19:37:44 -0700
On 2004-10-02 18:52:08 -0700 Greg Buchholz
<sleepingsquirrel@yahoo.com> wrote:
> Here's a much faster version of the "Sum a Column of Integers"
> test for ghc. It's not quite as concise as the original, but I
> think it is still understandable and it is about 85 times faster.
> (BTW, does
> the mailing list prefer file attachments or just inline
> text for program code?)
I measure 395 secs versus 6.5 secs, which is around 65 times better.
Very nice!
I prefer file attachments because it avoids whitespace problems if I
cut and paste
into a buffer. Sometimes tabs/spaces can cause problems in
whitespace-sensitive
languages like Haskell and Python.
-Brent