A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-March/042895.html below:

[Python-Dev] [ python-Patches-876206 ] scary frame speed hacks

[Python-Dev] [ python-Patches-876206 ] scary frame speed hacks [Python-Dev] [ python-Patches-876206 ] scary frame speed hacksNeal Norwitz neal at metaslash.com
Tue Mar 2 21:15:41 EST 2004
On Wed, Mar 03, 2004 at 03:03:19PM +1300, Greg Ewing wrote:
> "Phillip J. Eby" <pje at telecommunity.com>:
> 
> > Frames are over three times larger than a function and a code object put 
> > together:
> 
> Yow! I hadn't realised that.
> 
> Do frames *really* need to be that big...?

In Include/frameobject.h, b_type and b_level can be combined to
a single 32-bit value, rather than two in PyTryBlock.  There
is a bit more processing to pull the values apart.  IIRC,
there was a very small, but measurable performance hit.
You can also decrease CO_MAXBLOCKS.  I was able to drop the
size to under 256 bytes.  But perf was still a bit off.

My goal was to drop the frame size small enough for PyMalloc.
I don't think I ever tried to change the allocs.  But since
I never got it faster, I dropped it.

Neal

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4