brrt ... but always-allocating them and removing them if unused may be better 00:00
okay, better idea for my struct-union idea; let's make the union on the level of the tree arrays 00:14
that's not going to work, naively, with the MVM_VECTOR stuff, but we can hack arround that 00:15
and one of the ways to work arround it is to use anonymous structs in an anonymous union 00:25
timotimo pvk.ca/Blog/2017/12/22/appnexus-co...rs-faster/ - i've had this open for days now. anyone interested in getting this integer stringification function for moarvm? :) 00:29
jnthn Time for me to rest; back in the morning o/ 00:31
timotimo night jnthn
brrt good night 00:32
i forgot about the tree-relative label
which also needs stashing somewhere 00:33
00:36 Geth joined 01:16 nativecallable6 joined 01:17 unicodable6 joined, quotable6 joined 03:01 ilbot3 joined 03:57 bloatable6 joined 05:21 MasterDuke joined 05:52 Kaiepi joined 07:06 brrt joined
brrt good * 07:06
08:05 zakharyas joined 08:09 zakharyas1 joined 08:19 brrt joined 09:06 zakharyas joined 10:05 zakharyas1 joined
jnthn o/ 10:12
Geth MoarVM: ac123bb0b4 | (Jonathan Worthington)++ | build/Makefile.in
Refuse to make release with dirty work tree
10:37
jnthn There's now a moarvm.org/releases/MoarVM-2017.12.1.tar.gz 10:46
dogbert2_ jnthn++: looks like your energy is returning :-) 10:48
brrt \o/ 11:01
dogbert2_ o/ brrt 11:10
brrt \o dogbert2_
my next plan, before doing the COND stuff, is to try and move internal-label assignment to tiling 11:11
the tiler actually has more information (it knows the absolute offset of the internal labels) and any work the tiler does will not be disrupted by the optimizer (since the optimzer runs before the tiler) 11:12
lizmat brrt: I understand there's still a lot of grunt work to be done to have JITting applied to more situations 11:13
11:13 ilmari joined
lizmat is that correct ? 11:13
brrt kind of yes
we need moar templates
which in all likelihood will uncover bugs 11:14
which will need fixing then
lizmat do we have an "on-ramp" so more people could create these templates ?
brrt we have some documentation, but it is probably not enough 11:21
lemmecheck
github.com/MoarVM/MoarVM/blob/mast...#operators this should help prospective JIT hackers on their way for a bit 11:23
but it could be more complete i hthink 11:24
dogbert2_ speaking of optimizations, wasn't timtoady's ++ opt removed for some reason before the last release? 11:31
m: say Any.skip(*-1) # is this something that should be fixed or should I change the docs? 11:44
camelia Cannot resolve caller tail(Any: Int); none of these signatures match:
(Any:D $: *%_)
(Any:D $: $n, *%_)
in block <unit> at <tmp> line 1
dogbert2_ docs.perl6.org/routine/skip#(Any)_method_skip 11:45
sigh, ww
lizmat brrt: would be nice if there were a "so you want to help adding templates for the JIT" guide 11:51
brrt things can definitely be easier, i agree 11:52
problem is i barely have enough time to write a blog post as it is :-(
lizmat brrt: when you get to far ahead of everybody else, we won't be able to keep up with you :-) 11:53
*too
brrt true 11:54
yeah,
the project needs to be shared a bit better :-) 11:55
lizmat it will only make things easier for *you* also in the long run
brrt uhuh
jnthn m: say 1.569 / 1.974 12:04
camelia 0.794833
jnthn I may have a set of changes that lets Block.clone be inlined 12:09
(testing now)
lizmat ooh
jnthn The 20% speedup above is for a loop that does nothing else but take a closure 5 million times
lizmat i guess we have a lot of that going on :-) 12:10
jnthn Yup 12:11
NQP and Rakudo make test are both OK; spectest can run while I lunch 12:13
(doing this with spesh blocking/nodelay)
bbiab
dogbert2_ follows jnthn's lunch tip 12:15
lizmat has a banana and another cuppa 12:18
brrt also grabs a cuppa 12:19
jnthn back from a bowl of borscht 12:45
Tests look good 12:46
ilmari has discount vouchers for two different lunch places and is having decision paralysis
neither is great, but at half price they're both attractive options 12:47
jnthn Have two lunches?
ilmari one of the vouchers is two courses for Ā£10 including beer
the other is 50% off, but doesn't serve beer
the question is, do I want beer? I accidentally brewdog last night... 12:48
jnthn They recently finished fixing the tram line heading east from here; this means I've now got a craft beer store that I can visit in about a 30 minute round trip. And the selection is pretty good. 12:50
ilmari nice. we have several good pubs with good food (e.g. the aforementioned brewdog), but they're all 10-15 min walk from the office, so not really convenient for everyday lunch 12:54
we do traditionally go to one of them for friday lunch, though 12:55
Geth MoarVM: db706bb7df | (Jonathan Worthington)++ | 6 files
Allow some cross-HLL inlining

