1. Re: 3.0 feature request: foreac
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Jul 25, 2005
- 501 views
Christian Cuvier wrote: > > > Kat wrote: > > > > If all the :targets were known, there is a slight overhead for *one* > > computation (goto 1+2), and then an optomised *table* search of the :target > > list. As opposed to a stack of if-then-else statements where each > > conditional > > if-then source line is interpreted and all those comparisons be made *as > > they > > are run across*, plus the flow control flags are evaluated for each if-then > > in > > the stack. > > > > Ok, but a lot of goto statements go forward, if only so as to exit > blocks. Hence, the interpreter doesn't know how to compute the target > branch address till possibly very late. Well, ooeu is 2.5-based, so if the label is static, then it's known at compile time. It doesn't really matter if it isn't known when the parser encounters the goto. There are already (even before 2.5!) several places where Eu has to remember to go back and patch up some code (like an if-then block). Matt Lewis