[issue2185] code objects should conserve memory

2008-03-15 Thread Neal Norwitz
Neal Norwitz [EMAIL PROTECTED] added the comment: Marshal is the wrong place for this sort of thing (the code object is where it should be done). I botched the analysis. The case is common, but only for the empty tuple which I forgot to ignore. (None,) was a common case when I measured it.

[issue2185] code objects should conserve memory

2008-02-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Since names and varnames are known to be tuples of interned strings, they can be compared without calling abstract API. Just compare sizes and then compare item pointers in a loop. What are the cases when co_names == co_varnames? How often is this the

[issue2185] code objects should conserve memory

2008-02-24 Thread Neal Norwitz
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