News for hackers. Stuff that matters.
Re:Is Perl 6 Being Renamed? by 6thaccount2 on Thursday August 29, 2019 @05:22PM (#20833829)
Some things are already significantly faster, but there are other common operations that are still slower.

I wonder if the JIT will interfere with scripts where startup time is not acceptable?

Re:Is Perl 6 Being Renamed? by petre on Friday August 30, 2019 @12:07AM (#20835906)
I did some tests for prime number crunching. For example the C-style loop statement is faster than Perl's own foreach. Perl6 was the slowest of them all while the fastest was LuaJIT. The whole code is two loops with a bunch of multiplications and additions, an array push, loading a hash and looking up values in it.

https://news.ycombinator.com/item?id=16720027

Re:Is Perl 6 Being Renamed? by colomon on Friday August 30, 2019 @08:23AM (#20837830)
This seems like a very odd standard to use? I understand that you wanted to compare performances of different languages, that's great.

But if you actually wanted to get the job done idiomatically, the code is one short, simple line of Perl 6. The performance, while admittedly slower, is within the same order of magnitude as your Perl 5 version.

To me, this is the magic of Perl 6. Sure, if you want to use 16 lines of loopy integer-crunching code to calculate the first N primes and you care about speed, Perl 6 should not be your choice. On the other hand, if you'd prefer to say

  (1..$N).grep(*.is-prime) 
and get the answer back in reasonable speed, Perl 6 is perfect.
Re:Is Perl 6 Being Renamed? by petre on Sunday September 01, 2019 @12:20AM (#20850463)
It's just stuff that I use daily in normal code, so this benchmark pretty much serves the pupose very well: it uses mundane operations, also uses memory, one can adjust it by raising the bar 10x times, so the actual algorithm takes several orders of magnitude longer than the JIT penalty. In fact most of the interpreted languages would pretty much crunch for minutes at 10⁴, while Go, Crystal, D and Rust would take seconds or tens of seconds. Perl6 is basically stuck there forever and at the other end of the spectrum are Node and Dart. LuaJIT would run out of memory at that figure, otherwise it's among the fastest.
Re:Is Perl 6 Being Renamed? by 6thaccount2 on Friday August 30, 2019 @02:12PM (#20841051)
That is impressive!