Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
First of all there's currently a Google Summer of Code project in the run that implements a simple to use NCI (native call interface), to make it easier to call C functions from parrot.

Secondly please remember that Perl 6 is designed for the utmost amount of flexibility, so it's very easy to have a nice syntax for new features, like natural arithmetic operators for vector and matrix operations.

Perl 6 comes with low-level data types (like int32 and uint32) and arrays with pre-defined shapes (see S09 for more details, there's also a section on PDL support. In conjunction with the optional static type declaration there's no reason why native Perl 6 number crunching should be any slower than C.

So to summarize, from the specification point of view the future looks very bright. But currently speed isn't the primary concern, so I don't expect the first versions of Perl 6 to be very fast.

But there's much more room for optimization for Perl 6 than for Perl 5 - on the language level as well as on the VM level (for one thing parrot does JIT already, perl 5 doesn't, and is not likely to do in near future).

Update:

A few more thoughts on concurrency: Perl 6 avoids some pitfalls that made concurrency rather hard in Perl 5, like the huge number of global variables. Stuff that was global in Perl 5 (like $_, $!, $1, $2, ...) is now mostly solved with contextual variables (lexically scoped variables that may change their value in an outer block), and the language design was done from ground off with concurrency in mind (or at least in the back of TimToady's mind).

Implementations are free (and encouraged) to autothread meta operators, so this:

my @a1 = 1, 2, 3, 4, 5; my @a2 = 9, 8, 7, 6, 5; my @item_wise_sum = @a1 >>+<< @a2; my $sum = [+] @item_wise_sum;

is likely to happen in parallel without the programmer even noticing.

By the way complex numbers are natively supported in Perl 6.

So I think that both in terms of speed and syntax Perl 6 will be an improvement over Perl 5 (in the realm of sci. computing at least; don't want to start the overall discussion again), but it still needs much work to get there.


In reply to Re: What will scientific computing in Perl 6 look like? by moritz
in thread What will scientific computing in Perl 6 look like? by vrk

Title:
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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [james28909]: i dunno, if i didnt have so little experience in linux i would swap. but it would be to much of a learning curve for me right now.
    [choroba]: Low-end is defined as the Perl that generates millions of income
    [choroba]: sorry, that's high-end, of coursse
    [choroba]: low end, in my talk, will be code that "we don't touch because it works" and noone knows why
    [choroba]: I want to present the most bizzare bugs and misfeatures I met when working for a large financial institution
    [choroba]: I already gave a similar talk to my friends in a pub and at an internal conference at work and people liked it, so maybe...
    [choroba]: LanX: That's the heritage, I can't do anything else
    [RonW]: Sounds like some system my employer has "It does exactly what we need it to do and can't afford to risk anything we can't prove is 100% compatible"
    [marto]: choroba sounds interesting
    [RonW]: james28909 Why not write a Perl program to do the task?

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (11)
    As of 2017-05-22 21:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?