Do we have free bits in the info pointer itself?

Ryan Newton rrnewton at gmail.com
Thu Sep 8 04:42:06 UTC 2016


>
> What did you intend to use the high bits for?
>

Nothing right now.  Just speculation.

I was actually pondering how our headers are rather svelte compared to many
languages.  Java, for instance, saves a full word for a hash.

There are endless bits of metadata to speculate about...

   - whether or not the heap object is frozen to disallow further
   modification (e.g. for MutVars)
   - whether or not the heap object is part of a contiguous CNF
   - a flag to invoke some alternate GC behavior
   - metadata to avoid dereferencing the info table pointer in some
   circumstances (common type tags?)
   - you could even index 2^16 per-type values that live off of the info
   table

But most likely it would have to be something that would give across the
board perf improvements that would pay for the extra cost in masking.  Good
point re: HW prefetching.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160908/b3e300d1/attachment.html>


More information about the ghc-devs mailing list