Mark ops that actually use data that involves the current HLL. Then only refuse to inline if one of those ops is encountered. This means we can inline bits of NQP (usually guts like Block.clone) into Perl 6 routines that call them.
12:56
jnthn m: say 1.456 / 1.569 13:27
camelia 0.927980
moritz so 7% speedup? 13:28
jnthn Yeah
moritz nice!
jnthn That's not for the above commit, which gave 20%
lizmat bump ok?
jnthn This is a further 7%
lizmat ah
I'll wait a bit then
moritz even nicer!
13:36 travis-ci joined
travis-ci MoarVM build errored. Jonathan Worthington 'Allow some cross-HLL inlining 13:36
travis-ci.org/MoarVM/MoarVM/builds/327217871 github.com/MoarVM/MoarVM/compare/a...706bb7dfa6
13:36 travis-ci left
jnthn ouch, looks like all our Linux builds are busted due to an error from apt 13:46
Geth MoarVM: 1e2a3fbe9f | (Jonathan Worthington)++ | src/spesh/facts.c
Place facts on a `clone` op

This results in better code-gen of things that clone; for example,
  `Block.clone` in Rakudo gets a 7% boost thanks to this fact allowing
for better code-gen.
brrt :-o wow 14:00
jnthn++
timotimo so, um. if hllize and all these hlllist and hllhash ops block some inlines here and there, we can totally use hllizefor and wval for those, right? 14:01
jnthn True
Didn't analyze it to see how many such cases there are
timotimo ah, i was about to ask if you have logging for that 14:02
14:02 zakharyas joined
lizmat looks like .05 improvement for test-t, no discernible difference for test-t --race 14:02
and that's without this last commit :-)
jnthn Currently looking at ASSIGN-POS
In Array
It's well over the inline limit, thanks to all the paths it can handle 14:03
Also it seems to fetch $!reified multiple times
Seeing if I can make things faster
lizmat jnthn: instead of Failure.new(X::OutOfRange.new( :what($*INDEX // 'Index'),:got($pos),:range<0..^Inf>)), 14:04
would a private method taking a single $pos argument help ?
jnthn Perhaps, but all the $!todo case isn't helping matters at all
And lazy arrays ain't that common 14:05
lizmat well, true
sometimes I think we need a second List Refactor :-)
jnthn Well, careful analysis and tuning more like :)
lizmat re multiple fetching of $!reified: this at one point empirically proved to be beneficial as you wouldn't need any lexical vars 14:06
jnthn: are you saying that's not such a bad thing anymore?
jnthn Depends, will have to look at the bytecode :) 14:07
lizmat ack
jnthn Yeah, just moving out the Failure creation helps but is not sufficient 14:13
Geth MoarVM/jit-expr-optimizer: 3668184981 | (Bart Wiegmans)++ | docs/jit/todo.org
Update todo.org documentation

On plans to include new 'COND' node and to move label assignment
14:14
timotimo we don't output the sizes of routines in the spesh log, right? maybe it'd be interesting to get a per-BB size, too (we do have the ip "addresses" at the beginning of each BB, though, i think?) 14:16
14:19 committable6 joined
jnthn Got a patch to try, but time for language lesson; bbl 14:23
14:38 ggoebel joined
MasterDuke timotimo: did you see my comments in #whateverable? 14:56
timotimo no, sorry, and now is RSI rest break 15:00
MasterDuke no worries, i'm out and about soon myself. just wanted to mention it (printing integers fast) was something i had a small interest in 15:03
does anyone else have a problem building nqp when moarvm was built with --valgrind? seems to have just broken 15:11
15:19 FROGGS joined
dogbert2_ yes, there's something broken with that switch 15:25
MasterDuke i built with that flag a day or two ago, so it must be one of the recent commits 15:50
jnthn back 15:51
16:12 squashable6 joined 16:27 brrt joined 16:34 domidumont joined 16:54 travis-ci joined
travis-ci MoarVM build errored. Jonathan Worthington 'Place facts on a `clone` op 16:54
travis-ci.org/MoarVM/MoarVM/builds/327236524 github.com/MoarVM/MoarVM/compare/d...2a3fbe9faf
16:54 travis-ci left 16:58 hoelzro joined
Geth MoarVM: 65098f05b2 | (Jonathan Worthington)++ | src/spesh/facts.c
Make log facts tolerate the odd outlier

