Re: Does newByteArray clear?

2020-08-26 Thread Bertram Felgenhauer via Glasgow-haskell-users
David Feuer wrote: > I'm looking to play around with an array-based structure with > sub-linear worst-case bounds. Array is pretty awkward in that context > because creating a new one takes O(n) time to initialize it. Is that > all true of newByteArray, or can I get one with arbitrary garbage in

Re: What does freezing an array really do?

2020-08-20 Thread Bertram Felgenhauer via Glasgow-haskell-users
David Feuer wrote: > I know that a frozen array doesn't have to be searched for elements in > a younger generation, but how does it differ from an unfrozen array > that hasn't been mutated since the last collection? Frozen arrays are not put on the mutable list once they're clean (meaning they