[m-dev.] An optimization worth doing.

Fergus Henderson fjh at cs.mu.oz.au
Mon Feb 10 11:13:21 AEDT 1997


Thomas Charles CONWAY, you wrote:
> 
> Now, because in both cases we want the first field (irrespective
> of the tag), it would be cheaper to simply mask off the tag at
> runtime (use an expression equivalent to (ptr & (!0x07))[0]) to
> avoid the branch.

This optimization would also be a very useful for red-black trees.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list