>       Well, this was only my understanding and was qualified as
>       one of the things that were not clear to me. I still
>       have my doubts and I would really like to find some
>       authoritative answer instead of heresays about slugishness
>       of Haskell arrays that I see here and there on the net.

I can authoritatively say the following, about GHC at least:

- arrays are represented as contiguous memory

- indexing an array is a constant-time operation

- building an array, using an array comprehension, will usually involve
        the construction of an intermediate list.  This is inefficient,
        and can be deforested... but we have not invested the time to
        make this happen reliably

>       See for example, "Implementing the conjugate gradient
>       algorithm" by P.R. Serrarens, http://www.cs.kun.nl/~pascalrs/ 
>       He very definitely dismisses Haskell arrays as unsuitable for
>       scientific computations. He used GHC - optimized compiler
>       after all. On the other hand, he speaks highly of Haskell lists.

The Clean folk have made arrays a priority and they have done a fine job.
I think that most of the reason GHC is poor by any absolute measure
is that we have not made it a priority, rather than any fundamental
reason.  Perhaps we should up the priority!

Simon


Reply via email to