Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-07-27

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

All times shown according to UTC.

Time Nick Message
00:04 timotimo i wonder how come we've gotten faster at the rational benchmarks
00:04 timotimo rat_mul_div_cancel
00:06 timotimo it's interesting that we get improvements across the board
00:06 raiph joined #moarvm
00:06 jnthn Could be that it inlines something now it hadn't used to
00:07 timotimo ah, good point
00:07 jnthn Time for some rest here :)
00:07 jnthn 'night
01:07 FROGGS__ joined #moarvm
03:10 raiph joined #moarvm
06:06 FROGGS__ joined #moarvm
07:10 ventica joined #moarvm
08:35 ventica2 joined #moarvm
10:11 brrt joined #moarvm
10:11 brrt \o
10:14 brrt i can't pretty well figure out how to build moar on windows-64
10:16 brrt i do have the visual studio tools installed and Configure.pl does recognise the toolchain, but probe.pm crashes for some reason
10:19 * brrt afk for a bit
10:25 carlin_ joined #moarvm
10:25 tgt joined #moarvm
10:27 carlin brrt: have you run vcvarsall.bat in the VC directory?
10:49 FROGGS either that or use the developer console
11:00 Ven joined #moarvm
11:41 jnthn brrt: How does it crash?
12:25 raiph joined #moarvm
12:27 Ven joined #moarvm
12:42 tgt joined #moarvm
13:10 brrt joined #moarvm
13:12 brrt left #moarvm
13:13 brrt_ joined #moarvm
13:14 brrt_ oh, after a reboot it apparantly all works
13:14 jnthn Such Windows... :P
13:16 brrt yes, such windows indeed
13:16 brrt or you know, not, apparantly i don't have winsock.h
13:17 jnthn ...what...
13:18 jnthn Try vcvars64.bat
13:18 brrt ok, how do i include that?
13:18 jnthn jsut run it
13:18 jnthn as a command
13:18 jnthn Should set uip various envvars
13:18 brrt uh, let's see
13:19 jnthn What are you running this all at, though? Normal command prompt?
13:19 jnthn There's a Visual Studio Command Prompt you are given normally
13:19 jnthn Which has stuff set up
13:19 brrt well, i tried the normal command prompt + finding some vcvars, but now i run via the visual studio command prompt
13:19 brrt and i'm using the 'x64 cross compiler' because the
13:19 brrt 'regular' command prompt only has x86 support
13:20 brrt apparantly MS is all hot on x86 again, mostly because pointers are half the size
13:21 jnthn wtf...
13:21 brrt that was my reaction as well
13:22 jnthn You don't have a native 64-bit one?
13:22 brrt i've installed just visual studio express 2013
13:22 brrt and it contains the 'microsoft optimizing compiler for x64' but only as part of a 'cross compiler toolchain
13:25 brrt well, the regular 'native' toolchain basically has the same problem: can't compile libuv (it seems) because I don't have the winsock headers
13:25 brrt oh, i installed visual studio express for windows btw, not the for web version
13:26 jnthn Maybe missing Windows SDK, somehow? http://www.microsoft.com/en-us/download/details.aspx?id=8279
13:26 brrt probably
13:26 brrt i'm downloading that now
13:30 brrt i'm mildly pleasantly surprised by the whole windows system
13:31 jnthn ;)
13:31 FROGGS brrt: yes, windows 7+ in combination with visual studio is kinda pleasing :o)
13:34 brrt :-)
13:34 brrt although i /still/ can't compile it
13:34 brrt i'm going to restart and see if that does anything
13:36 carlin just keep restarting until it works
13:36 * jnthn works on a Moar thing timo has been asking for for ages... :)
13:43 Juerd joined #moarvm
14:25 Ven joined #moarvm
14:31 lizmat joined #moarvm
14:37 woolfy joined #moarvm
14:44 brrt joined #moarvm
14:44 dalek MoarVM: 50640b8 | jnthn++ | src/ (4 files):
14:44 dalek MoarVM: Allow us to add temporaries when optimizing.
14:44 dalek MoarVM:
14:44 dalek MoarVM: Some optimizations we wish to do will need an extra temporary register
14:44 dalek MoarVM: to store something in. This patch enables us to have such registers.
14:44 dalek MoarVM: It also provides an acquire/release model so we can re-use these
14:44 dalek MoarVM: temporaries, minimizing the number we need to add.
14:44 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/50640b800f
14:44 dalek MoarVM: beca0b2 | jnthn++ | src/spesh/args.c:
14:44 dalek MoarVM: Specialize unboxing of incoming object args.
14:44 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/beca0b2017
15:18 daxim joined #moarvm
15:56 timotimo i don't thoroughly understand the code you added; did we previously bail out if we would have had to unbox an int/num/str from a passed argument?
15:57 timotimo but now i understand how we do the temp register stuff :)
16:01 jnthn timotimo: yes, we bailed
16:01 jnthn timotimo: I've got code for the boxed case locally
16:01 timotimo cool :)
16:01 timotimo more spesh stuff
16:01 timotimo we don't have a bail-log-like thing for spesh, aye?
16:02 jnthn Well, it wasn't a total bail
16:02 jnthn More like "don't spesh the args at all" bail
16:02 timotimo ah
16:02 timotimo that's harder tolog of course
16:02 jnthn Yeah
16:03 jnthn The boxed case transform works, but something doesn't get the number of locals correct somewhere, somehow...
16:03 jnthn So we get SEGV at some point in GC marking
16:03 jnthn Well, dinner...bbiab
16:03 timotimo bon appetit :)
16:16 timotimo optimize_can_op is still commented; i wonder if we can figure out what's wrong with it by now
16:16 timotimo maybe having to bail a lot less will let us find the error more often
16:22 timotimo now that we have the SSA form, wouldn't it be easy-ish to figure out when a local is read for the very last time and then re-use the local, so that we get smaller frames as well as considering objects un-used (for GC purposes) earlier?
16:33 Ven joined #moarvm
16:35 timotimo should i look into optimizing iffy when the type is known so it'll become an unbox_i/unbox_s/unbox_n/... plus an if_i/unless_i?
16:36 timotimo sounds strenuous :\
16:36 timotimo feeling pretty drained from my ear infection adventures tbh :|
16:37 FROGGS :/
16:39 jnthn timotimo: Yes, if_o and unless_o and istrue/isfalse can be optimized in taht kinda way
16:40 timotimo i suppose if i just take it slow, i'll be fine
16:40 timotimo which do you think is the juicier target?
16:41 jnthn if_o/unless_o are likely the easier ones
16:41 timotimo OK
16:41 jnthn uh
16:41 jnthn harder ones
16:41 jnthn but also more common
16:41 timotimo of course %)
16:42 jnthn some istrue you can do without an extra reg anyway
16:42 jnthn istrue_I for bigint spec for example
16:42 timotimo right, unbox_i for example should work
16:42 timotimo ah, there's already an istrue optimization in there
16:43 timotimo i can probably extend that to cover isfalse and put a negation in there in those cases
16:44 timotimo that ought to be simple-ish if i specify a register to put the result into and if it's isfalse, i just set that to an allocated temp register
16:45 timotimo actually, that part is already in there
16:45 timotimo but it just re-uses the existing register so far
17:08 jnthn grmbl
17:09 jnthn Fixed various places with badass umptions with regard to locals only growing if we inline, and it still gets the frame size wrong...
17:09 timotimo d'oh (:
17:09 timotimo :(
17:14 btyler joined #moarvm
17:17 jnthn duh
17:18 jnthn I was asking for a temp reg of the wrong type
17:18 timotimo oops :)
17:21 jnthn hm, it can inline some things now it couldn't before also :)
17:25 japhb Started backlogging this channel ... I see you ran afoul of the bugs in the charrange benchmarks.  Did you work those out already, or do I need to fix them?
17:27 timotimo "the bugs"? you know of them?
17:28 timotimo i didn't quite know what exactly happened there
17:28 timotimo the graph does look very weird
17:28 timotimo maybe it's just that the new implementation is just so ridiculously much better now than it was before
17:30 japhb timotimo: FROGGS committed without testing, because I convinced him to share his WIP, but I forgot to tell him to mark them disabled if he didn't think they would work.  And I noticed the problem just before getting rather sick in a way that made computer use cause vertigo, so I didn't push a fix.
17:30 timotimo yikes
17:30 japhb So I'll look at it today and see what I can do.
17:31 timotimo did you see the graph?
17:31 raiph joined #moarvm
17:31 timotimo i definitely like the performance scoring thingie
17:31 timotimo and the commandline comparison thingie is also much nicer than i thought
17:32 japhb No, I haven't seen the graph yet
17:32 japhb link?
17:33 timotimo http://t.h8.lv/p6bench/2014-07-27-long-time-rakudo.html
17:33 japhb "commandline comparison thingie"?
17:34 timotimo the output you get with "compare" without a --format argument
17:34 timotimo with the scoring at the bottom
17:37 dalek MoarVM: 5835e19 | jnthn++ | src/ (3 files):
17:37 dalek MoarVM: Cope with locals resizing without inlining.
17:37 dalek MoarVM:
17:37 dalek MoarVM: In a few places we assumed only inlining could do this. That's not
17:37 dalek MoarVM: true any more, however, now that we have the ability to add extra
17:37 dalek MoarVM: temporaries.
17:37 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5835e19912
17:37 dalek MoarVM: 3827560 | jnthn++ | src/spesh/args.c:
17:37 dalek MoarVM: Specialize boxing of args also.
17:37 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3827560b51
17:37 japhb Oh, yes.  That's a rather unappreciated feature, methinks.  :-)
17:39 timotimo jnthn: should i be putting any energy/thought into making frames re-use their "registers" if they can?
17:40 woolfy joined #moarvm
17:40 jnthn timotimo: I'm worried that will be rather fragile
17:40 timotimo fair enough
17:40 timotimo i suppose the jit will be doing a good job with that anyway when we have proper register allocation?
17:42 jnthn Well, also we're relatively good about register use in initial code-gen anyway
17:42 timotimo oh? i didn't know that
17:42 timotimo i thought we were just throwing them around like they cost nothing at all :)
17:43 jnthn No; we release them as soon as we don't need them
17:43 timotimo okay, so that's already pretty good
17:43 jnthn If you look at any sizable piece of code in spesh you'll see there's a lot of versions per variable.
17:43 jnthn And many of them come from the fact that it's re-using relatively well during code-gen.
17:43 japhb Gah, system acting weird, looks like I'll be rebooting.  :-(
17:44 timotimo i haven't looked at non-spesh'd code dumps in a long time, i think
17:46 timotimo i think it's time for a nap :S
17:47 jnthn Hope you'll be feeling better soon.
17:47 timotimo me, too :)
17:47 timotimo this is mostly about catching up on sleep, as i had none last night
17:47 timotimo and then it'll be time to take another round of meds, so i'll probably feel all right tonight :)
17:48 jnthn :)
17:51 carlin does it matter that moar segfaults doing open('a_directory').lines on OpenBSD, since it's not supposed to be valid anyway?
17:52 carlin here's a backtrace anyway: https://gist.github.com/carbin/bb85811a95404d87861a
17:54 woolfy left #moarvm
17:54 jnthn It really shouldn't SEGV
18:06 woolfy joined #moarvm
18:06 woolfy left #moarvm
18:08 japhb joined #moarvm
18:13 raiph joined #moarvm
18:14 dalek MoarVM: 0e1d782 | jnthn++ | src/spesh/args.c:
18:14 dalek MoarVM: Specialize boxing of named args.
18:14 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0e1d782461
18:33 dalek MoarVM: 78cdd80 | jnthn++ | src/spesh/args.c:
18:33 dalek MoarVM: Specialize unboxing of named args.
18:33 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/78cdd80b8c
18:33 jnthn Well, that nails all the permutations. :)
18:58 colomon joined #moarvm
18:58 [Coke] ff
18:59 Ven joined #moarvm
19:24 timotimo and now we inline all the frames forever? :)
19:28 jnthn Well, it stops things like need to box/unbox from keeping us from inlining at least.
19:31 jnthn Why the heck is infix:<eq>'s proto use the slow path binder...
19:32 timotimo how can you find that out?
19:34 jnthn oh...it's on a bind error
19:34 jnthn Well, I was looking into the palindrome RC thing
19:35 timotimo ah, ok
19:35 jnthn To see why it deopted a lot
19:35 jnthn And found it spent a load of time in the slow-path binder
19:38 jnthn oh
19:38 jnthn It's junction fallback
19:39 jnthn And unbase has an optimizable (so far) Junction
19:39 timotimo last time i looked, i didn't even understand what unbase is supposed to do
19:41 timotimo ah, if we rewrite that to the form with | between " " strings, it would turn into a sequence of || operators
19:41 timotimo would you like to do that?
19:41 timotimo or like me to do that, i suppose
19:41 jnthn That's an option, yeah.
19:41 jnthn Well, there's another option
19:41 jnthn Which is to realize any is being given a Parcel of literals.
19:41 timotimo mhm
19:42 jnthn Which would be a more general improvement
19:42 timotimo yes, it would
19:42 jnthn Anyway, I just looked at ff.p6, one of our slowest benchmarks
19:42 jnthn And step does this:
19:42 jnthn for ^$!height X ^$!width -> $i, $j {
19:42 brrt joined #moarvm
19:42 jnthn And on the inside
19:42 brrt \o #moarvm
19:42 jnthn any(@!neighbors[$i][$j]) === Burning
19:42 timotimo o/ brrt
19:42 jnthn At some point
19:43 jnthn hi brrt
19:43 brrt btw, it may be obvious now, but i'm not on a holiday after all :-)
19:43 timotimo aaw :(
19:43 brrt ­it's ok :-)
19:44 jnthn I couldn't tell if it was that or you just missed hacking while on holiday :)
19:44 timotimo jnthn: is there something about that that could be optimized?
19:45 brrt well, both would've been plausible, but I wouldn't have had the computer with me
19:45 brrt fwiw, I can now finally build moar \o/
19:45 brrt (on windows, that is)
19:45 timotimo for ^number X ^othernumber -> $a, $b could surely be turned into a loop in a loop, if we're careful with redo/continue/last/...
19:45 jnthn timotimo: That ain't my point
19:45 carlin brrt: how many restarts did it require? :p
19:45 brrt the secret is installing visual studio for windows desktop rather than any visual studio for windows
19:45 jnthn My point is that every step does 100+ runs through the slow binder
19:45 brrt too many :-)
19:45 timotimo your point is "damnit! why are junctions so slow!"
19:46 jnthn Well, my point is that this might be *why* Junctions are so slow
19:46 timotimo can we somehow get junctions to not go through the slow binder?
19:46 jnthn Well, I am starting to wonder why they do it every single time
19:47 timotimo spesh could know there's a junction there that ought to be autothreaded and not go through the binder instead
19:47 jnthn We should be installing a junction dispatcher in the multi cache that skips all of this...I thought, anyway.
19:47 timotimo that would certainly improve this specific kind of problem
19:47 jnthn oh, but wait...
19:47 jnthn Hmmm
19:48 jnthn That'll never happen, will it.
19:48 jnthn 'cus we auto-thread on the proto
19:49 * timotimo doesn't know :\
19:49 jnthn So we never end up multi-dispatching on a Junction itself
19:49 brrt left #moarvm
19:50 brrt joined #moarvm
19:51 timotimo it's kinda bad our primitive for checking if something is in a list is going through junctions
19:51 brrt anyway, now i'm wondering how to make moarvm run nqp
19:51 raiph joined #moarvm
19:52 jnthn brrt: git clone nqp, and then perl Configure.pl --backend=moar --prefix=c:\path\to\moar\install
19:52 brrt aha, i see
19:52 timotimo maybe we could have a simple implementation of any that takes list, operator, comparison and does the comparison directly
19:52 timotimo that could maybe even be in-lined
20:24 ilbot3 joined #moarvm
20:24 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
20:41 zakharyas joined #moarvm
20:52 ventica2 joined #moarvm
20:52 brrt windows debugger is weird
21:09 ggoebel111118 joined #moarvm
21:23 * brrt afk
22:25 timotimo hah,i hoped by napping i'd see another cool piece of work done by jnthn %)
22:27 * jnthn does have something in the works
22:30 timotimo nap driven development ...
22:30 carlin like coding in your sleep
22:46 dalek MoarVM: 0513b67 | jnthn++ | lib/MAST/Nodes.nqp:
22:46 dalek MoarVM: Some MAST::Nodes optimizations.
22:46 dalek MoarVM:
22:46 dalek MoarVM: Provide a way to construct MAST::[Ext]Op faster when we already have
22:46 dalek MoarVM: an array of operands, and sprinkle a few native types.
22:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0513b67577
23:11 [Coke] the uniq.t spec test failures are a segv.
23:14 jnthn Hmm
23:14 jnthn Odd...passes here. :S
23:14 jnthn If we're lucky somebody with ASAN might provide a useful report.
23:17 [Coke] I can get you a backtrace, but it's about 100 lines to get a reproducable segv
23:34 [Coke] running moar thru lldb is a pita
23:35 timotimo jnthn: running benchmarks with the new changes now :)
23:38 [Coke] oh, wait, it's easy as pie:
23:38 [Coke] https://gist.github.com/coke/42dc068d6845f5b5a240
23:44 timotimo Failed to run command: install/bin/perl6 --optimize=3 -e "\c[2694536175]" ~~ /<[\c0..\c[2694536175]]>/
23:44 timotimo haha
23:44 timotimo unicode doesn't actually have enough characters yet %)

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