[Python-Dev] 2.5 slower than 2.4 for some things?
ocean at m2.ccsnet.ne.jp
Tue Jun 12 14:15:49 CEST 2007
> I've had a report from a user that Plex runs about half
> as fast in 2.5 as it did in 2.4. In particular, the
> NFA-to-DFA conversion phase, which does a lot of
> messing about with dicts representing mappings between
> sets of states.
> Does anyone in the Ministry for Making Python Blazingly
> fast happen to know of some change that might have
> pessimised things in this area?
Hello, I investigated. On my environment, consumed time is
And after I applied this patch to Plex/Machines, (make `Node' new style
< class Node:
> class Node(object):
So, probably hash, comparation mechanizm of old/new style class has changed.
# improved for new style class, worse for old style class. Maybe optimized
for new style class?
Try this for minimum test.
init = """
c1 = Class()
c2 = Class()
t1 = timeit.Timer("""
c1 < c2
t2 = timeit.Timer("""
More information about the Python-Dev