Quoth fawaka@gmail.com (Leon Timmermans): > On Sat, Jul 10, 2010 at 4:17 PM, demerphq <demerphq@gmail.com> wrote: > > > > I also proposed a "no magic" pragma/syntax that would allow the > > optimiser to assume that all variables were "normal", and that funky > > stuff wasnt going to occur during the scope of the pragma. And in such > > a block i would expect this to block to be optimised away. > > The use of magic is too pervasive for that. Not only because many > special variables use active magic ($!, $1, %ENV, %SIG, etc…) but also > autovivication, m//g state, tainting and utf8 caching, $#array, pos(), > lvalue substr(), scalar(keys) and a number of more obscure things. > > I don't think it's workable. Most of those forms of magic don't have meaningful side-effects, though, at least on mg_get. (That is, they may have side-effects, but it doesn't matter if they aren't invoked. Tainting is the obvious exception.) This is what really matters from the pov of optimisation. BenThread Previous | Thread Next