Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • ...One idiom jumped out at me:
            $S0 = concat "PIR", ':"'

    Interesting -- apparently PGE is generating these concat statements whenever there is PIR embedded in a rule. For example:


    token MARK_STATEMENT_END {
            {{ $P0 = match.'to'()
                    $P0 = clone $P0
                    set_global '$!endstmt', $P0
            }}
            <.ws>
    }


    It's good that imcc is now optimizing the concat_s_sc_sc opcode, but PGE and the other compiler tools should probably also be smart enough to generate the concatenated constant in the first place. I'll probably fix that as well.

    -----

    Also, as others have commented, I really appreciate these insights into Parrot internals.

    Pm
    • Based on chromatic's analysis I re-examined the section of PGE that was responsible for generating the concats in the first place, and nearly all of the concatenations it was performing at runtime were constants that could be done at compile-time. I must've been asleep when writing that code.

      So, I refactored the code to avoid the concats altogether, and building rakudo's actions.pl file is now 1.6% faster than it was before (44.363 versus 45.095 seconds on my box). Not a huge speedup, but I'm still happie