[Haskell-cafe] compressed pointers?
ketil at malde.org
Fri Apr 18 02:44:53 EDT 2008
Don Stewart <dons at galois.com> writes:
> One small upside (performance wise), is that the bottom 3 bits of the
> pointer are now used to encode the constructor on 64 bits, so 'case' gets a
> good percent cheaper.
Well - my experience (which is from before this optimization was
added, I think) is that 64bit Haskell is slower than 32bit Haskell.
Anyway, I think this is an orthogonal issue - by limiting your program
to 4GB RAM, 4-byte alignment could give you two bits for pointer tagging
and 32 bit pointers. If you still do 8-byte alignment, there's no
In extremis, you could imagine several different models based on heap
size, with optimal choices for pointer size, alignment and tag bits.
If you shift the pointer, you could address up to 16G from 32 bits (by
using 8-byte alignment and one tag bit).
This probably becomes too complicated, but I thought it was
interesting that the Java people are making use of 32bit pointers on a
64bit system, and are seeing a good performance benefit from it.
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe