
25 Oct
2005
25 Oct
'05
6:22 p.m.
Sebastian Sylvan wrote:
Also, you may use STArrays (I think they come in unboxed as well) for stateful code, which may be even faster (unless accumArray does some neat trick to make it O(m) where m is the number of index/value pairs).
The whole idea with having accumArray as part of the Array signature is exactly that it should be O(m). It's an operation you cannot define in "pure Haskell", i.e., Haskell without any extra types like STArray. -- Lennart