[Haskell-cafe] What does unpacking an MVar really mean?
Leon Smith
leon.p.smith at gmail.com
Tue Jul 31 19:18:57 CEST 2012
On Tue, Jul 31, 2012 at 7:37 AM, Bertram Felgenhauer <
bertram.felgenhauer at googlemail.com> wrote:
> Note that MVar# itself cannot be unpacked -- the StgMVar record will
> always be a separate heap object.
One could imagine a couple of techniques to unpack the MVar# itself, and
was curious if GHC might employ one of them.
So, really, unpacking the MVar does not eliminate a layer of indirection,
it just eliminates the need to check a pointer tag (and possibly execute a
thunk or follow some redirects if you don't have a pointer to an MVar#).
I think this is what I was ultimately after.
Best,
Leon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120731/fa4ba581/attachment.htm>
More information about the Haskell-Cafe
mailing list