RE: Help with a Shootout program

2005-02-25 Thread Bayley, Alistair
Here's your program, but a little slimmer. I think size counts for something in the shootout. Still runs at the same speed though :-( The program seems to spend about 50% reading the files, 22% building the hash table (7% chopping input into lines, 11% inserting into table), 25% spellchecking (11%

RE: Help with a Shootout program

2005-02-25 Thread Simon Marlow
On 25 February 2005 13:46, Alson Kemp wrote: >> Welcome to the club :-) >> http://www.mail-archive.com/glasgow-haskell-users@haskell.org/msg06012.h tml > I tried Simon's version, but it throws a "Fail: Ix{Int}.index: Index > (5) out of range ((0,4))" error. Haven't tracked down the cause ye

RE: Help with a Shootout program

2005-02-25 Thread Bayley, Alistair
> From: Simon Marlow [mailto:[EMAIL PROTECTED] > > PackedStrings are still slow in 6.x. I know there are various other > PackedString implementations out there, we just need to > incorporate one. They certainly seem to be. Below are the profiles (compiled with -O2; ran them twice; took the sec

Re: Help with a Shootout program

2005-02-25 Thread Alson Kemp
>Welcome to the club :-) >http://www.mail-archive.com/glasgow-haskell-users@haskell.org/msg06012.html I tried Simon's version, but it throws a "Fail: Ix{Int}.index: Index (5) out of range ((0,4))" error. Haven't tracked down the cause yet. So I guess that the upshot is just that

RE: Help with a Shootout program

2005-02-24 Thread Simon Marlow
On 24 February 2005 14:47, Carsten Schultz wrote: > The real performance problem propbably is not O(n) vs. O(n*log n) but > slow String operations in general. After all, String is a lazy list > of Char. Have a look at the thread mentioned above, possibly Simon's > version has become fast again,

Re: Help with a Shootout program

2005-02-24 Thread Carsten Schultz
Hi Alson! On Thu, Feb 24, 2005 at 07:40:49AM -0500, Alson Kemp wrote: > All, > In order to teach myself Haskell, I've been tinkering with some of > the Shootout (http://shootout.alioth.debian.org/great/) programs. Good idea. > Substantially improved the Mandelbrot program. Then started t

Help with a Shootout program

2005-02-24 Thread Alson Kemp
All, In order to teach myself Haskell, I've been tinkering with some of the Shootout (http://shootout.alioth.debian.org/great/) programs. Substantially improved the Mandelbrot program. Then started to work on the Spellcheck program, since Haskell seemed to do quite poorly at it. However,