in reply to Re^2: Trading compile time for faster runtime?
in thread Trading compile time for faster runtime?

could you show an example, please?

perl -MO=Concise FILE will show you the OP tree.

NB: the tree doesn't mean the order of execution, you have to read the line numbers.

C:\>perl.exe -MO=Concise -e"map {$_++} 1..3" d <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 7 <|> mapwhile(other->8)[t5] vK ->d 6 <@> mapstart K ->7 3 <0> pushmark s ->4 - <1> null lK/1 ->4 - <1> null lK/1 ->7 c <@> leave lKP ->7 8 <0> enter l ->9 9 <;> nextstate(main 2 -e:1) v:{ ->a b <1> postinc[t2] sK/1 ->c - <1> ex-rv2sv sKRM/1 ->b a <#> gvsv[*_] s ->b 5 <1> rv2av lKPM/1 ->6 4 <$> const[AV ] s ->5 -e syntax OK

more options in B::Concise

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Trading compile time for faster runtime?
by melez (Sexton) on Apr 21, 2022 at 09:50 UTC

    Can't, as I said - I have close to zero experience with XS. My question was hypothetical, but others have pointed out that it was attempted already, both in the core as well as on CPAN.