Jon Smirl wrote:
> On Sun, 06 Aug 2006 15:33:30 -0700, John Machin wrote:
[snip..]
> >
> > Do you have an application with a performance problem? If so, what makes
> > you think inserting 1M items into a Python dict is contributing to the
> > problem?
>
> I know in advance how many items will be a
On Mon, 07 Aug 2006 00:33:33 -0400, Tim Peters wrote:
> ...
>
> [Jon Smirl]
>> I know in advance how many items will be added to the dictionary. Most
>> dictionary implementations I have previously worked with are more
>> efficient if they know ahead of time how big to make their tables.
>
> Ric
...
[Jon Smirl]
> I know in advance how many items will be added to the dictionary. Most
> dictionary implementations I have previously worked with are more
> efficient if they know ahead of time how big to make their tables.
Richard Jones spent considerable time investigating whether
"pre-sizing
On Sun, 06 Aug 2006 15:33:30 -0700, John Machin wrote:
> Jon Smirl wrote:
>> Is there some way to tell a dictionary object that I am going to load 1M
>> objects into it and have it pre-allocate enought slots to hold all of
>> the entries?
>
> Not according to the manual.
>
> Not according to the
Jon Smirl wrote:
> Is there some way to tell a dictionary object that I am going to load 1M
> objects into it and have it pre-allocate enought slots to hold all of the
> entries?
Not according to the manual.
Not according to the source [as at 2.4.3]. In any case, if there were a
back-door undocum
Is there some way to tell a dictionary object that I am going to load 1M
objects into it and have it pre-allocate enought slots to hold all of the
entries? Thus avoiding many thousand memory allocations.
Jon Smirl
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list