|
Authored by: Anonymous on Friday, May 18 2012 @ 07:38 PM EDT |
Well yes, but Google's expert indicated that pattern matching was used
only for array initialization and that the rest of the
initialization was performed through simulation. So it would be surprising to me
if there were any nested patterns in that use case. I could see a regexp-type
bytecode pattern handling standard initialization patterns for single- and
multi-dimensional arrays, which would eliminate the need for iteration. The
advantage of the approach is that you go from O(n) algorithm based on the size
of the arrays (potentially huge), to an O(n) algorithm based on the size of the
initialization code. The latter approach would add a little more time to
initialization if the target program doesn't contain any arrays, but will be
much quicker if you've got some really large arrays (thousands or millions of
array elements). [ Reply to This | Parent | # ]
|
|
|
|
|