Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Perl 5 Optimizing Compiler, Part 2

by dave_the_m (Prior)
on Aug 18, 2012 at 13:41 UTC ( #988211=note: print w/replies, xml ) Need Help??

in reply to Perl 5 Optimizing Compiler, Part 2

As regards RPython: using this would entail rewriting the entire perl runtime in rpython: somewhere between about 30-100K lines of C, depending on what bits are required. This would be very hard and time-consuming, and at the end, there's no guarantee that it would be any faster.

You're basically replacing mature, tightly honed C code with python, then hoping that the tracing JIT will not only bring the python code back up to the speed of the original C, but past that point and even faster.

You'd have to deal with impedance mismatches. For example, if python-style arrays and hashes provide a superset of the semantics of perl arrays and hashes then you may be able to use them directly; if not, you'd have to implement perlish hashes in python!

Also, you'd have to say goodbye to XS. It's not clear to me whether the existing perl regex engine could still be used, but if it could, it wouldn't benefit from JIT.

Etc etc.


Replies are listed 'Best First'.
Re^2: Perl 5 Optimizing Compiler, Part 2
by Will_the_Chill (Pilgrim) on Aug 21, 2012 at 05:22 UTC
    Dave, you're right, I was confused about this. We don't need to re-implement the Perl 5 interpreter VM into RPython, we only need to compile the Perl 5 applications into RPython. I will write more about this soon in my further postings.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988211]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2018-06-20 19:47 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.