Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl 5 Compiler, Again!

by flexvault (Prior)
on Aug 14, 2012 at 12:17 UTC ( #987338=note: print w/ replies, xml ) Need Help??


in reply to Perl 5 Compiler, Again!

Dear Monks,

Thanks to everyone for giving valid technical reasons for the lack of an integrated Perl 'compiler'. Actually I wrote a 'C' version of 'uxbasic', but abandoned it in favor of Perl. It worked, was fast, but lacked the feature rich capability of Perl. So I wrote an 'uxbasic' to Perl translator script that took many of my products and moved them to Perl. It was 99% correct, and with a minimum of debugging, I had a Perl version of my products that could continue to grow.

It's a lot more fun working with Perl than either 'C' or 'uxbasic'.

Thank you...Ed

"Well done is better than well said." - Benjamin Franklin


Comment on Re: Perl 5 Compiler, Again!
Re^2: Perl 5 Compiler, Again!
by rurban (Scribe) on Sep 20, 2012 at 23:22 UTC
    flexvault:

    There is an integrated compiler in perl5. And there are external compilers.

    You will not easily see what the integrated compiler in perl5 does, but you see some result with B::Concise. All the ex-OPs there are optimized out already.

    $ perl -MO=Concise -e'1+1' 3 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 - <0> ex-const v ->3
    E.g. 1=1 was constant folded here.
    $ perl -MO=Concise -e'$a=1+$a' 8 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 7 <2> sassign vKS/2 ->8 5 <2> add[t1] sK/2 ->6 3 <$> const(IV 1) s ->4 - <1> ex-rv2sv sK/1 ->5 4 <$> gvsv(*a) s ->5 - <1> ex-rv2sv sKRM*/1 ->7 6 <$> gvsv(*a) s ->7
    All the sv references rv2sv were optimized to direct gvsv accesses.

    perlcc is the backend for 3 external compilers.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987338]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2015-07-04 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls