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.
Cheers, S.
_______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe