Nicholas Bastin
d858a7763a
Massive performance improvement for C extension and builtin tracing code
2004-06-25 23:31:06 +00:00
Nicholas Bastin
941b8bc41a
Less ugly #ifdefs for C profiling fix
2004-06-22 15:37:51 +00:00
Nicholas Bastin
bbffbd1983
One forgotten C profiling #ifdef
2004-06-22 04:18:47 +00:00
Nicholas Bastin
4c70b69fb1
Making C profiling a configure option (at least temporarily)
2004-06-22 03:51:38 +00:00
Raymond Hettinger
9c18e81fb2
Install two code generation optimizations that depend on NOP.
...
Reduces the cost of "not" to almost zero.
2004-06-21 16:31:15 +00:00
Armin Rigo
8817fcdba5
Performance tweak: allow stack_pointer and oparg to be register variables.
...
SF patch #943898
2004-06-17 10:22:40 +00:00
Martin v. Löwis
f30d60edbc
Patch #510695 : Add TSC profiling for the VM.
2004-06-08 08:17:44 +00:00
Raymond Hettinger
f2c0830585
SF bug #963956 : Bad error mesage when subclassing a module
...
Add a more informative message for the common user mistake of subclassing
from a module name rather than another class (i.e. random instead of
random.random).
2004-06-05 06:16:22 +00:00
Martin v. Löwis
e440e47e91
Patch #957398 : Add public API for Generator Object/Type.
2004-06-01 15:22:42 +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
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
Armin Rigo
bf57a14522
Fix SF bug #765624 .
2004-03-22 19:24:58 +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
Raymond Hettinger
db0de9e7ca
Speedup for-loops by inlining PyIter_Next(). Saves duplicate tests
...
and a function call resulting in a 15% reduction of total loop overhead
(as measured by timeit.Timer('pass')).
2004-03-12 08:41:36 +00:00