Does Haskell's `Data.Vector.Mutable.unsafeNew` zero the memory? -
the docs says new
"creates mutable vector of given length" , unsafenew
"creates mutable vector of given length. length not checked."
however this resolved github issue indicates unsafenew
not 0 memory while new
does.
which 1 it?
no, not in general. if click through source pretty clear:
https://hackage.haskell.org/package/vector-0.11.0.0/docs/src/data-vector-generic-mutable.html#new
new
unsafenew
addition of basicinitialize
.
Comments
Post a Comment