[Python-Dev] Re: Re: Int FutureWarnings and other 2.4 TODOs (original) (raw)
Michael Hudson mwh at python.net
Thu Dec 4 10:45:11 EST 2003
- Previous message: [Python-Dev] Re: Re: Int FutureWarnings and other 2.4 TODOs
- Next message: [Python-Dev] Re: Re: Int FutureWarnings and other 2.4 TODOs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Phillip J. Eby" <pje at telecommunity.com> writes:
At 09:36 AM 12/4/03 -0500, Andrew Koenig wrote:
So here's the strategy: If the low-order bit of an integer is off, it's really a pointer to the rest of the implementation. If the low-order bit is on, then it represents an integral value that can be obtained by doing a one-bit arithmetic right shift.
Yes, it's sleazy. But I imagine it would be much faster than using inheritance. I imagine it wouldn't, because it'd add an extra test to not only every PyINCREF and PyDECREF, but every PyObjectsomething call.
It wouldn't have to be that bad if you put the pointer/int thingy in the ob_ival slot.
Cheers, mwh
-- The only problem with Microsoft is they just have no taste. -- Steve Jobs, (From Triumph of the Nerds PBS special) and quoted by Aahz on comp.lang.python
- Previous message: [Python-Dev] Re: Re: Int FutureWarnings and other 2.4 TODOs
- Next message: [Python-Dev] Re: Re: Int FutureWarnings and other 2.4 TODOs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]