In article <[EMAIL PROTECTED]>,
Peter Otten <[EMAIL PROTECTED]> wrote:
>Mel Wilson wrote:
>> The thing is, that once you drop local-namespace
>> optimization, the entire function gets slowed down, possibly
>> by 40%:
>It's not that bad as most of the extra time is spend on compiling the
>string.
[
Mel Wilson wrote:
> The thing is, that once you drop local-namespace
> optimization, the entire function gets slowed down, possibly
> by 40%:
It's not that bad as most of the extra time is spend on compiling the
string.
def fib5(n):
a, b, i = 0, 1, n
while i > 0:
a, b = b, a+b
In article <[EMAIL PROTECTED]>,
Steven Bethard <[EMAIL PROTECTED]> wrote:
>Jeff Shannon wrote:
>> I was referring to functions which have an internal exec statement, not
>> functions which are created entirely within an exec -- i.e., something
>> like this:
>
>Thanks for the clarification. Here's
Jeff Shannon wrote:
Steven Bethard wrote:
Jeff Shannon wrote:
Note also that functions which use exec cannot use the static
namespace optimization, and thus tend to be *much* slower than normal
functions
In what circumstances will this be true? I couldn't verify it:
[snip]
I was referring to fu
Steven Bethard wrote:
Jeff Shannon wrote:
Note also that functions which use exec cannot use the static
namespace optimization, and thus tend to be *much* slower than normal
functions
In what circumstances will this be true? I couldn't verify it:
[...]
exec """\
def fib2(n):
a, b = 0, 1