[Haskell-cafe] Array creation in constant time

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Thu Dec 4 16:42:50 UTC 2014


Hi,

I want to create an array without initializing its elements, so that
array creation takes constant time (modulo heap management). What are
possible approaches for this? I thought about using newArray_ with the
IOUArray type. Is this guaranteed to not initialize any elements and run
in O(1)? Are there other ways?

All the best,
Wolfgang



More information about the Haskell-Cafe mailing list