[Patches] [ python-Patches-430948 ] Performance improvement for profiler
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 06 Jun 2001 22:30:01 -0700
Patches item #430948, was updated on 2001-06-06 22:29
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=430948&group_id=5470
Category: library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Fred L. Drake, Jr. (fdrake)
Assigned to: Tim Peters (tim_one)
Summary: Performance improvement for profiler
Initial Comment:
This patch adds a bit of complexity to
Profile.__init__() in an effort to reduce the overhead
of the profiler. The essential piece of the puzzle is
that the general Profile.get_time() method is replaced
with a function which does only as much as is needed
for the underlying timer. For example, if time.clock()
is available, it can become a PyCFunction instead of a
bound method, requires only 1 dict lookup to execute
instead of the 11 it takes to execute get_time()
without this patch.
Also removes a couple of duplicate imports from the "if
__name__ == ..." section.
----------------------------------------------------------------------
>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-06-06 22:30
Message:
Logged In: YES
user_id=3066
I should note that this works with both 2.1.1 and 2.2,
though this is not a bugfix.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=430948&group_id=5470