A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/042880.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 hacksJeremy Hylton jeremy at alum.mit.edu
Tue Mar 2 12:08:33 EST 2004
On Tue, 2004-03-02 at 11:42, Raymond Hettinger wrote:
> The patch eliminates the freelist in favor of keeping a single
> pre-made frame for each code block.  In addition to saving 
> a call to malloc(), the advantage is that the pre-made frame
> is custom to the code block and only half of fields need to
> be updated each time the code block is called.  
> 
> This is a nice net win for normal code blocks.  However, recursive
> functions use up their one pre-made frame on the first level of
> recursion.  On subsequent calls, they have to call malloc() resulting
> in a net slowdown.

Would this effect also obtain in a multi-threaded program if two
different threads called the same function concurrently?

Jeremy



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