This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
gv.c: rework special var matching logic to be simpler
The old code used a bunch of tricks that IMO are unlikely
to actually make any performance difference, and make
the code harder to read, search, and understand, and less
amenable to using string constant friendly macros.
So for instance instead of switching on the first char
and then comparing the second on for an exact match
instead just compare the full string. The extra char
is unlikely to make a difference to the underlying code
that gets called, and the end result is easier searching.
Another issue is that some of the code was inadverdantly
doing prefix matches, and not exact matchs for certain
magic var names. This is fixed as part of these changes.