»ö« #raku and #raku-dev are OPEN FOR BUSINESS | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by mst on 15 October 2019.
melezhik Hi! When the first release of Raku ( new name ) is expected? I am trying to estimate when start to rewrite my code for Raku ... 02:56
melezhik looks like there is some information here - github.com/perl6/problem-solving/issues/118 03:02
finanalyst Is there anyone here that could help me with an optimisation issue? I've written a new module to replace Pod::To::HTML but it is 3x slower, and I'm trying to work out why 13:50
timotimo sure 13:53
finanalyst: i'm the moarperf developer, so that's kind of sort of my job :P
finanalyst great. I have run `time raku --doc=HTML small-prog` and got real:0.2ms, user:0.3s,sys:0.0ms, then run `time raku -Ilib --doc=HTML small-prog` and got r:2.1ms, u:3.2ms, s:0.1` 13:56
When I ran raku with --profile, however, the standard module uses more time than the new one 13:57
So, for standard 'The profiled code ran for 139.28ms', while new is 'The profiled code ran for 81.16ms' 13:58
timotimo ok, interesting 13:59
finanalyst This indicates to me that my actual code is more efficient, but that it is calling an inefficient module (Template::Mustache)
timotimo can you try --stagestats to see if there's any precompilation going on?
the profiler should also show time spent in modules you're using
oh, also
the html profiler doesn't do multithreaded stuff
you'll want moarperf for that
finanalyst timotimo: i'll try stagestats, but I can't find module information easilty, the graphs are a bit difficult to interpre 14:00
Both codes use a >> on the pod-tree, but for the simple files there is only one very short Pod::Block, so that should not affect performance 14:01
timotimo would you be willing to give moarperf a try? 14:02
finanalyst I tried both on the largest pod file in docs/ but the same timing ratio seemed to be showing up, eg. my modules is 3x slower
By the way, I have handled double calls to render by the raku compiler using a state variable 14:03
timotimo: moarperf, sure. where and how to get/use it? 14:04
timotimo github.com/timo/moarperf/releases/...646d6875ae
it's a little cro app
you'll want to --profile=/tmp/profile.sql to get a compatible output file
or if your rakudo is a little older it'll be --profile --profile-filename=/tmp/profile.sql
finanalyst looking
I have Rakudo version 2019.07.1 built on MoarVM version 2019.07.1 14:05
do I need to update?
timotimo nope, that's new enough by far
finanalyst timotimo: installation instruction? 14:06
timotimo "zef install --deps-only ."
if you want it faster --/tests will help 14:07
finanalyst great
timotimo then perl6 -I. service.p6 /tmp/profile.sql
if you could check the readme and point out possible improvements, that'd be appreciated
maybe an INSTALLING file?
finanalyst I'll look now. 14:08
Woodi hi #perl6 :) 14:26
"PHP7 will release FFI at the end of _next_ month" :) and our lovely lang already have it for how many years ? :) www.phoronix.com/scan.php?page=new...Good-Shape 14:27
finanalyst timotimo: downloaded moarperf and will test and look at help etc. BUT also ran stagestats on both. Big difference 14:56
For standard module, stage parse: 0.133, for myMod, stage parse 2.128 14:57
timotimo stage parse includes loading modules 14:58
in an even newer rakudo --stagestats will display other "nested" stagestats
like for modules that are precompiled on demand
gist.github.com/timo/7636a95326651...056fabc9e1 - here's an example for moarperf 14:59
finanalyst This found the answer mostly. I had a 'no precompilation' in one of my classes for debugging
timotimo perfect
finanalyst Thank you! 15:00
timotimo you're very welcome 15:01
actually, the profiler could totally record the time-since-vm-start-when-profiling-was-initiated 15:02
and the frontend could suggest "hey btw the profiler only recorded the last 5% of execution time; maybe you want to check if compilation is slow?"
finanalyst I think it would have helped if the information from stagestats could be included in the profiler overview 15:03
and like what you just said
timotimo anyway i'm glad we got that sorted; finanalyst, how much faster is your new version? 15:31