From: mental@... Date: 2005-11-18T00:40:08+09:00 Subject: Re: Object#to_b Quoting Trans : > > I don't see any way that it could be as efficient as the > current > > setup, where nil and false are immediate values and are checked > > with a simple bitmask. > > Could they get special object_id's that are easy to check? Like...? Currently, for 32-bit systems: false: 00000000000000000000000000000000 true: 00000000000000000000000000000010 nil: 00000000000000000000000000000100 undef: 00000000000000000000000000000110 Symbol: XXXXXXXXXXXXXXXXXXXXXXXX00001110 Object reference: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0 Fixnum: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1 That means we get 24 bits worth of symbols, 31 (signed) bits of fixnums, and 31-bit pointers to objects (so objects must be aligned on two-byte boundaries). -mental