[New-bugs-announce] [issue2185] code objects should conserve memory

Neal Norwitz report at bugs.python.org
Mon Feb 25 03:41:40 CET 2008

New submission from Neal Norwitz:

Various bits are often duplicated in code objects.  For example,
sometimes names and varnames are equal.  In this case, we don't need two
objects since they are both const.  This patch implements a trivial fix
for this case.  However, there are more cases.  We should profile where
the memory is being used and do simple/cheap consolidations where
possible.  Another example would be a 1-element tuple containing:
(None,) for consts.

Some (all?) of these sorts of optimizations should probably be done in
the code object itself.

files: marshal-mem.patch
keywords: patch, patch
messages: 62965
nosy: nnorwitz
severity: normal
status: open
title: code objects should conserve memory
type: resource usage
versions: Python 2.6
Added file: http://bugs.python.org/file9547/marshal-mem.patch

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list