Yes indeed, the expression optimization done by Perl in your example is strongly
related to their claims in '520. It's promoting computations from inner blocks
to outer blocks to improve processing efficiency, in case inner blocks are
called more than once. What's more, it allows the initialization to be done in
dedicated static code which can do that more efficiently en masse, rather than
piecemeal dynamically at the time the data is actually needed. This is
essentially the same as in Perl if one allows for the implementation differences
in Java.
Your example would be even more analogous if you had several
expressions that could be optimized, called from different parts of your
program. The fact that Perl would gather all these separate expressions
together and initialize the variables together at the start in one go is exactly
what they are claiming is novel. I certainly don't see it that way. [ Reply to This | Parent | # ]
|