I have a dream. I have a dream where any programming language, no matter how dynamic (or not), can execute near the speed of optimized C. This is a lovely dream. This dream may never happen.

BUT! I have another, more specific dream. I have a dream where Perl 5 (not a subset of Perl 5, not Perl 6, not Perl 7) can execute at nearly the speed of optimized C. With the help of Nick Clark, Ingy, Reini, Austin Perl Mongers, and others, I am chasing down this dream.

If you look at Nick Clark's recent comments pasted below, you will see his (at least) 3 steps to achieve my dream. At this point, I'm considering Reini's B system or to-be-completed Perl5 parsers from Ingy's C'Dent/Perl5i or Flavio Glock's Perlito as candidates for part 1; the translation mechanisms of C'Dent/Perl5i or Perlito for part 2; and RPython, optimized XS, or Javascript for part 3.

My task now is to run some initial benchmarks on these software systems (and maybe a few others) to get an idea of which direction we may go from here. Of course, I will post back here on Perl Monks once I've got some timing statistics to share.

Thanks for the continued interest, all the comments (both pro and con) are most welcome and appreciated, especially those from chromatic! ;-)

Perling,
~ Will


On August 18th, Nick Clark wrote:

Well, what I was really meaning was that there are actually (at least) three steps to running Perl 5 on a different platform

1) parsing Perl 5 source code
2) outputting code for it to the platform
3) a runtime library for Perl 5 for that platform

If Perlito's documentation is right, and it has most of a Python 2.6 backend, then Perlito already has

1) the start of a Perl 5 parser
2) the start of code to output Python
3) a runtime library for what it supports (preferably written in Perl 5 itself)

which means that some work is already done. And that anything further that needs doing on (1) and (3) is shared work between various people and projects.

Ingy's B system (sic) might have the same benefits - anything you can share with anyone else working on similar problems is work you don't have to do yourself.

In reply to Perl 5 Optimizing Compiler, Part 3: I Have A Dream by Will_the_Chill

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.