[EMAIL PROTECTED] wrote: > thanks for your replies :) > > so i just have tried, even if i think it will not go to the end => i > was wrong : it is around 1.400.000 entries by dict... > > but maybe if keys of dicts are not duplicated in memory it can be done > (as all dicts will have the same keys, with different (count) values)?
Definitely a good strategy. The easiest way is to use intern(key) when storing the values. (This will only work if you are using 8bit strings. You'll have to maintain your own object cache if you are using unicode). I've reduced the memory requirements of very similar apps this way. -Mike -- http://mail.python.org/mailman/listinfo/python-list