[prev in list] [next in list] [prev in thread] [next in thread]
List: python-dev
Subject: [Python-Dev] generators and ceval
From: Ron Adam <ron3200 () gmail ! com>
Date: 2011-12-16 4:15:53
Message-ID: 1324008953.18721.18.camel () Gutsy
[Download RAW message or body]
Hi, I Just added issue 13607 with a patch that removes the generator
specific checks and code out of the ceval PyEval_EvalFrameEx() function.
Those parts where moved up into the generator gen_send_ex() function.
Doing that removed the generator flag checks from the eval loop and made
it a bit cleaner. In order to do that, I needed to give generators a
why to look at the 'why' value. Doing that also cleaned up the code in
gen_sendex() as it can use the 'why' in a select instead of several
indirect if tests.
http://bugs.python.org/issue13607
Altogether it made yields about 10% faster, and everything else about
2%-3% faster (on average). But it does need to be checked.
Cheers,
Ron
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic