Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
MasterDuke hm, i haven't been able to construct an example that behaves differently without the try 14:32
timo: think you could make some more updated appimages? 14:34
MasterDuke well, at least for this example i'm working with, it looks like it's not too hard to gen better code in Actions.nqp 16:37
not as big of a run-time difference as i'd hoped though 16:57
m: my $t = ("errors.md.tmpl" xx 1_000).join(" foo "); my $page; my $s = now; for ^1_000 { $page = $t.clone; $page ~~ s:g[ "foo" ] = "a" }; say now - $s;     # locally this drops from ~2.60s to ~2.26s 17:04
camelia 2.681882169
MasterDuke now down to ~2.1s 17:15
m: my $t = ("errors.md.tmpl" xx 5).join(" foo "); my $page; my $s = now; for ^10_000 { $page = $t.clone; $page ~~ s:g[ "foo" ] = "a" }; say now - $s;       # and this drops from ~0.48s to ~0.44s 17:20
camelia 0.416483535
MasterDuke though that's with a fast path added to !APPLY-MATCHES 17:23
~2.03s with a slightly faster fast path 17:33
though i would like to know why that assignment has to happen in the loop and can't just be done at the end 17:35
[Coke] so, not a lot of luck trying to golf my malloc issue; any other suggestions? Reducing nursery size, maybe? 17:43
MasterDuke you turned on MVM_GC_DEBUG? 17:44
if so, then yeah, reducing the nursery might help. dogbert17 might have some other suggestions 17:47
afk for dinner, etc.
[Coke] ... oh. MVM_GC_DEBUG isn't an env var, is it 18:19
re-re-re-compiling. :) 18:26
[Coke] I assume I can tell it's working because it's sooooo sloooow now. :) 18:40
(maybe I shouldn't have jumped from 0 to 3) 18:50
dogbert17 MVM_GC_DEBUG=3 is by far the slowest setting 18:55
most of the time I tend to use MVM_GC_DEBUG=1 and a nursery size of a few kilobytes 18:57
MasterDuke huh, i've run into this from time to time, but why aren't private multi-methods supported? 21:37
[Coke] ... crap. the debug run just finished. no output, nothing. 22:30
(just the one line I've come to expect from the broken run)
Was I supposed to attach a debugger or something?
MasterDuke the un-golfed version that you expected to fail?
[Coke] y 22:32
yes
I think I assumed I'd get debug output or a new failure mode or something. my bad, should have checked first. 22:33
MasterDuke huh. MVM_SPESH_NODELAY=1 and/or MVM_SPESH_BLOCKING=1 changed anything? 22:34
MasterDuke m: my $m = ("a " x 1_000) ~~ m:g/\w/; my int $a = 0; my $s = now; for ^10_000 { $a++ for flat $m }; say now - $s; say $a 22:36
camelia 0.938690274
10000000
MasterDuke m: my $m = ("a " x 1_000) ~~ m:g/\w/; my int $a = 0; my $s = now; for ^10_000 { $a++ for @$m }; say now - $s; say $a
camelia 0.206832283
10000000
MasterDuke m: my $m = ("a " x 1_000) ~~ m:g/\w/; my int $a = 0; my $s = now; for ^10_000 { $a++ for $m.list }; say now - $s; say $a 22:37
camelia 0.211387123
10000000
MasterDuke i thought `.list` instead of `flat` would be a nice change here github.com/rakudo/rakudo/pull/4807...4804R1814, but instead i get an error that i have no idea why it's happening 22:38
during installation too, not while compiling rakudo 22:44
gist.github.com/MasterDuke17/e945b...5455dc5e48 if anyone is curious 22:52