As I said above, the compiled form is a bunch of C structs in memory with pointers to each other. You could just dump this directly to disk but then it'd only be meaningful on a perl compiled exactly the same way. To get something you could run on someone else's perl you'd need to normalize it too. People tried doing that with the B::Bytecode module but it turned out that it was faster to go from source to optrees than "bytecode" to optrees.

So it's true that we could substitute parsing source for reconstituting optrees but parsing source is already so fast that there it isn't a win to "skip" it. If you want to try this out on your perl, write the results of perl -MO=Bytecode your-file.pl to disk and then check out the byteloader program. This has been removed in the latest dev versions of perl mostly because in addition to never actually being faster, it also never really worked.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊


In reply to Re^3: Perl is a compiler cum interpreter? by diotalevi
in thread Perl is a compiler cum interpreter? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.