Greg Ewing, 21.11.2009 22:37:
> Robert Bradshaw wrote:
> 
>> We need to be able to jump into the insides of arbitrary loops and the  
>> likes...
> 
> You can -- look up "Duff's device".

The sick definition of switch statements in the C language doesn't help
here. Cython actually /does/ generate switch statements for certain
if-elif-else constructs, so we can't use Duff's device for generators.

However, I'd expect that for the use case at hand, a switch statement full
of goto's would lead to exactly the same assembly code as Duff's device in
action.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to