On 18/08/11 11:47, Johan Tibell wrote:
On Thu, Aug 18, 2011 at 12:43 PM, Alexander Kjeldaas
<alexander.kjeld...@gmail.com>  wrote:
Unaligned word-sized loads work fine on x86, and this would be x86-64 only,
or even Nehalem (and later) only.   Or,  from a cost perspective, it could
be interesting for non-Nehalem as well, as RAM is (usually) the most
expensive component when running a server.  (But anyways, developing
features for pre-Nehalem is slightly pointless IMHO).
So I guess the alignment would be per-architecture or a flag.  If it is
currently hardcoded, it would have to be configurable.
Alexander

I think problem is that there's code that's shared between all
platforms that rely on the alignment. This code would have to be
parameterized by the platform. It's potentially a very big task.

Right, it's a big job. The word-sized unit of allocation is fairly deeply wired in.

Still, it's an interesting idea, and not impossible. Objects would have to start on a word boundary due to pointer tagging as Ben points out, but within an object smaller pointers could be used. But isn't it 48-bit pointers, not 40-bit? (48-bit pointers aren't quite so good, because a cons cell spills over into 3 words rather than squeezing into 2). And pointer loads would be slower, as we'd have to mask the upper bits.

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to