in reply to Perl 5 Optimizing Compiler
If you only need better startup time B::C is already stable and good enough. For optimized run-time more is needed.
I did some research and lobbying over the last years and came up with those approaches:
Did you see my inofficial (not yet announced) proposals on github? I'm working on const and a type system to enable future optimizations. Time-frame: 1-2 years.
perl design draft - types and const
https://github.com/rurban/perl/blob/42b0094646/pddtypes.pod
perl types pod
https://github.com/rurban/perl/blob/05514649c/pod/perltypes.pod
perldata.pod: add const and coretypes
https://github.com/rurban/perl/commit/7eb6c3584a1b
B::CC or another optimizing compiler can only profit from const and types.
After the YAPC we'll gather in Stavanger, Norway to discuss how to get the MOP proposals into perl.
https://github.com/stevan/p5-mop/tree/master/extras/talks
Of course a MOP will slow down perl (other disagree), but as perl is currently hardly optimizable at all and more and more slowdown is getting introduced over the years, the MOP could be used to allow more compile-time optimizations and more efficient class, method and property handling.
Getting an optimizing compiler for YAPC::US sounds like a good plan to me, but is of course way too optimistic. B::CC already exists and passes most tests. Fixing the failures sounds like a good plan to me.
Function calls are also super-slow with perl. Getting faster functions calls by analyzing the code at compile-time and omit unnecessary exception handling, @_ handling, scope, and so on would also be a worthwile goal, up to inlining. Unfortunately it is not possible to discuss such thing on p5p. Not even the much simplier, possible XS call improvements.
The next idea will be Go-like concurrency in p5 with a changed runloop to saturate multiple native threads on multiple CPU's automatically. And some go-like language extensions for IPC communication. But I guess this vision is way too much for p5p. And even parrot is not there yet. In the current p5p process environment hardly anything could get done. It's management anti-patterns all over, as from the textbook.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl 5 Optimizing Compiler
by dave_the_m (Monsignor) on Aug 13, 2012 at 14:22 UTC | |
by Anonymous Monk on Aug 14, 2012 at 17:51 UTC | |
by rurban (Scribe) on Aug 15, 2012 at 18:31 UTC | |
by dave_the_m (Monsignor) on Aug 17, 2012 at 09:37 UTC | |
by Corion (Patriarch) on Aug 17, 2012 at 09:40 UTC | |
| |
Re^2: Perl 5 Optimizing Compiler
by xiaoyafeng (Deacon) on Aug 13, 2012 at 17:17 UTC |