Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] The tag bit
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier_Pérès <olivier.peres@l...>
Subject: Re: [Caml-list] The tag bit
Bauer, Christoph wrote:
> Of couse this is just a naive idea, but please tell me why ;-)

    Well, I can see several reasons :
  * processors like powers of two, especially when it comes to the size 
of a memory address, because of cache issues, so you'd better make it 32 
or 64 words than 33 or 65.
  * If the tag bit can be anywhere in a word you have to spend extra 
time to extract it, whereas when it is at a fixed place, especially LSB 
or MSB, it is very cheap and easy.
  * You would need two registers to access a value and its tag instead 
of one, and registers are very precious, at least on IA-32 architectures.

    Olivier.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners