[Python-Dev] Re: [Python-checkins] python/dist/src/Python compile.c, 2.311, 2.312 (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Tue Aug 3 17:37:16 CEST 2004


Guido van Rossum wrote:

Aha! So maybe we should reconsider whether mwh's removal of the filename interning in the compiler should be reverted.

I just looked at the sizes of the four largest .pyc files wrt. to this change (ie. the one generated before 2.312, and the one generated after):

              before            after

pydoc 84711 91263 cookielib 57353 57353 pickletools 55862 57038 tarfile 54074 58974

So the patch does cause a size increase (and likely also a slowdown because of the extra memory allocations at startup). Whether this is relevant or not, I don't know.

I think I would prefer if a different mechanism was found to account for the change in references during an import, e.g. by taking the number of interned strings before and after the import operation.

Regards, Martin



More information about the Python-Dev mailing list