Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-12-01

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

All times shown according to UTC.

Time Nick Message
00:54 diakopter____ joined #moarvm
01:23 diakopter___ joined #moarvm
01:45 ShimmerFairy joined #moarvm
02:00 llfourn joined #moarvm
02:21 rjbs joined #moarvm
02:22 rjbs moarvm seems to use -mt as a cc switch on Solaris, even when using gcc
02:24 FROGGS_ joined #moarvm
02:25 rjbs It's in the ccmiscflags in nqp/MoarVM/build/setup.pm
02:25 rjbs I don't know how to make it depend on cc, but I reckon somebody does.  That is all. :-/
03:14 diakopter rjbs: hunh
03:16 rjbs I did get rakudo built on illumos with gcc, though.  Only test that failed was native call.
03:16 diakopter which ones? (all?)
03:16 rjbs t/04-nativecall/11-cpp.t           (Wstat: 65280 Tests: 16 Failed: 0)
03:17 diakopter ah, same one that fails for me on windows
03:17 diakopter er. mac.
03:17 diakopter rjbs: do you dare try spectest?
03:18 rjbs I'm not on that host anymore, let me see if that workspace still exists.
03:18 rjbs It does, running.
03:18 diakopter restart with TEST_JOBS=CORESPLUS1 or something
03:18 diakopter it's a lot faster
03:19 rjbs k!
03:19 diakopter I mean, an actualy number there
03:19 rjbs yeah
03:19 rjbs I'm running 9.  Will let you know when it says anything useful.
03:19 rjbs well, when I notice it do; I'm also writing some other very exciting billing code
03:19 diakopter people need their bills
03:35 vendethiel joined #moarvm
03:48 rjbs Files=1085, Tests=50349, 654 wallclock secs (16.39 usr  9.32 sys + 2200.27 cusr 480.14 csys = 2706.13 CPU)
03:48 rjbs Result: FAIL
03:50 rjbs good night! -- https://gist.github.com/afe2ff3639e36d3f7ab2
03:51 diakopter yeesh
03:51 diakopter that's quite the smattering
06:55 domidumont joined #moarvm
07:01 domidumont joined #moarvm
07:15 vendethiel joined #moarvm
07:17 kjs_ joined #moarvm
07:27 FROGGS joined #moarvm
07:53 kjs_ joined #moarvm
08:36 zakharyas joined #moarvm
09:54 brrt joined #moarvm
10:49 brrt timotimo: maybe continue here
10:49 brrt you hadn't merged it yet?
10:50 timotimo right, it seems like i haven't!
10:50 timotimo it seems to be on my laptop
10:50 timotimo i thought i put it onto my desktop, too
10:50 brrt i'll review it if you want
10:50 JimmyZ \o brrt++ # new post
10:50 brrt thanks JimmyZ :-)
10:51 brrt i've... also made some progress at the implied cost problem
10:51 brrt in that i can reorder the tiler table to calculate them
10:51 brrt only i can do it now just for the 'first order'
10:51 brrt i.e. i can take into account the (load reg) in the (add reg reg) candidate for the (add reg (load reg)) tree; but not further
10:52 brrt my running example is (nz (and (load (addr reg)) (const)))
10:52 dalek MoarVM/no_atomic_if_single_threaded: c044b2a | timotimo++ | src/core/frame.c:
10:52 dalek MoarVM/no_atomic_if_single_threaded: WIP cheaper access to ref counts if only 1 thread exists.
10:52 dalek MoarVM/no_atomic_if_single_threaded:
10:52 dalek MoarVM/no_atomic_if_single_threaded: currently causes livelocks on multi-threaded situations
10:52 dalek MoarVM/no_atomic_if_single_threaded: review: https://github.com/MoarVM/MoarVM/commit/c044b2abb1
10:53 brrt timotimo, correct me if i'm wrong, but i thought locking in a single-thread case wasn't so costly?
10:54 timotimo it is only not costly if you throw out the explicit lock instructions
11:01 timotimo every instance of sp_deref_get_i64 is currently preceded by a getlex and then a sp_guardrwconc
11:01 timotimo so the exprjit probably aborts before that
11:03 timotimo huh, spec tests aren't clean
11:04 timotimo holy fuck, t/spec/S06-operator-overloading/sub.rakudo.moar compiles SLOW
11:04 brrt are they clean relative to master?
11:04 timotimo must be that NFA optimization thing
11:04 timotimo i have to check
11:04 brrt yes, yes, i can compile getlex in the expr jit, if you really want it :-P
11:04 brrt just hasn't been a priority up until now
11:05 jnthn o/ #moarvm
11:05 timotimo well, if it doesn't compile the guard op, it's not enough ;)
11:05 timotimo and that contains a branch, doesn't it?
11:07 timotimo yo jn
11:07 timotimo jnthn:
11:07 timotimo dergh.
11:08 jnthn Typing skills. YOu has them. :P
11:08 jnthn hah :)
11:08 timotimo unintentional autopun?
11:10 brrt yes, the guard can't be compiled just yet
11:10 brrt and that's not a very high priority so far
11:11 brrt (you may notice my list of priorities is rather long...)
11:11 brrt good * jnthn
11:11 timotimo hah :)
11:11 timotimo i understand why your priority list looks like that, though
11:12 jnthn No, laptop keyboard, which I ain't used for two months
11:12 timotimo makes sense
11:12 jnthn And I type on a natural/split keyboard at home, so this feels...unnatural :)
11:13 timotimo did you get the results of my little bit of utf8-c8 prodding?
11:14 jnthn "Initializing the thingy to -1 helps, but doesn't fix everything" or so?
11:15 timotimo yeah
11:16 timotimo and "the segv comes from the loop running without bounds, because the ++pos < other_pos never stops being true
11:16 timotimo or something
11:18 timotimo brrt: the spec tests are just one test more broken than on master, but that test file runs cleanly when i run it on its own ...
12:10 brrt hmmmm
12:10 brrt that's no proof it's correct though
12:10 brrt (i'll finally look at it now()
12:11 timotimo :)
12:12 brrt looks fairly sane... although i do have a question
12:13 brrt why not simply do two sp_get_i64, with the intermediary result being an integer
12:13 brrt or is that overly evil
12:13 timotimo yes, that is very evil.
12:14 brrt well, that's just me
12:15 timotimo hum. a loop with nothing to do but $a++ doesn't benefit :\
12:15 brrt fwiw, i think you're right, we don't want to tell people to use nqp to get performance
12:15 brrt also, i know actually not that much of performance
12:16 timotimo but i can put the thing into a sub and use $a = $a + 1 to not have the invocation overhead
12:16 timotimo but still get the "is rw" thing
12:20 diakopter well, I swapped out uthash for tommyds, but no core setting compilation improvement at first glance
12:21 diakopter jnthn: I guess you saw rjbs' spectest gist above
12:25 brrt still good to try diakopter :-)
12:26 brrt tommyds also has other interesting data structures
12:26 diakopter the one I tried was hashlin
12:26 diakopter I guess I could try another one of them
12:27 brrt yeah, sure
12:27 * brrt wonders if the little dynamic array thingy is useful enough to merge into master
12:37 jnthn diakopter: Yes, noticed it
12:39 brrt timotimo: looks quite sane to me
13:03 zakharyas joined #moarvm
13:10 domidumont joined #moarvm
13:48 brrt actually, the performance benchmarks of tommyds are quite remarkable, considering that the implementation seems.. quite normal
13:50 diakopter yeah, but they may be a little too randomized
13:55 nine brrt: just read your most recent blog post. Glad you're making progress :)
13:57 brrt thanks :-)
13:58 brrt i'm nearing the phase in which i can usefully say, 'here's this heap of work you can do, and i can help you do it'
14:00 jnthn :)
14:00 * jnthn may join in with that in the new year :)
14:01 brrt that would be very welcome :-)
14:01 brrt i have a nqp todo passing, is that an error?
14:02 brrt in t/qregex
14:03 jnthn No, I saw that too, but couldn't work out when it popped up
14:03 jnthn And wanted to make sure it wasn't a regression
14:06 donaldh joined #moarvm
14:06 brrt hmmm
14:11 domidumont joined #moarvm
14:20 timotimo with the deref_get ops, perl6 -e 'my int $a = 0; sub do-loop(int $a is rw) { while $a < 500_000_000 { $a = $a + 1 } }; do-loop($a)' gets about 6x slower :\
14:20 timotimo and i don't know why
14:20 timotimo but i gota be AFK for lots of driving soon
14:21 brrt hmm,m that is weird
15:04 domidumont joined #moarvm
15:17 dalek MoarVM/even-moar-jit: bb79f5d | brrt++ | src/jit/ (3 files):
15:17 dalek MoarVM/even-moar-jit: Implement getlex and bindlex for expr JIT
15:17 dalek MoarVM/even-moar-jit:
15:17 dalek MoarVM/even-moar-jit: Compute address for lexical registers using a loop that loads
15:17 dalek MoarVM/even-moar-jit: the outer frame. Does not yet work for object getlex, which is
15:17 dalek MoarVM/even-moar-jit: unfortunately the majority of getlexes.
15:17 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/bb79f5da03
15:18 brrt i think i should have a append_template_during_traversal function or something like that
17:48 kjs_ joined #moarvm
17:49 JimmyZ_ joined #moarvm
18:34 kjs_ joined #moarvm
18:38 FROGGS joined #moarvm
18:39 vendethiel joined #moarvm
18:42 domidumont joined #moarvm
18:52 zakharyas joined #moarvm
19:03 lizmat joined #moarvm
19:21 ggoebel7 joined #moarvm
20:02 domidumont1 joined #moarvm
20:04 Peter_R joined #moarvm
20:18 vendethiel joined #moarvm
20:21 dalek MoarVM: 6e4b90f | FROGGS++ | src/core/nativecall (3 files):
20:21 dalek MoarVM: handle "is rw" pointers in native routines
20:21 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6e4b90fdb8
20:51 timotimo i'm back at the computer, so i'll be able to have a closer look at the deref problem again
21:08 kjs_ joined #moarvm
21:18 kjs_ joined #moarvm
21:24 kjs_ joined #moarvm
21:39 diakopter timotimo: welcome back To The Computer
21:40 njmurphy_ joined #moarvm
21:41 timotimo holy smokes
21:41 timotimo 'my int $n = 0; sub do-loop(int $n is rw) { while $n < 500_000_000 { $n = $n +1; } }; do-loop($n)'
21:41 timotimo ^- 14305 gc runs
21:41 diakopter awesome
21:41 timotimo the allocations tab doesn't show a single one of 'em
21:42 timotimo "of the allocations that cause this BS"
21:42 jnthn That's why $native-int++ isn't fast yet
21:43 jnthn It allocates 500 million references there
21:43 jnthn Once the inliner gets to that stuff, it'll be able to allocate zero of them
21:43 timotimo this isn't using ++ though :)
21:43 diakopter .karma $native-int
21:44 jnthn Oh...the call to do-loop is outside the loop
21:44 jnthn Hmm
21:44 timotimo yup
21:44 timotimo it's because i want to have an "is rw" thing involved
21:44 * timotimo grabs the speshlog
21:45 timotimo at first i thought "oh lord, it's not getting jitted at all!" but that was just because do-loop does OSR and the overview page only shows a single frame jitted out of 4
21:47 timotimo https://gist.github.com/timo/d9ba0cde4833cbddaba2 - go wild if you'd like
21:47 timotimo the only thing i could imagine allocates there would be getlex?
21:47 diakopter timotimo: wait, how long does that snippet take to run for you
21:48 timotimo 100s
21:49 kjs_ joined #moarvm
21:49 diakopter why does camelia run the 50_000_000 version in 1s
21:49 timotimo because it doesn't have the patches that were meant to make stuff like this faster
21:49 diakopter o_O
21:50 timotimo yeah. my face looked like that when i found out, too.
21:50 diakopter faster than 1s for 50M iterations?
21:51 diakopter m: my int $n = 0; sub do-loop(int $n is rw) { while $n < 50_000_000 { $n = $n +1; } }; do-loop($n); say now - BEGIN now
21:51 camelia rakudo-moar 2b5c41: OUTPUT«1.137019␤»
21:51 timotimo yeah, wy not?
21:51 diakopter I guess I don't see how jitting more operations could make a 800% pessimization
21:51 timotimo the other version doesn't GC at all, i think
21:51 timotimo didn't --profile it yet
21:52 diakopter ohhh what prevents it GCing
21:52 diakopter what other optimizations are disabled by jitting
21:53 timotimo https://gist.github.com/timo/d9ba0cde4833cbddaba2 t has a speshlog of the faster run up top
21:55 timotimo okay, the only differences i see: guard_rwconc and the _deref_ ops
21:55 timotimo aha!
21:56 timotimo um, no. not aha.
21:56 timotimo huh.
21:56 timotimo guardrwcont runs a fetch on the thing
21:56 diakopter so.. need to jit those?
21:57 timotimo it gets jitted
21:57 timotimo but perhaps the fetch causes an allocation because we don't know better?
21:58 timotimo thing is: the optimization of decont_i and assign_i through the REPR will get_and_use_facts, which includes "is an rw container"
21:58 timotimo that causes the guardrwconc to appear in the output instead of being thrown out
21:59 diakopter what's the purpose of guardrwconc
21:59 diakopter a lock?
21:59 timotimo no
21:59 diakopter what is conc
21:59 timotimo it assures something is a read-writable container that contains a concrete value
21:59 timotimo OSLT :P
22:00 diakopter oh
22:00 timotimo aha
22:00 timotimo my implementation of guardrwconc in the jit is bogus
22:00 diakopter oh
22:00 timotimo um. no, it's not
22:00 timotimo it's a 1:1 translation of the C in the interpreter
22:00 timotimo if (check && IS_CONCRETE(check) && STABLE(check) == want_c) {
22:00 timotimo MVMContainerSpec const *contspec = STABLE(check)->container_spec;
22:00 timotimo if (contspec->can_store(tc, check)) {
22:00 timotimo MVMRegister r;
22:00 timotimo contspec->fetch(tc, check, &r);
22:00 timotimo if (r.o && IS_CONCRETE(r.o) && STABLE(r.o) == want_v)
22:00 timotimo ok = 1;
22:01 timotimo }
22:01 timotimo }
22:01 timotimo see the fetch in there? we create an object there.
22:01 diakopter what kind of object
22:01 timotimo whatever's in that container
22:01 timotimo jnthn: how can we get around this problem?
22:02 timotimo normally a container will just ->fetch by returning a reference to an object
22:02 timotimo but native refs don't contain objects, they contain native values
22:02 timotimo so they have to box the native value
22:02 timotimo just so we can then check "was it an Int in there?"
22:02 diakopter sounds like the ops could be combined
22:03 timotimo "the ops"?
22:03 diakopter if you make the check part of the container spec function set
22:04 diakopter (in addition to fetch)
22:04 jnthn timotimo: Perhaps we need guards for is native rw
22:04 diakopter hey, that's what I said
22:04 timotimo jnthn: right, and then instead of want_v checking against an STABLE, it'd check against the INT_BP
22:04 timotimo i forget what those are called
22:05 jnthn I don't know you'd have to care
22:05 timotimo but i have to go sleep soon and get up super early in the morning
22:05 jnthn In fact
22:05 jnthn The type of the native is encoded as part of the container type for native containers, iirc
22:05 timotimo hm, probably don't have to care, because code-gen already encoded that info in the code
22:05 timotimo that's true, too. it's in the STABLE
22:05 jnthn So you might be able to just use a normal guard.
22:05 jnthn Rather than a container one
22:05 jnthn Though please document in the code why that's OK :)
22:06 timotimo that'd go into args.c or something, right?
22:06 timotimo it'd have to throw out the "is rw container" fact, otherwise we'd still be emitting the guard; so would we want another flag for that?
22:07 timotimo hold on ... i think this actually comes from logging information, because it goes through a lexical
22:07 jnthn Maybe...needs some thinking :)
22:07 jnthn And I'm tired :)
22:08 timotimo me tired, too
22:08 timotimo good night!
22:08 timotimo .o( and why is our optimizer emitting a lexical there in the first place? because nobody made lexref-to-localref work yet ... that nobody is me :/ )
22:09 jnthn sleep well
22:09 jnthn o/
22:17 colomon joined #moarvm
23:18 colomon joined #moarvm
23:26 diakopter anyone seen this.. http://www.oracle.com/technetwork/oracle-labs/program-languages/overview/index.html
23:59 ilmari gcc 5.2/glibc 2.19 seems to require _GNU_SOURCE to be defined to provide a definition for pthread_yield

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