[Patches] [ python-Patches-529768 ] Speed-up getattr

noreply@sourceforge.net noreply@sourceforge.net
Thu, 14 Mar 2002 23:25:37 -0800


Patches item #529768, was opened at 2002-03-14 18:13
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=529768&group_id=5470

Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Speed-up getattr

Initial Comment:
This patch moves the string check in getattr before the
Unicode check, reducing the number of IsSubType checks
originating from getattr to 50% in a typical application.

For the attached artificial benchmark, this gives a 7%
speed-up.

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

>Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2002-03-15 18:25

Message:
Logged In: YES 
user_id=250749

This seems to be pretty close to patch # 517521.  That 
patch only gains about 2% overall according to my PyBench 
1.0 tests.

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

Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2002-03-15 18:25

Message:
Logged In: YES 
user_id=250749

This seems to be pretty close to patch # 517521.  That 
patch only gains about 2% overall according to my PyBench 
1.0 tests.

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

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