Anthony Baxter
c3d931685b
forward-port 1.17.12.1
2004-05-13 11:54:19 +00:00
Raymond Hettinger
c8aa08b172
Some (but not all) of the why code bitfield tests ran faster as
...
separate equality tests. Now, all are set to their best timing.
2004-04-11 14:59:33 +00:00
Raymond Hettinger
5bed456056
Revert 2.393, elimination of pre-decrementing, which
...
did not stand-up to additional timings.
2004-04-10 23:34:17 +00:00
Raymond Hettinger
7eddd78a15
Use continue instead of break whereever possible.
2004-04-07 14:38:08 +00:00
Raymond Hettinger
d3b836d202
* Improve readability and remove data dependencies by converting
...
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.
2004-04-07 13:17:27 +00:00
Raymond Hettinger
467a698bd2
Small code improvements for readability, code size, and/or speed.
...
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
2004-04-07 11:39:21 +00:00
Raymond Hettinger
7c9586545e
Simplify previous checkin (bitfields for WHY codes).
...
Restores the self-documenting enum declaration.
2004-04-06 10:11:10 +00:00
Raymond Hettinger
06032cb664
Coded WHY flags as bitfields (taking inspiration from tp_flags).
...
This allows multiple flags to be tested in a single compare
which eliminates unnecessary compares and saves a few bytes.
2004-04-06 09:37:35 +00:00
Tim Peters
8a5c3c76be
Since the fast_yield branch target was introduced, it appears that most
...
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).
2004-04-05 19:36:21 +00:00
Jeremy Hylton
d4ceb31664
Bump the magic number to avoid sharing bytecode between 2.3 and 2.4.
...
Revise the long comment that explained details of the magic number
in gory detail.
2004-04-01 02:45:22 +00:00
Andrew MacIntyre
da4d6cb573
OS/2 VACPP build updates/fixes
2004-03-29 11:53:38 +00:00
Armin Rigo
01ab279056
Marshal clean-up (SF patch #873224 )
2004-03-26 15:09:27 +00:00
Nicholas Bastin
2786d90617
A few more PyThreadState_Get to PyThreadState_GET conversions
2004-03-25 02:16:23 +00:00
Nicholas Bastin
e5662aedef
Changed random calls to PyThreadState_Get() to use the macro
2004-03-24 22:22:12 +00:00
Nicholas Bastin
c69ebe8d50
Enable the profiling of C functions (builtins and extensions)
2004-03-24 21:57:10 +00:00
Martin v. Löwis
83969eeeeb
Decref all if ensure_fromlist fails. Fixes #876533 .
...
Backported to 2.3.
2004-03-23 16:28:13 +00:00
Armin Rigo
5d2c68359b
Lost reference.
2004-03-22 20:16:58 +00:00
Armin Rigo
bf57a14522
Fix SF bug #765624 .
2004-03-22 19:24:58 +00:00
Armin Rigo
80d937e986
Fix for line events in the case:
...
def f(a):
if a:
print 5
else:
pass
2004-03-22 17:52:53 +00:00
Nicholas Bastin
a7604bf1b4
Moved tracebackobject to traceback.h, Closes SF Bug #497067
2004-03-21 18:37:23 +00:00
Raymond Hettinger
ff5bc50bb0
Improve byte coding for multiple assignments.
...
Gives 30% speedup on "a,b=1,2" and 25% on "a,b,c=1,2,3".
2004-03-21 15:12:00 +00:00
Armin Rigo
9dbf9084e8
Cancelled checkin, sorry.
2004-03-20 21:50:13 +00:00
Armin Rigo
1515fc2a01
A 2% speed improvement with gcc on low-endian machines. My guess is that this
...
new pattern for NEXTARG() is detected and optimized as a single (*short)
loading.
2004-03-20 20:03:17 +00:00
Raymond Hettinger
fba1cfc49a
LIST_APPEND is predicably followed by JUMP_ABSOLUTE.
...
Reduces loop overhead by an additional 10%.
2004-03-12 16:33:17 +00:00
Raymond Hettinger
2d783e9b16
Move the code for BREAK and CONTINUE_LOOP to be near FOR_ITER.
...
Makes it more likely that all loop operations are in the cache
at the same time.
2004-03-12 09:12:22 +00:00