| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Code contributed by Jiwon Seo.)
The documentation portion of the patch is being re-worked and will be
checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).
The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch. Further additions are
welcome from everyone. Please stress test this new feature as much as
possible before the alpha release.
|
| |
|
|
|
|
| |
separate equality tests. Now, all are set to their best timing.
|
|
|
|
| |
did not stand-up to additional timings.
|
| |
|
|
|
|
|
|
|
|
| |
pre-increment forms to post-increment forms. Post-incrementing
also eliminates the need for negative array indices for oparg fetches.
* In exception handling code, check for class based exceptions before
the older string based exceptions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BINARY_SUBSCR:
* invert test for normal case fall through
* eliminate err handling code by jumping to slow_case
LOAD_LOCALS:
* invert test for normal case fall through
* continue instead of break for the non-error case
STORE_NAME and DELETE_NAME:
* invert test for normal case fall through
LOAD_NAME:
* continue instead of break for the non-error case
DELETE_FAST:
* invert test for normal case fall through
LOAD_DEREF:
* invert test for normal case fall through
* continue instead of break for the non-error case
|
|
|
|
| |
Restores the self-documenting enum declaration.
|
|
|
|
|
| |
This allows multiple flags to be tested in a single compare
which eliminates unnecessary compares and saves a few bytes.
|
|
|
|
|
|
|
| |
tests of "why" against WHY_YIELD became useless. This patch removes them,
but assert()s that why != WHY_YIELD everywhere such a test was removed.
The test suite ran fine under a debug build (i.e., the asserts never
triggered).
|
|
|
|
|
| |
Revise the long comment that explained details of the magic number
in gory detail.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Backported to 2.3.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
def f(a):
if a:
print 5
else:
pass
|
| |
|
|
|
|
| |
Gives 30% speedup on "a,b=1,2" and 25% on "a,b,c=1,2,3".
|
| |
|
|
|
|
|
| |
new pattern for NEXTARG() is detected and optimized as a single (*short)
loading.
|
|
|
|
| |
Reduces loop overhead by an additional 10%.
|
|
|
|
|
| |
Makes it more likely that all loop operations are in the cache
at the same time.
|
|
|
|
|
| |
and a function call resulting in a 15% reduction of total loop overhead
(as measured by timeit.Timer('pass')).
|
|
|
|
|
|
|
|
|
|
| |
* Defer error handling for wrong number of arguments to the
unpack_iterable() function. Cuts the code size almost in half.
* Replace function calls to PyList_Size() and PyTuple_Size() with
their smaller and faster macro counterparts.
* Move the constant structure references outside of the inner loops.
|
|
|
|
|
| |
Add a new opcode, LIST_APPEND, and apply it to the code generation for
list comprehensions. Reduces the per-loop overhead by about a third.
|
|
|
|
|
| |
is too expensive on FreeBSD's KSE threading infrastructure and
even test_threadedimport fails on default setting.
|
| |
|
|
|
|
|
| |
and add flag comments to ceval.c and main.c alerting people to the coupling
between pystack and the layout of those files.
|
|
|
|
|
| |
Remove the ability to use (from C) arbitrary objects supporting the
read buffer interface as the co_code member of code objects.
|
| |
|
|
|
|
|
|
|
|
|
| |
(Contributed by Andrew I MacIntyre.)
disables opcode prediction when dynamic execution
profiling is in effect, so the profiling counters at
the top of the main interpreter loop in eval_frame()
are updated for each opcode.
|
|
|
|
| |
Python/thread_pthread.h.
|
|
|
|
|
|
| |
Simplified version of Neal Norwitz's patch which adds gotos for
opcodes that set "why". This skips a number of tests where the
outcome of the tests are known in advance.
|
|
|
|
| |
(SF patch 876178, patch by mwh, unittest by perky)
|
| |
|
| |
|
|
|
|
|
| |
Formerly, the length was only fetched from sequence objects.
Now, any object that reports its length can benefit from pre-sizing.
|
|
|
|
|
| |
Formerly, the length was only fetched from sequence objects.
Now, any object that reports its length can benefit from pre-sizing.
|
| |
|
| |
|
|
|
|
| |
sorted() becomes a regular function instead of a classmethod.
|
|
|
|
| |
remain deprecated in the documentation.
|
|
|
|
|
|
|
| |
comments about why both calls to cyclic gc here can cause problems.
I'll backport to 2.3 maint. Since the calls were introduced in 2.3,
that will be the end of it.
|
|
|
|
|
|
|
|
|
|
| |
and left shifts. (Thanks to Kalle Svensson for SF patch 849227.)
This addresses most of the remaining semantic changes promised by
PEP 237, except for repr() of a long, which still shows the trailing
'L'. The PEP appears to promise warnings for operations that
changed semantics compared to Python 2.3, but this is not
implemented; we've suffered through enough warnings related to
hex/oct literals and I think it's best to be silent now.
|
| |
|