]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Backport:
authorGuido van Rossum <guido@python.org>
Thu, 1 Aug 2002 19:05:07 +0000 (19:05 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 1 Aug 2002 19:05:07 +0000 (19:05 +0000)
commit00fc1a4ed0fbf8182440fae10f8b1b2b24710a17
treedbe5a171fc2cd82bcf91068c7fe473c137cc578d
parentf75ba0b6e595e97246b00f76e4fabb24ca05bc9f
Backport:

Tim found that once test_longexp has run, test_sort takes very much
longer to run than normal.  A profiler run showed that this was due to
PyFrame_New() taking up an unreasonable amount of time.  A little
thinking showed that this was due to the while loop clearing the space
available for the stack.  The solution is to only clear the local
variables (and cells and free variables), not the space available for
the stack, since anything beyond the stack top is considered to be
garbage anyway.  Also, use memset() instead of a while loop counting
backwards.  This should be a time savings for normal code too!  (By a
probably unmeasurable amount. :-)
Objects/frameobject.c