Thu, 29 Jul 2010

Fearing the Future of Perl 6


About a decade ago, the design process for Perl 6 got under way. Ten years later, there's still no production Perl 6 implementation, but there is a "useful, usable, 'early adopter' distribution of Perl 6.

The developers note that it still has some bugs, it is far slower than it ought to be, and there are some advanced pieces of the Perl 6 language specification that aren't implemented yet. But that's OK; I thought I'd kick the tires.

Just to digress a bit: At work, we use Perl 5 extensively, both in in-house tools and plumbing and in our commercial products. So I've grown to like Perl a lot, though current directions in Perl development make me fear for the future of Perl.

Anyway, I downloaded the Rakudo Star release and built a perl6 binary. Let's look at some comparisons between the perl5 binary (the 5.10.0 release that ships with Debian Lenny) and the perl6 binary:

 Program SizeMemory after startupStartup Time (ms)
Perl 51.19MB3.4MB4
Perl 615MB93MB2212

So there you have it. The 2010-07 release of Rakudo Star is a program that's 12.6 times as big as perl 5, uses 27.4 times as much memory after initialization, and takes 553 times as long to start up.

To be precise, "program size" is the text component reported by the size command. "Memory after startup" is the VSIZE reported by ps and "startup time" is the sum of user and system CPU of a command similar to this:

time perl < /dev/null

Note that this release of Rakudo Star is not even feature-complete; it's missing a lot of stuff.

I asked on a forum what the goals are for relative size and speed of Perl 6 vs. Perl 5, and a Perl 6 developer responded that a reasonable goal would be to have Perl 6 be twice as big as Perl 5 and take twice as long to start up.

To achieve this goal, the Perl 6 developers will have to shrink the program size by a factor of 6.1 (that is, get rid of about 84% of the code.) They'll need to reduce startup memory consumption by a factor of 13.7 (that is, cut out 93.7% of their memory use) and reduce startup time by a factor of over 275.

Oh, and this is after they add in all the missing features required to bring Perl 6 up to production-level.

If they pull this off, the Perl 6 developers will have achieved a feat unprecedented in the history of Computer Science.

Unfortunately, I think reality is far grimmer, and that Perl 6 will simply be a prominent example of Second System Syndrome.


Update: A Perl 6 developer has a rebuttal to this article here. I think he's gaming the comparison (just as he accuses me of gaming it), but for the sake of fairness, I've linked to his rebuttal.

[permalink]


Blog    RSS    Home