• Fred Drake's avatar
    Performance improvements to the profiler: · edb5ffb2
    Fred Drake yazdı
    Ensure that all the default timers are called as functions, not an
    expensive method wrapper around a variety of different functions.
    
    Agressively avoid dictionary lookups.
    
    Modify the dispatch scheme (Profile.trace_dispatch_*(), where * is not
    'call', 'exception' or 'return') so that the callables dispatched to
    are simple functions and not bound methods -- this reduces the number
    of layers of Python call machinery that gets touched.
    
    Remove a couple of duplicate imports from the "if __name__ == ..."
    section.
    
    This closes SF patch #430948.
    edb5ffb2
profile.py 21.2 KB