Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2018-01-10

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 brrt ... but always-allocating them and removing them if unused may be better
00:14 brrt okay, better idea for my struct-union idea; let's make the union on the level of the tree arrays
00:15 brrt that's not going to work, naively, with the MVM_VECTOR stuff, but we can hack arround that
00:25 brrt and one  of the ways to work arround it is to use anonymous structs in an anonymous union
00:29 timotimo https://pvk.ca/Blog/2017/12/22/appnexus-common-framework-its-out-also-how-to-print-integers-faster/ - i've had this open for days now. anyone interested in getting this integer stringification function for moarvm? :)
00:31 jnthn Time for me to rest; back in the morning o/
00:31 timotimo night jnthn
00:32 brrt good night
00:32 brrt i forgot about the tree-relative label
00:33 brrt which also needs stashing somewhere
00:36 Geth joined #moarvm
01:16 nativecallable6 joined #moarvm
01:17 unicodable6 joined #moarvm
01:17 quotable6 joined #moarvm
03:01 ilbot3 joined #moarvm
03:01 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
03:57 bloatable6 joined #moarvm
05:21 MasterDuke joined #moarvm
05:52 Kaiepi joined #moarvm
07:06 brrt joined #moarvm
07:06 brrt good *
08:05 zakharyas joined #moarvm
08:09 zakharyas1 joined #moarvm
08:19 brrt joined #moarvm
09:06 zakharyas joined #moarvm
10:05 zakharyas1 joined #moarvm
10:12 jnthn o/
10:37 Geth ¦ MoarVM: ac123bb0b4 | (Jonathan Worthington)++ | build/Makefile.in
10:37 Geth ¦ MoarVM: Refuse to make release with dirty work tree
10:37 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ac123bb0b4
10:46 jnthn There's now a http://moarvm.org/releases/MoarVM-2017.12.1.tar.gz
10:48 dogbert2_ jnthn++: looks like your energy is returning :-)
11:01 brrt \o/
11:10 dogbert2_ o/ brrt
11:10 brrt \o dogbert2_
11:11 brrt my next plan, before doing the COND stuff, is to try and move internal-label assignment to tiling
11:12 brrt 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:13 lizmat brrt: I understand there's still a lot of grunt work to be done to have JITting applied to more situations
11:13 ilmari joined #moarvm
11:13 ilmari joined #moarvm
11:13 lizmat is that correct ?
11:13 brrt kind of yes
11:13 brrt we need moar templates
11:14 brrt which in all likelihood will uncover bugs
11:14 brrt which will need fixing then
11:14 lizmat do we have an "on-ramp" so more people could create these templates ?
11:21 brrt we have some documentation, but it is probably not enough
11:21 brrt lemmecheck
11:23 brrt https://github.com/MoarVM/MoarVM/blob/master/docs/jit/overview.org#operators this should help prospective JIT hackers on their way for a bit
11:24 brrt but it could be more complete i hthink
11:31 dogbert2_ speaking of optimizations, wasn't timtoady's ++ opt removed for some reason before the last release?
11:44 dogbert2_ m: say Any.skip(*-1) # is this something that should be fixed or should I change the docs?
11:44 camelia rakudo-moar 7230b7651: OUTPUT: «Cannot resolve caller tail(Any: Int); none of these signatures match:␤    (Any:D $: *%_)␤    (Any:D $: $n, *%_)␤  in block <unit> at <tmp> line 1␤␤»
11:45 dogbert2_ https://docs.perl6.org/routine/skip#(Any)_method_skip
11:45 dogbert2_ sigh, ww
11:51 lizmat brrt: would be nice if there were a "so you want to help adding templates for the JIT" guide
11:52 brrt things can definitely be easier, i agree
11:52 brrt problem is i barely have enough time to write a blog post as it is :-(
11:53 lizmat brrt: when you get to far ahead of everybody else, we won't be able to keep up with you :-)
11:53 lizmat *too
11:54 brrt true
11:54 brrt yeah,
11:55 brrt 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
11:55 brrt uhuh
12:04 jnthn m: say 1.569 / 1.974
12:04 camelia rakudo-moar 7230b7651: OUTPUT: «0.794833␤»
12:09 jnthn I may have a set of changes that lets Block.clone be inlined
12:09 jnthn (testing now)
12:09 lizmat ooh
12:09 jnthn The 20% speedup above is for a loop that does nothing else but take a closure 5 million times
12:10 lizmat i guess we have a lot of that going on  :-)
12:11 jnthn Yup
12:13 jnthn NQP and Rakudo make test are both OK; spectest can run while I lunch
12:13 jnthn (doing this with spesh blocking/nodelay)
12:13 jnthn bbiab
12:15 * dogbert2_ follows jnthn's lunch tip
12:18 * lizmat has a banana and another cuppa
12:19 * brrt also grabs a cuppa
12:45 * jnthn back from a bowl of borscht
12:46 jnthn Tests look good
12:46 * ilmari has discount vouchers for two different lunch places and is having decision paralysis
12:47 ilmari neither is great, but at half price they're both attractive options
12:47 jnthn Have two lunches?
12:47 ilmari one of the vouchers is two courses for £10 including beer
12:47 ilmari the other is 50% off, but doesn't serve beer
12:48 ilmari the question is, do I want beer? I accidentally brewdog last night...
12:50 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:54 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:55 ilmari we do traditionally go to one of them for friday lunch, though
12:56 Geth ¦ MoarVM: db706bb7df | (Jonathan Worthington)++ | 6 files
12:56 Geth ¦ MoarVM: Allow some cross-HLL inlining
12:56 Geth ¦ MoarVM:
12:56 Geth ¦ MoarVM: Mark ops that actually use data that involves the current HLL. Then
12:56 Geth ¦ MoarVM: only refuse to inline if one of those ops is encountered. This means
12:56 Geth ¦ MoarVM: we can inline bits of NQP (usually guts like Block.clone) into Perl 6
12:56 Geth ¦ MoarVM: routines that call them.
12:56 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/db706bb7df
13:27 jnthn m: say 1.456 / 1.569
13:27 camelia rakudo-moar 773d2b9e7: OUTPUT: «0.927980␤»
13:28 moritz so 7% speedup?
13:28 jnthn Yeah
13:28 moritz nice!
13:28 jnthn That's not for the above commit, which gave 20%
13:28 lizmat bump ok?
13:28 jnthn This is a further 7%
13:28 lizmat ah
13:28 lizmat I'll wait a bit then
13:28 moritz even nicer!
13:36 travis-ci joined #moarvm
13:36 travis-ci MoarVM build errored. Jonathan Worthington 'Allow some cross-HLL inlining
13:36 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/327217871 https://github.com/MoarVM/MoarVM/compare/ac123bb0b48d...db706bb7dfa6
13:36 travis-ci left #moarvm
13:46 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
13:46 Geth ¦ MoarVM: Place facts on a `clone` op
13:46 Geth ¦ MoarVM:
13:46 Geth ¦ MoarVM: This results in better code-gen of things that clone; for example,
13:46 Geth ¦ MoarVM: `Block.clone` in Rakudo gets a 7% boost thanks to this fact allowing
13:46 Geth ¦ MoarVM: for better code-gen.
13:46 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/1e2a3fbe9f
14:00 brrt :-o wow
14:00 brrt jnthn++
14:01 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
14:01 jnthn Didn't analyze it to see how many such cases there are
14:02 timotimo ah, i was about to ask if you have logging for that
14:02 zakharyas joined #moarvm
14:02 lizmat looks like .05 improvement for test-t, no discernible difference for test-t --race
14:02 lizmat and that's without this last commit  :-)
14:02 jnthn Currently looking at ASSIGN-POS
14:02 jnthn In Array
14:03 jnthn It's well over the inline limit, thanks to all the paths it can handle
14:03 jnthn Also it seems to fetch $!reified multiple times
14:03 jnthn Seeing if I can make things faster
14:04 lizmat jnthn: instead of Failure.new(X::OutOfRange.new( :what($*INDEX // 'Index'),:got($pos),:range<0..^Inf>)),
14:04 lizmat would a private method taking a single $pos argument help ?
14:04 jnthn Perhaps, but all the $!todo case isn't helping matters at all
14:05 jnthn And lazy arrays ain't that common
14:05 lizmat well, true
14:05 lizmat sometimes I think we need a second List Refactor  :-)
14:05 jnthn Well, careful analysis and tuning more like :)
14:06 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 lizmat jnthn: are you saying that's not such a bad thing anymore?
14:07 jnthn Depends, will have to look at the bytecode :)
14:07 lizmat ack
14:13 jnthn Yeah, just moving out the Failure creation helps but is not sufficient
14:14 Geth ¦ MoarVM/jit-expr-optimizer: 3668184981 | (Bart Wiegmans)++ | docs/jit/todo.org
14:14 Geth ¦ MoarVM/jit-expr-optimizer: Update todo.org documentation
14:14 Geth ¦ MoarVM/jit-expr-optimizer:
14:14 Geth ¦ MoarVM/jit-expr-optimizer: On plans to include new 'COND' node and to move label assignment
14:14 Geth ¦ MoarVM/jit-expr-optimizer: review: https://github.com/MoarVM/MoarVM/commit/3668184981
14:16 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:19 committable6 joined #moarvm
14:23 jnthn Got a patch to try, but time for language lesson; bbl
14:38 ggoebel joined #moarvm
14:56 MasterDuke timotimo: did you see my comments in #whateverable?
15:00 timotimo no, sorry, and now is RSI rest break
15:03 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:11 MasterDuke does anyone else have a problem building nqp when moarvm was built with --valgrind? seems to have just broken
15:19 FROGGS joined #moarvm
15:25 dogbert2_ yes, there's something broken with that switch
15:50 MasterDuke i built with that flag a day or two ago, so it must be one of the recent commits
15:51 * jnthn back
16:12 squashable6 joined #moarvm
16:27 brrt joined #moarvm
16:34 domidumont joined #moarvm
16:54 travis-ci joined #moarvm
16:54 travis-ci MoarVM build errored. Jonathan Worthington 'Place facts on a `clone` op
16:54 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/327236524 https://github.com/MoarVM/MoarVM/compare/db706bb7dfa6...1e2a3fbe9faf
16:54 travis-ci left #moarvm
16:58 hoelzro joined #moarvm
17:12 Geth ¦ MoarVM: 65098f05b2 | (Jonathan Worthington)++ | src/spesh/facts.c
17:12 Geth ¦ MoarVM: Make log facts tolerate the odd outlier
17:12 Geth ¦ MoarVM:
17:12 Geth ¦ MoarVM: If a type shows up less than one time in a hundred, then just go on
17:12 Geth ¦ MoarVM: with the specialization, and let deopt handle the rare path. This nets
17:12 Geth ¦ MoarVM: us a win in cases like `for ^10000 { @a[$_] = 0 }`, where the first
17:12 Geth ¦ MoarVM: time in `AT-POS` we have no $!reified buffer, but every time after
17:13 Geth ¦ MoarVM: that we do. (Note this will adapt naturally to whether program tends
17:13 Geth ¦ MoarVM: to initialize lots of arrays and do little with them, or initialize
17:13 Geth ¦ MoarVM: few arrays and do lots with them.)
17:13 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/65098f05b2
17:23 coverable6 joined #moarvm
17:23 benchable6 joined #moarvm
17:26 domidumont joined #moarvm
17:29 timotimo oh, nice
17:37 jnthn Hmm, odd. I just added optimize_not_i which can become a constant if the input is also constant
17:37 jnthn Helps with the thing I was working on
17:37 jnthn But it immediately blows up the NQP build with spesh stressing turned on
17:38 timotimo i recall doing the same thing and finding problems as well
17:39 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 #moarvm
17:40 jnthn Dunno
17:40 timotimo i seem to recall that also tries to flip if/unless around if there's a not involved? maybe?
17:41 jnthn Don't see that, no
17:41 jnthn Not in spesh, at least :)
17:41 timotimo then i must have planned it and forgotten almost all about it
17:44 zakharyas joined #moarvm
17:49 jnthn Yeah, really don't see what this not_i opt is breaking right away
17:49 jnthn Will have to dig some more tomorrow
18:09 timotimo where did you find this opportunity?
18:52 Kaiepi joined #moarvm
18:55 Kaiepi joined #moarvm
19:20 ggoebel joined #moarvm
19:36 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:37 jnthn timotimo: So effectively, the opportunity is "inline things with a :U"
19:37 jnthn postfix:<++>(Any:U) is the one I noticed
19:39 greppable6 joined #moarvm
19:40 japhb joined #moarvm
19:49 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
19:49 jnthn Should have time tomorrow
19:51 jnthn 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
20:14 timotimo that's a nice opportunity :)
20:15 timotimo hm, that means whenevers are only ever resolved lexically, yeah?
20:17 jnthn Yeah, actually it's a compile-time error to have a whenever misplaced
20:17 jnthn m: whenever 1 { }
20:17 camelia rakudo-moar d30e5b1e3: OUTPUT: «Cannot have a 'whenever' block outside the scope of a 'supply' block␤  in block <unit> at <tmp> line 1␤␤»
20:59 evalable6 joined #moarvm
21:14 travis-ci joined #moarvm
21:14 travis-ci MoarVM build errored. Jonathan Worthington 'Make log facts tolerate the odd outlier
21:14 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/327324440 https://github.com/MoarVM/MoarVM/compare/1e2a3fbe9faf...65098f05b2b0
21:14 travis-ci left #moarvm
21:23 lizmat m: CONTROL { dd $_ }; warn "foo"   # probably DIHWIDT, but thought I'd mention nonetheless
21:23 camelia rakudo-moar 0be9d5520: OUTPUT: «CX::Warn.new(message => "foo")␤MoarVM panic: Trying to unwind over wrong handler␤»
21:24 [Coke] j: CONTROL { dd $_ }; warn "foo"
21:24 camelia rakudo-jvm a92950fb4: OUTPUT: «CX::Warn.new(message => "foo")␤foo␤  in block <unit> at <tmp> line 1␤»
21:28 jnthn Hm, if it gives that error it means it's more confused that it ought to be :)
21:28 jnthn *than
21:58 lizmat should I make an issue for it, jnthn ?
22:00 jnthn You can, though there may be one already; it feels semi-familiar
22:01 * lizmat checks
22:02 lizmat https://github.com/MoarVM/MoarVM/issues/572   # seems to be a simpler case of this one
22:04 lizmat added a comment with my golf
22:09 jnthn Thanks
22:10 * jnthn wanders back to the kitchen
22:12 brrt joined #moarvm
22:32 releasable6 joined #moarvm
22:32 statisfiable6 joined #moarvm
22:32 reportable6 joined #moarvm
22:38 Zoffix joined #moarvm
22:39 Zoffix FWIW rakudo fails to compile on HEAD, HEAD, HEAD: "Stage parse      : MoarVM oops: Spesh: failed to fix up handlers (176, -1, -1)"
22:40 Zoffix + my mod in actions... but I think I saw that failure in one of travis jobs
22:41 Zoffix simply retrying to compile works
22:48 Zoffix crashed again (/me tries last bump in nqp at 2017.12.1-25-g1e2a3fb)
22:53 Zoffix left #moarvm
23:03 jnthn Hm, thought I'd tried that with spesh stressing even
23:05 jnthn Will take a look in the morning

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary