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.
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
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