very true, but python makes it oh so easy to be lazy :-)On 4/24/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
On 4/23/06, "Martin v. Löwis" <[EMAIL PROTECTED]
> wrote:> Kirat Singh wrote:> > The reason I looked into this to begin with was that my code used up a> > bunch of memory which was tracea
On 4/23/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Kirat Singh wrote:
> > The reason I looked into this to begin with was that my code used up a
> > bunch of memory which was traceable to lots of little objects with
> > instance dicts, so it seemed that if instancedicts took less memory I
>
Kirat Singh wrote:
> The reason I looked into this to begin with was that my code used up a
> bunch of memory which was traceable to lots of little objects with
> instance dicts, so it seemed that if instancedicts took less memory I
> wouldn't have to go and add __slots__ to a bunch of my classes,
Interesting, thanks for the responses. And yeah I meant 1/3, I always mix up negatives.Agree that as you point out the biggest slowdown will be on classes that define their own __hash__, however since classes use instancedicts and this would reduce the dict size from 96 -> 64 bytes, we could blow 4
[Kirat Singh]
> Hi, this is my first python dev post, so please forgive me if this topic has
> already been discussed.
It's hard to find one that hasn't -- but it's even harder to find the
old discussions ;-)
> It seemed to me that removing me_hash from a dict entry would save 2/3 of
> the space
Kirat Singh wrote:
> Hi, this is my first python dev post, so please forgive me if this topic
> has already been discussed.
To my knowledge, this hasn't been discussed before.
> It seemed to me that removing me_hash from a dict entry would save 2/3
> of the space used by dictionaries and also imp
Hi, this is my first python dev post, so please forgive me if this topic has already been discussed.It seemed to me that removing me_hash from a dict entry would save 2/3 of the space used by dictionaries and also improve alignment of the entries since they'd be 8 bytes instead of 12. And sets end