haskell array access

Sven Panne Sven.Panne@informatik.uni-muenchen.de
Fri, 27 Jun 2003 00:07:27 +0200

Well, part of the answer is definitely that the Haskell program is the
*only* one which really uses the array elements. :-) I guess that the
compilers for the other languages simply remove the array access from
the generated code (gcc definitely does, only an empty loop remains).

Another reason is that the type signatures are missing, so Integer is
used instead of Int, which is a bit unfair. Adding

    k :: Array Int Int
    acc :: Int -> Int

cuts down the time by more than factor 5 on my machine.