Message43174
Logged In: YES
user_id=34209
Pystone is not likely to show much speedup, as it contains
exactly 2 instances of CALL_ATTR, only barely in the main
loop. However, it should not slow down because of CALL_ATTR
either; the two CALL_ATTRs are of the most optimized sort,
old-style instance methods, and none of the other code paths
have changed *at all* (in the fast-and-ugly mode of the
patch, which is the default.)
There are only two reasons I can think of that explain a
slower pystone: code cache and the switch statement layout.
This apparently does not influence my (somewhat
high-end-ish) test machines, but does yours (and others.)
Both are more or less outside my control. They might be
fixed by switch reordering or rearranging of the code so the
compiler optimizes it better, but that's very platform
specific and lacking a proper test-bed for that situation, I
can't do it.
Alternatively, there may be some funk with regards to
bytecode version. If bytecode wasn't properly regenerated, I
can imagine not seeing *any* speedup. Have you tried
something as simple as
./python timeit.py -s 'class X:' -s ' def spam(self): pass'
-s 'x = X()' 'x.spam()'
? This gives a good 30% speedup on my home PC. Bytecode
problems wouldn't influence pystone though.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:21:36 | admin | link | issue709744 messages |
2007-08-23 15:21:36 | admin | create | |
|