News for hackers. Stuff that matters.
Re:Why I’m Learning Perl 6 by b2gills on Wednesday July 26, 2017 @02:42PM (#14858950)
I have seen examples where the naive Perl 6 implementation is faster than the equivalent C code. (The one I'm thinking of is probably owing to Spesh and the JIT, but I forget what it was about)

Here's an example where a naive Perl 6 version is going to beat the pants off of the naive version in another language:

Find the sum of all integers from 10 to 1000000 inclusive.

In Perl 6:

    say [+] 10 .. 1000000
the [+] is a left fold using the &infix:«+» operator (&infix:«+» is left associative)

This finishes almost immediately. (It also does so if the endpoint is 10¹⁰⁰⁰ or more)

The reason is if you use the built in version of the &infix:«+» operator, it calls the sum method on the Range object. That particular method knows how to calculate the sum on the Range without iterating through the values. If you modify the &infix:«+» operator lexically it won't take that shortcut.

This also works the same if you wrote it like this:

    say Range.new(10,1000000).reduce(&[+])
(There is syntax to omit either or both endpoints with both ways to create a Range)

There are plenty of areas where Rakudo Perl 6 is slower than I would like, but for many uses it is fast enough.

Re:Why I’m Learning Perl 6 by throwaway7645 on Wednesday July 26, 2017 @07:45PM (#14861414)
That is pretty awesome. When I'm talking about performance and stability, I'm just saying we're still seeing a lot of low hanging fruit being taken care of. For example, Liz is still beast-moding away each week at enhancing the performance of lists, sets, & bags by 100-1000x in some cases. At some point, nearly all of those kinds of fixes should be already fixed. At some point in the future, it'll start getting used over Python I think.
Re:Why I’m Learning Perl 6 by slackersc on Wednesday July 26, 2017 @06:09PM (#14860832)
That's pretty cool! I started trying to learn perl6 and write my first interesting program. I have a copy of 'ray tracing in a weekend' and am trying to translate the basic ray tracer from c++ to perl6.

It's remarkably slow right now.. It takes 1.5 minutes to generate an image. I tried to do the same thing in Julia and it takes 1.5 seconds. So I guess I must be doing something wrong!

Re:Why I’m Learning Perl 6 by Ultimatt on Monday July 31, 2017 @06:54PM (#14896575)
Probably not wrong but quite possibly in a way that's not been optimised well. I'm sure people on Freenode IRC #perl6 would be interested in your work. Don't forget `perl6 --profile script.p6` gives nice profiler output out of the box!
Re:Why I’m Learning Perl 6 by raiph on Thursday July 27, 2017 @01:28AM (#14862897)
Maybe it'd be fun to hack on https://github.com/raydiak/pray?