[Patches] [ python-Patches-876206 ] scary frame speed hacks
SourceForge.net
noreply at sourceforge.net
Tue Jan 13 13:20:09 EST 2004
Patches item #876206, was opened at 2004-01-13 16:49
Message generated for change (Comment added) made by jhylton
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=876206&group_id=5470
Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Hudson (mwh)
Assigned to: Jeremy Hylton (jhylton)
Summary: scary frame speed hacks
Initial Comment:
In ceval.c we find
/* XXX Perhaps we should create a specialized
PyFrame_New() that doesn't take locals, but does
take builtins without sanity checking them.
*/
This patch takes that idea rather further than you
might have expected... it creates a "light" subtype of
frame that assumes certain things about the frame,
gives this type its own free list (so it can assume
more about objects on the freelist) and converts light
frames into "heavy" frames when assumptions stop being
true.
Good for a ~5% improvement on "./python -s 'def f():
pass' 'f()'"; a bit less on pystone. It also conflicts
slightly with my function reorg patch -- apply that
first, apply this, ignore the reject and edit
func_caller_nofrees in funcobject.c to call
PyFrame_NewLight.
All three patches I just submitted together get ~6% on
pystone.
----------------------------------------------------------------------
>Comment By: Jeremy Hylton (jhylton)
Date: 2004-01-13 18:20
Message:
Logged In: YES
user_id=31392
I don't see any files attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=876206&group_id=5470
More information about the Patches
mailing list