Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: Perl 5 Optimizing Compiler, Part 4: LLVM Backend?

by Will_the_Chill (Pilgrim)
on Aug 29, 2012 at 04:53 UTC ( #990379=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Perl 5 Optimizing Compiler, Part 4: LLVM Backend?
in thread Perl 5 Optimizing Compiler, Part 4: LLVM Backend?

chromatic,

I guess I'm a bit confused. Above you say:

Perl 5 doesn't run slower than C because it lacks a JIT.
But here you say:
Add a tracing JIT. Iterate on that for a few years.
So which is it? JIT good or JIT bad?

...

Other than that potential logical inconsistency, I am in general agreement with your premises of Perl-runs-slow-because-it-is-dynamic and LLVM-was-not-designed-for-dynamic-languages. However, until a better backend target is determined, it looks like LLVM may be one of our best options.

If we can clean up some of the Perl internals along the way to Perl5-on-LLVM, then we can either change the backend target to a more-dynamic-than-LLVM platform or just upgrade LLVM to support dynamic language features.

Thanks,
~ Will


Comment on Re^5: Perl 5 Optimizing Compiler, Part 4: LLVM Backend?
Re^6: Perl 5 Optimizing Compiler, Part 4: LLVM Backend?
by chromatic (Archbishop) on Aug 29, 2012 at 05:11 UTC
    So which is it? JIT good or JIT bad?

    That reads to me like a false dilemma.

    In the rest of the post where I said "Add a tracing JIT", I wrote about the other necessary improvements to take advantage of a tracing JIT.

    If we can clean up some of the Perl internals along the way to Perl5-on-LLVM, then we can either change the backend target to a more-dynamic-than-LLVM platform or just upgrade LLVM to support dynamic language features.

    The word "just" in there reads to me like an oversimplification.

    Have you read the Dragon book? Taken a compilers class? Written your own Scheme or Forth? Written an interpreter? I appreciate your enthusiasm, but I think you're committing to a schedule and a lot of engineering decisions before you've done enough research to know what goes into a project like this.

      chromatic,

      I admit, I was setting up a potentially-false JIT dichotomy to try and understand your arguments better.

      Immediately after posting, I figured my use of the term "just" in "just upgrade LLVM" was in poor form - I should have omitted the "just", I agree that it is an oversimplification.

      ...

      Yes, I own and have read the Dragon book.
      Yes, I've taken a compilers class during the process of getting a degree in computer science.
      Yes, I have written my own functional and procedural languages, complete with BNF grammars, etc.
      Yes, I've written more than one interpreter.

      ...

      I am glad you appreciate my enthusiasm. I appreciate your frank input.

      The schedule I'm committing to is to have something (anything!) to demo by YAPC::NA 2013.

      I have not committed to any engineering decisions, as I am still in the process of research and due diligence. I've spent the last decade working on language theory and design, so I'm not a total newbie here. I'm just not (yet) a Perl Pope or Pumpking. ;)

      Thanks,
      ~ Will
        The schedule I'm committing to is to have something (anything!) to demo by YAPC::NA 2013.

        For some reason, I thought you wanted this project done by then. If you're doing your research now and putting together plans to make some sort of proof of concept, then presenting some findings by next year is very reasonable.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2014-09-22 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (205 votes), past polls