Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

comment on

( #3333=superdoc: print w/replies, xml ) 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.

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

In reply to One can think perl6 as a faster Perl by stefp
in thread Perl 6: Will we use it? by neilwatson

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (4)
    As of 2020-10-24 12:04 GMT
    Find Nodes?
      Voting Booth?
      My favourite web site is:

      Results (243 votes). Check out past polls.