PerlOnTheWay has asked for the wisdom of the Perl Monks concerning the following question:
for efficiency reasons, perl in fact just sets a flag, using CATCH_SET(TRUE) . The pp_require , pp_entereval and pp_entertry ops check this flag, and if true, they call docatch , which does a JMPENV_PUSH and starts a new runops level to execute the code, rather than doing it on the current loop.
So by using CATCH_SET it just moves the JMPENV_PUSH to a new runops, rather than doing it on the current loop.
But IMO the same amount of stuff has to be done in both cases, how does this make efficiency better?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How does CATCH_SET optimize efficiency?
by Anonymous Monk on Dec 16, 2012 at 10:33 UTC | |
by dave_the_m (Monsignor) on Dec 16, 2012 at 12:51 UTC | |
by PerlOnTheWay (Monk) on Dec 16, 2012 at 14:06 UTC | |
by dave_the_m (Monsignor) on Dec 16, 2012 at 18:08 UTC | |
by PerlOnTheWay (Monk) on Dec 17, 2012 at 04:11 UTC | |
|