You should be more specific which kind of optimization at compile time you are missing, I doubt there is much potential left.

Perl has dynamic typing which means higher performance is only possible by JIT-ing once the types are (statistically) known (i.e."code paths" are recorded at run-time)

The other way is explicit typing of variables by the author, allowing to optimize crucial sub-routines at compile time.

JS (JIT) resp Typescript (Typing) can do both now.

But as I said, please show us a way to improve ahead of time compilation of vanilla Perl without types.

edit

Furthermore I'm not sure if Perl can even write such optimized machine code without being bundled with a C-compiler.

Theoretically once could use typed variables to create Inline::C blocks. But I'm ignorant about other possibilities here...

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


In reply to Re: Trading compile time for faster runtime? by LanX
in thread Trading compile time for faster runtime? by melez

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.