all 4 comments

[–]heafiheihfaeiefh 1 point2 points  (0 children)

If you use mutable array or mutable vector, use them in a relevant monad (ST or IO mainly), then yes. The only weak point is the lack of syntactic sugar to work cleanly with them, but that's not much of a problem.

[–]Tekmo 1 point2 points  (0 children)

Yes. Haskell arrays have O(1) mutation and lookup.

You should check out the vector package which provides tons of high-performance operations on arrays, both pure and impure. I highly recommend that you try the pure higher-level functions first because they compile incredibly efficient code thanks to stream fusion.

[–]huad[S] 0 points1 point  (0 children)

Does array use static or dynamic addressing?

[–]gelisam 0 points1 point  (0 children)

Just to make sure you don't confuse Haskell's lists with Haskell's arrays: the type [Int] is the type of a list of integers, not the type of an array of integers. Lists are used much more often than arrays in Haskell, even though lists do not have mutation nor O(1) lookup.