|go ahead... be a heretic|
Re^7: sort +*, @arrayby raiph (Hermit)
|on Dec 13, 2013 at 00:31 UTC||Need Help??|
I anticipate a lot more speed up again in 2014
First, most optimization is yet to come (at all four levels of the compiler toolchain -- Rakudo, NQP, codegen, VM). As I said, rightly or wrongly, they've left most actual optimization (as against designing for optimization capacity) till the last mile.
Second, I see increasing focus on this. For example jnthn landed a commit about a week ago to optimize an aspect of JVM codegen that made the Rakudo/JVM spectest suite run about 10% faster.
If the C code that implements/underlies NQP is not efficient...
NQP is written in NQP so you're talking about the VMs it runs on. I agree that it's important for the long term prospects of Rakudo that one or more of these fairly efficiently runs NQP. (This was one of the reasons for creating MoarVM.)
Your parenthetical ... sounds like a promise; or wild speculation; or dumb over enthusiasm.
A key justification for having the NQP layer of the Rakudo architecture was enabling those with just high level language chops and comfort with Perl syntax to start usefully hacking on the compiler toolchain, including optimization.
For example, timotimo (who was focused on python before he bumped in to P6) recently dropped some boyer-moore logic into the regex engine (which is written in NQP).
For anyone interested in NQP, check out these excellent materials from a weekend workshop introducing NQP.
Equally, claiming that +* is "a direct equivalent which retains the ST's generality and efficiency and substantially improves on its elegance." is hyperbole. Which does more harm than good.
I agree the way I wrote that up was confusing and hope to do better next time.
That said, I can accept monks disliking my poor communication, but I don't want that to lead to misunderstanding of the P6 sort builtin design (not yet fully implemented). Please carefully read the latter half of my response to BrowserUK's example to see its correspondence to ST.
»ö« . o O ( "the celebrity tell-all of the Perl-6 cult?" )