Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-02-01

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

All times shown according to UTC.

Time Nick Message
00:53 lizmat joined #moarvm
01:29 colomon joined #moarvm
01:45 ilbot3 joined #moarvm
01:45 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
01:52 avar joined #moarvm
01:52 colomon_ joined #moarvm
02:48 ilbot3 joined #moarvm
02:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
03:25 colomon joined #moarvm
07:40 FROGGS[mobile] joined #moarvm
08:19 lizmat joined #moarvm
08:39 __rnddim__ joined #moarvm
08:39 xiaomiao joined #moarvm
08:42 colomon_ joined #moarvm
08:54 rurban joined #moarvm
09:07 FROGGS joined #moarvm
09:07 FROGGS[mobile] joined #moarvm
09:20 kjs_ joined #moarvm
09:38 brrt joined #moarvm
09:52 FROGGS joined #moarvm
10:04 brrt left #moarvm
10:18 rurban joined #moarvm
10:24 synopsebot joined #moarvm
11:18 vendethiel joined #moarvm
11:41 ggoebel111111112 joined #moarvm
12:08 brrt joined #moarvm
12:31 sivoais joined #moarvm
13:32 FROGGS joined #moarvm
13:50 brrt joined #moarvm
13:53 FROGGS[mobile] joined #moarvm
15:05 FROGGS[mobile] joined #moarvm
15:15 kjs_ joined #moarvm
15:27 zakharyas joined #moarvm
15:32 FROGGS[mobile] joined #moarvm
16:32 LLamaRider joined #moarvm
17:15 FROGGS[mobile] joined #moarvm
17:19 FROGGS[mobile]2 joined #moarvm
17:28 FROGGS[mobile] joined #moarvm
17:42 FROGGS[mobile] joined #moarvm
17:52 FROGGS[mobile] joined #moarvm
17:55 rurban joined #moarvm
18:10 FROGGS[mobile] joined #moarvm
18:25 FROGGS[mobile] joined #moarvm
19:13 colomon joined #moarvm
19:32 kjs_ joined #moarvm
19:33 colomon joined #moarvm
19:44 colomon joined #moarvm
19:59 colomon joined #moarvm
20:10 kjs_ joined #moarvm
20:52 zakharyas joined #moarvm
21:37 kjs_ joined #moarvm
22:10 kjs_ joined #moarvm
22:23 brrt joined #moarvm
22:32 chrisseaton joined #moarvm
22:37 chrisseaton hi - I was reading this presentation http://jnthn.net/papers/2014-yapceu-performance.pdf and it looks like MoarVM does AST specialisation before the JIT runs - is that the case? who's the expert on that because I'm interested in how you're doing it
23:00 timotimo it's not really AST specialization
23:01 timotimo it's at the bytecode level
23:02 timotimo i'm not sure what exact part you're interested in, but i'd say it all begins at the callsite structure
23:02 timotimo where for every op in the bytecode we compile (into the .moarvm files) that has some kind of invocation semantic we reserve a callsite
23:02 chrisseaton I work on the Truffle project - it's a language implementation framework that does AST specialisation via self-rewriting nodes based on profiling - so when I saw AST specialisation I was interested
23:02 timotimo callsites store the number of required and optional positional arguments as well as the number (and names) of named arguments
23:02 timotimo equal callsites will be interned to become "the same callsite"
23:03 timotimo a callsite + a target code object gives us a "candidate", which can store how hot MoarVM considers it
23:04 timotimo and when it gets hot, we'll use the information from "what the callsite is" and a bit of extra information like "what types are common for these arguments" and create better bytecode for the target code object
23:04 timotimo do you have a moarvm installation on your machine already?
23:04 timotimo perhaps even a rakudo-moar compiler?
23:04 chrisseaton no, never programmed Perl
23:04 timotimo i never programmed perl 5 or earlier, either ;)
23:04 chrisseaton I was reading the MoarVM source code though
23:05 timotimo even when you just run "say('hello world')" in nqp-p, you'll get a sufficient amount of things that have been specialized
23:05 timotimo let me just paste a log for you
23:07 timotimo http://sprunge.us/UMLe
23:07 timotimo specialization results in three pieces of dump being written:
23:07 timotimo first, when something is considered hot, we'll generate a version of the bytecode that logs types and values all over the place
23:07 timotimo that'll give you the blocks of "inserting logging information" with "before" and "after"
23:08 timotimo and when logging is finished (i think we run the same code about 10 times or so?) spesh will write out a new dump containing the bytecode after every optimization we've done
23:09 timotimo it's already bedtime for me over here
23:09 timotimo i hope my little overview was useful at all
23:09 timotimo i don't really see where you got the AST-based specialization thingie from, though
23:09 chrisseaton yeah that's useful thanks - i'd call this bytecode 'quickening'
23:09 timotimo this is all based on a SSA form of the bytecode
23:09 chrisseaton http://jnthn.net/papers/2014-yapceu-performance.pdf
23:09 chrisseaton slide 15 definitely says the AST is specialised
23:10 timotimo nope
23:10 timotimo the optimizer is static
23:11 timotimo we only consider run-time optimizations that use run-time gathered data (like hotness and incoming types and used callsites) "specialization"
23:11 chrisseaton does 'improved AST' refer to something else then?
23:11 timotimo there's the NQP Optimizer and the Rakudo Optimizer (called "Perl 6 Optimizer" in the slides) that change AST
23:11 timotimo yes, the code-gen often spits out horribly bad ASTs
23:12 timotimo a very simple example is the AST for the regex / ^ "foo" /
23:12 chrisseaton ah, I get it - the AST improvement is static before the byte code specialisation
23:12 chrisseaton ok thanks
23:12 timotimo correct
23:12 timotimo the AST for that regex is "try to match the following at every point in the target text: is it the beginning of the string? if yes, does it say 'foo' here?"
23:13 timotimo that gets turned into "does it say 'foo' at the beginning of this string?" by the Regex Optimizer (that lives in nqp)
23:15 timotimo if you have more questions and have a bit of patience, you can just write them in here; i routinely backlog. other MVM developers do, too
23:16 chrisseaton ok, thanks very much for that
23:16 timotimo you're welcome :)
23:16 timotimo i enjoy talking about stuff i'm enthusiastic about
23:16 timotimo (seems kind of tautologic)
23:39 japhb timotimo: Some people like to *do* but not *talk*.  Others like to do both.  :-)
23:41 timotimo i've been a bit low on the "do" recently
23:41 timotimo will pick up a bit more steam (no, not Steam) in a week at the very earliest
23:45 japhb All my "do" is hidden in the shadows.  Mildly frustrated that I have nothing visible at the moment.
23:55 raydiak can anyone check this out before I make a PR which includes it? I'm still new to moar and very fuzzy on c, but it looked quite wrong, to me: https://github.com/raydiak/MoarVM/commit/172048c53389581710bb741dfeff9d1845a85fe7
23:56 raydiak wanted to ask FROGGS++ himself, but lives'n'timezones'n'FOSDEMs'n'stuff have been frustrating that

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