Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl 5 Optimizing Compiler, Part 2

by dave_the_m (Parson)
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.

Dave.


Comment on Re: Perl 5 Optimizing Compiler, Part 2
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-07-26 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls