[Python-Dev] Int FutureWarnings and other 2.4 TODOs

Aahz aahz at pythoncraft.com
Sun Dec 7 20:04:54 EST 2003

On Mon, Dec 08, 2003, Delaney, Timothy C (Timothy) wrote:
> From: Aahz
>> Hmmmm...  How important is the "less memory" angle versus the "faster"
>> angle?  Why not just add a few bytes to the long type to store an int?
>> If you're using the int, the pointer is NULL, and you're saving that
>> memory, at least.  The only harm is some extra memory in the type
>> object.
> One thing I can immediately think of is that you're likely to see
> cache effects much sooner. In that case, you'll probably find that
> you've ended up with higher memory usage *and* lower performance. The
> best of both worlds :)

While there's generally some truth to that, I have a suspicion that the
tricks we'll need to perform in order hide the int/long dichotomy at the
Python level will also be cache-unfriendly.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.

More information about the Python-Dev mailing list