GC is very expensive: am I doing something wrong?

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Mon Mar 22 00:36:35 CET 2010

In message <mailman.963.1268958842.23598.python-list at python.org>, Terry 
Reedy wrote:

> No one has discovered a setting
> of the internal tuning parameters for which there are no bad patterns
> and I suspect there are not any such. This does not negate Xavier's
> suggestion that a code change might also solve your problem.

Could it be that for implementing a structure like a trie as the OP is, 
where a lot of CPU cycles can be spent manipulating the structure, a high-
level language like Python, Perl or Ruby just gets in the way?

My feeling would be, try to get the language to do as much of the work for 
you as possible. If you can’t do that, then you might be better off with a 
lower-level language.

More information about the Python-list mailing list