If a type shows up less than one time in a hundred, then just go on with the specialization, and let deopt handle the rare path. This nets us a win in cases like `for ^10000 { @a[$_] = 0 }`, where the first time in `AT-POS` we have no $!reified buffer, but every time after that we do. (Note this will adapt naturally to whether program tends to initialize lots of arrays and do little with them, or initialize few arrays and do lots with them.)
17:12
17:23 coverable6 joined, benchable6 joined 17:26 domidumont joined
timotimo oh, nice 17:29
jnthn Hmm, odd. I just added optimize_not_i which can become a constant if the input is also constant 17:37
Helps with the thing I was working on
But it immediately blows up the NQP build with spesh stressing turned on
timotimo i recall doing the same thing and finding problems as well 17:38
jnthn wow, even without spesh stressing it explodes 17:39
timotimo i wonder if it explodes in combination with the if/unless optimizations
17:39 bisectable6 joined
jnthn Dunno 17:40
timotimo i seem to recall that also tries to flip if/unless around if there's a not involved? maybe?
jnthn Don't see that, no 17:41
Not in spesh, at least :)
timotimo then i must have planned it and forgotten almost all about it
17:44 zakharyas joined
jnthn Yeah, really don't see what this not_i opt is breaking right away 17:49
Will have to dig some more tomorrow
timotimo where did you find this opportunity? 18:09
18:52 Kaiepi joined 18:55 Kaiepi joined 19:20 ggoebel joined
jnthn timotimo: SomeType:U in a signature. The :U compiles into isconcrete, not_i, assertparamcheck. The isconcrete is rewritten to a constant thanks to the arg guard (or proof from the caller/inliner), the not_i not being turned into a constant also blocked the removal of the assertparamcheck, however. That in turn blocks inlining. 19:36
timotimo: So effectively, the opportunity is "inline things with a :U" 19:37
postfix:<++>(Any:U) is the one I noticed
19:39 greppable6 joined 19:40 japhb joined
lizmat ah, that should help autiviv on hashes 19:49
jnthn Yeah, just will need to debug the breakage that shows up when I put in this opt
Should have time tomorrow
Also in my plans for the near future: compile some very simple cases of supply blocks into something cheaper (of note, `supply emit blah;` and `supply whenever $foo { #`(no nested whenevers) }`, and also work on some code-gen improvements for the regex engine 19:51
timotimo that's a nice opportunity :) 20:14
hm, that means whenevers are only ever resolved lexically, yeah? 20:15
jnthn Yeah, actually it's a compile-time error to have a whenever misplaced 20:17
m: whenever 1 { }
camelia Cannot have a 'whenever' block outside the scope of a 'supply' block
in block <unit> at <tmp> line 1
20:59 evalable6 joined 21:14 travis-ci joined
travis-ci MoarVM build errored. Jonathan Worthington 'Make log facts tolerate the odd outlier 21:14
travis-ci.org/MoarVM/MoarVM/builds/327324440 github.com/MoarVM/MoarVM/compare/1...098f05b2b0
21:14 travis-ci left
lizmat m: CONTROL { dd $_ }; warn "foo" # probably DIHWIDT, but thought I'd mention nonetheless 21:23
camelia CX::Warn.new(message => "foo")
MoarVM panic: Trying to unwind over wrong handler
[Coke] j: CONTROL { dd $_ }; warn "foo" 21:24
camelia CX::Warn.new(message => "foo")
foo
in block <unit> at <tmp> line 1
jnthn Hm, if it gives that error it means it's more confused that it ought to be :) 21:28
*than
lizmat should I make an issue for it, jnthn ? 21:58
jnthn You can, though there may be one already; it feels semi-familiar 22:00
lizmat checks 22:01
github.com/MoarVM/MoarVM/issues/572 # seems to be a simpler case of this one 22:02
added a comment with my golf 22:04
jnthn Thanks 22:09
jnthn wanders back to the kitchen 22:10
22:12 brrt joined 22:32 releasable6 joined, statisfiable6 joined, reportable6 joined 22:38 Zoffix joined
Zoffix FWIW rakudo fails to compile on HEAD, HEAD, HEAD: "Stage parse : MoarVM oops: Spesh: failed to fix up handlers (176, -1, -1)" 22:39
+ my mod in actions... but I think I saw that failure in one of travis jobs 22:40
simply retrying to compile works 22:41
crashed again (/me tries last bump in nqp at 2017.12.1-25-g1e2a3fb) 22:48
22:53 Zoffix left
jnthn Hm, thought I'd tried that with spesh stressing even 23:03
Will take a look in the morning 23:05