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

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.

Replies are listed 'Best First'.
Re^4: Pre-compiled Perl?
by LanX (Saint) on Apr 03, 2017 at 20:56 UTC
    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.

Re^4: Pre-compiled Perl? P6?
by Laurent_R (Canon) on Apr 04, 2017 at 23:16 UTC
    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).