[issue2292] Missing *-unpacking generalizations

Thomas Wouters report at bugs.python.org
Mon Apr 7 23:33:31 CEST 2008


Thomas Wouters <thomas at python.org> added the comment:

I don't think the order in which the items are hashed is really what
Raymond was worried about. Rather, the size of the stack was, and the
effect of having all the items on the stack at the same time. I think
Raymond is wrong in this case; while the stack may grow relatively big,
we're only talking two pointers here. The items will all have to be
created anyway, and in the usual case the number of duplicate keys is low. 

My patch actually includes pretty much the same change to BUILD_MAP,
because it greatly simplifies the compiler code and gets rid of a lot of
extra opcodes -- causing an overal speedup even in the face of large
dict literals. But I guess we should take it up with Raymond at some
point, perhaps as part of the PEP discussion.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2292>
__________________________________


More information about the Python-bugs-list mailing list