On Nov 21, 2009, at 1:59 PM, Stefan Behnel wrote: > > 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.
Oh, yeah, I forgot about that (despite the fact that I'm the one who implemented it...) > 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. Yeah, me too. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
