|Problems? Is your data what you think it is?|
One can think perl6 as a faster Perlby stefp (Vicar)
|on Jun 07, 2003 at 03:04 UTC||Need Help??|
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.