I\'m playing with Haskell and Project Euler\'s 23rd problem. After solving it with lists I went here where I saw some array work. This solution was much faster than mine. S
And if you're doing much indexing as well as much updating,you can
Maps (or IntMaps), O(log size) indexing and update, good enough for most uses, code easy to get rightMaps are too slow, use mutable (unboxed) arrays (STUArray from Data.Array.ST or STVectors from the vector package; O(1) indexing and update, but the code is easier to get wrong and generally not as nice.For specific uses, functions like accumArray give very good performance too (uses mutable arrays under the hood).