RE Module Performance

Chris Angelico rosuav at gmail.com
Wed Jul 31 22:41:41 CEST 2013


On Wed, Jul 31, 2013 at 9:15 PM,  <wxjmfauth at gmail.com> wrote:
> ... char never consumes or requires more than 4 bytes ...
>

The integer 5 should be able to be stored in 3 bits.

>>> sys.getsizeof(5)
14

Clearly Python is doing something really horribly wrong here. In fact,
sys.getsizeof needs to be changed to return a float, to allow it to
more properly reflect these important facts.

ChrisA



More information about the Python-list mailing list