Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

One can think perl6 as a faster Perl

by stefp (Vicar)
on Jun 07, 2003 at 03:04 UTC ( #263908=note: print w/replies, xml ) Need Help??

in reply to Perl 6: Will we use it?

There will be more to Perl6 than performance improvement. But this argument only would convince me to switch to Perl6.

Indeed, one will gain a lot only by using Perl6 implementation as a faster Perl5 modulo a few syntactical changes and a few type declarations here and there.

Let's face it, Perl5 is a pig; memory pig, CPU pig.

Reference counting is a bad thing and getting worse with modern processors. For example, each time you add or remove a reference to an object the VM has to access this object to update its reference count. This trashes the cache. Parrot has real garbage collecting. The downside is the loss of timely destruction of object. It will be possible but at a cost to support perl5 code. Anyway, real garbage counting will be a win for perl6 code.

Perl6 will support optional typing. For example, that means you will be able to declare an array of int. Way faster and leaner than an array of unknown type scalar. You get the idea!

Also the implementation of Perl6 objects turns the implementation logic inside out. Currently a Perl5 opcode does a lot of "head scratching" before doing anything: Is this a scalar, a hash, an array? is it magic? With Perl6 and PMC, a vtable is directly accessed that implements the opcode for the given object. Here again, Perl6 will be faster.

The neat result is that we will be able to apply our Perl5 skills in domains where we did not even think of using Perl because it was too slow. For some people, it will mean that they will not have to learn a new language because they will be able to do it in Perl.

Perl6 as a faster Perl5 will be enough to convince me. But performance will be only a small part of the story.

-- stefp
Come to YAPC::Europe 2003 in Paris, 23-25 July 2003.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2021-03-02 09:10 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (42 votes). Check out past polls.