
2 Feb
2007
2 Feb
'07
8:44 a.m.
Hi, I am trying to improve the memory usage of regex-tdfa and I wanted to ask an array question. If I have two identical STUArrays (same type and bounds) then what is the most efficient way to overwrite the data in the destination with the data in the source? Does this work for STArrays? Is there a GHC only solution? Is there a way to avoid the long loop?
forM_ (range b) $ \index -> readArray source index >>= writeArray destination index
Is Data.Array.Storable the only route? I do not think Data.Array.Diff will work well since I have one source going to multiple destinations, each with a few different changes. -- Chris