optimization

Neal Becker ndbecker2 at gmail.com
Mon Dec 1 18:00:15 EST 2008


Arnaud Delobelle wrote:

> Neal Becker <ndbecker2 at gmail.com> writes:
> 
>> I noticed in some profiling, that it seems that:
>>
>> def Func ():
>>   def something():
>>     ...
>>
>> It appears that if Func is called many times, this nested func
>> definition will cause significant overhead.  Is this true?  I guess
>> I've become accustomed to decent compilers performing reasonable
>> transformations and so have tended to write code for clarity.
> 
> If something() can be defined outside Func(), how is it clearer to
> define it inside?
> 

If it's only used inside.




More information about the Python-list mailing list