develooper Front page | perl.perl5.porters | Postings from October 2016

regarding "gv.c: rework special var matching logic to be simpler"

Dave Mitchell
October 26, 2016 10:55
regarding "gv.c: rework special var matching logic to be simpler"
Message ID:

Hi Yves, since this commit:

    commit eafd371ce091bf61fe1673448eee5e53c4b0ef32
    Author: Yves Orton <>
    Date:   Wed Oct 19 11:09:00 2016 +0200

    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.

ext/POSIX/t/export.t has been giving this warning:

    Name "POSIX::EXPORT_TAGS" used only once: possible typo at t/export.t line 199.

This is because your commit changed the special-cased 'quiet' vars from
being /^EXPORT.*/ to being /^EXPORT(|_OK|_FAIL)$/

So the question is, should EXPORT_TAGS be special-cased too or not?

Overhead, without any fuss, the stars were going out.
    -- Arthur C Clarke Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About