[Patches] [ python-Patches-431257 ] profile/trace dispatch speed-up

noreply@sourceforge.net noreply@sourceforge.net
Thu, 07 Jun 2001 21:33:38 -0700


Patches item #431257, was updated on 2001-06-07 14:44
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=431257&group_id=5470

Category: core (C code)
Group: None
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Fred L. Drake, Jr. (fdrake)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: profile/trace dispatch speed-up

Initial Comment:
The profile and trace functions take a string as one of
their parameters, where the value of the string is one
of exactly four values.  Unfortunately, a new string
object is created for each call to the profile/trace
functions, and is not interned.

This patch modifies ceval.c so the string object for
each of these values is created only once and is
interned, allowing faster dictionary lookups in the
profile/trace functions.  This avoids a lot of string
creation overhead for calling these functions, and can
help the standard profiler work faster by using
interned string objects.

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-06-07 21:33

Message:
Logged In: YES 
user_id=3066

Checked in as Python/ceval.c revision 2.246.


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-06-07 15:01

Message:
Logged In: YES 
user_id=31435

Accepted, and back to Fred "The Interner" Drake, Jr.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=431257&group_id=5470