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/2002-January/019729.html below:

[Python-Dev] Re: opcode performance measurements

[Python-Dev] Re: opcode performance measurements [Python-Dev] Re: opcode performance measurementsJeff Epler jepler@unpythonic.dhs.org
Thu, 31 Jan 2002 14:17:25 -0600
On Thu, Jan 31, 2002 at 05:14:28AM -0500, Jeremy Hylton wrote:
> PS Skip-- Sorry the PEP isn't clear, but the only dictionary lookups
> that need to occur are at function creation time.  MAKE_FUNCTION would
> need to lookup the offsets of the globals used by the functions, so
> that a LOAD_FAST_GLOBAL opcode would take an int argument.

So how does this work for mutually-recursive functions?
    def f(x):
	if x==1: return 1
	return g(x)

    def g(x): return x * f(x-1)

can f not optimize the load of the global g into a LOAD_FAST_GLOBAL?

Jeff
PS Which PEP?  I only see 266



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