Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread Benjamin Peterson
Lothar Werzinger tradescape.biz> writes: > Wow, that really MAKES a difference! Thanks a lot! You should also try Python 2.7 or 3.1. We've recently optimized the garabage collector for situations where many objects are being created. -- http://mail.python.org/mailman/listinfo/python-list

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread Lothar Werzinger
Peter Otten wrote: > Lothar Werzinger wrote: >> Can anyone explain this oddity? Any insight is highly appreciated. > > When you are creating objects like there is no tomorrow Python's cyclic > garbage collections often takes a significant amount of time. The first > thing I'd try is therefore swi

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread Peter Otten
Lothar Werzinger wrote: > I am trying to load files into a dictionary for analysis. the size of the > dictionary will grow quite large (several million entries) and as > inserting into a dictionary is roughly O(n) I figured if I loaded each > file into it's own dictionary it would speed things up.

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread MRAB
Lothar Werzinger wrote: Hi, I am trying to load files into a dictionary for analysis. the size of the dictionary will grow quite large (several million entries) and as inserting into a dictionary is roughly O(n) I figured if I loaded each file into it's own dictionary it would speed things up

Oddity with large dictionary (several million entries)

2010-04-27 Thread Lothar Werzinger
Hi, I am trying to load files into a dictionary for analysis. the size of the dictionary will grow quite large (several million entries) and as inserting into a dictionary is roughly O(n) I figured if I loaded each file into it's own dictionary it would speed things up. However it did not. So