Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Pre-compiled Perl?

by LanX (Saint)
on Apr 03, 2017 at 18:02 UTC ( [id://1186865]=note: print w/replies, xml ) Need Help??


in reply to Re: Pre-compiled Perl?
in thread Pre-compiled Perl?

> Once upon a time, there was a bytecode compiler for perl, but that project has been discontinued.

IIRC it didn't worth it anymore because systems became so fast that compiling didn't count much ... Or at least less than fetching from disc.

For completeness: We had a discussion if precompiling Moose would help (it wouldn't AFAIR) ... Will add a link later.

updated links

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^3: Pre-compiled Perl? P6?
by Discipulus (Canon) on Apr 03, 2017 at 20:19 UTC
    What happened to perlcc? was a very fun node! thanks for that.

    Anyway if i recall P6 was announced with the ability to write out machine-indipendent code (is that called bytecode?) many years ago: are you or other aware if this intention was removed from the smiling butterfly too?

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
      There are different terms which are slightly different.

      Perl5 has so called op-codes.

      you can use B::Terse or B::Concise to see the opcode °

      c:/tmp $ perl -MO=Terse -e'print "Hallo Discipulus"' -e syntax OK LISTOP (0x26eb410) leave [1] OP (0x26eb3e0) enter COP (0x26eb450) nextstate LISTOP (0x26eb4e0) print OP (0x26eb4b0) pushmark SVOP (0x26eb520) const [1] PV (0x4c87b8) "Hallo Discipulus"

      The difference seems that bytecode is kind of an artificial low level machine-code while op-code are more the tokens for high level commands.

      see http://www.differencebetween.info/difference-between-opcode-and-bytecode

      AFAIK it's even more complicated for Perl5 because some things are mangled.

      From what I heard does Perl6 have even more possibilities. There is at least a Java-bytecode implementation (in the making ?)

      HTH

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

      °) and B::Deparse does nothing else than trying to back-engineer Op-code to most likely source code.

      As far as I know, Perl 6 can sort of precompile modules, so the second time you call a large module, it loads much faster. But I haven't really experimented that (or, at least, haven't made any performance measurement).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found