> Martin said it but nevertheless it might not be true. > > We observed similar very bad behaviour -- in a Web application server. > Apparently, the standard behaviour is far from optimal when the > system contains a large number of objects and occationally, large > numbers of objects are created in a short time. > We have seen such behaviour during parsing of larger XML documents, for > example (in our Web application).
I don't want to claim that the *algorithm* works for all typically applications well. I just claim that the *parameters* of it are fine. The OP originally proposed to change the parameters, making garbage collection run less frequently. This would a) have bad consequences in terms of memory consumption on programs that do have allocation spikes, and b) have no effect on the asymptotic complexity of the algorithm in the case discussed. It may well be that other algorithms would perform better, but none have been contributed. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list