Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-25 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found