Re: Basic question about speed/coding style/memory
On 7/21/2012 3:13 AM, Jan Riechers wrote:
> Cause, as I understand the interpreter chooses either the "else" (1st
> block) or just proceeds with following code outside the if.
If none of the if/elif statements evaluate to something true, the else
block is executed.
> So if there is some overhead in some fashion in case we don't offer the
> else, assuming the interpreter has to exit the evaluation of the
> "if"-statement clause and return to a "normal parsing code"-state
> outside the if statement itself.
I really don't understand. You can look into the dis module if you want
to look at how CPython bytecode is executed and the timeit module to
measure speed. In any case, I don't see how there would be any
CPython 3.3.0b1 | Windows NT 6.1.7601.17803
|All times are GMT. The time now is 06:36 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.