01:16
pyrimidine joined
02:12
diakopter joined
02:24
pyrimidine joined
02:40
MasterDuke joined
02:48
ilbot3 joined
03:26
pyrimidine joined
03:36
geekosaur joined
|
|||
samcv | there's a nqp test harness? | 03:49 | |
japhb | samcv: Yes, pmurias wrote most of it to ensure his nqp-js work was on the right track. | 03:57 | |
samcv | nice | ||
japhb | Oh, actually, that would be nqp test *suite*. I haven't actually checked what the NQP 'prove' or equivalent is written in. | ||
samcv | weird still finds everything perfectly, but i cannot run perl 6 or compile nqp, and there's a hang on the spectest | 04:04 | |
let me push it to my repo | 04:05 | ||
github.com/MoarVM/MoarVM/compare/m...g?expand=1 | 04:15 | ||
diakopter | samcv: do you have a guard that "h_pos + 1" is valid | 04:21 | |
I mean, I dunno how that could cause a hang | 04:22 | ||
but stil | |||
samcv | let me add a print and make sure thatn isn't happening | 04:25 | |
yeah it seems to be pretty rare, but I think that's the issue | 04:26 | ||
at least i saw it shortly before the hang | |||
diakopter crosses fingers | |||
diakopter fondly remembers writing "brute force for now. horrible, yes. halp." | 04:27 | ||
samcv | uh nope | 04:28 | |
fixed it and now not getting any printout there, but it's hanging | 04:29 | ||
diakopter | well, it's not valid to skip along += ngraphs | ||
samcv | I changed the while loop to while (h_pos < hgraphs - 1) | ||
diakopter | change it to increment only 1 | 04:30 | |
why would it be okay to += ngraphs | |||
samcv | still hang diakopter | 04:31 | |
diakopter | oh, because it's ==2, yeah, I suppose | ||
samcv | yep | ||
MasterDuke | samcv: did you check out my boyer-moore branch at all? | ||
yoleaux2 | 23 Jan 2017 10:31Z <lizmat> MasterDuke: seems like a logical continuation of the other Nd work you've done :-) | ||
samcv | i tad | 04:32 | |
MasterDuke | it worked fine for me (no problems), but it wasn't faster | ||
and i don't know why | |||
diakopter: if you wrote that original code maybe you could take a look at what i tried? | 04:33 | ||
github.com/MasterDuke17/MoarVM/tre..._for_index | |||
samcv | MasterDuke, can you link me it again? | ||
i'll look a little closer | |||
diakopter | samcv: could you confirm that it's looping in your while loop? | ||
MasterDuke: is yours working? | |||
samcv | yeah gonna add some prints | 04:34 | |
diakopter | samcv: (or is it looping as the result of some bad result of that function) | ||
MasterDuke | if i remember correctly, it works in that it gives the same results as the original code, it just isn't any faster | ||
sure there's some overhead from building the tables, but i would have expected to see some difference at some combination of needle/haystack size | 04:35 | ||
diakopter | well, how many times is that MVM_string_index called | ||
samcv | yeah it seems to be stuck | 04:37 | |
loopy h_pos 1 hgraphs 10 | |||
loopy h_pos 3 hgraphs 10 | |||
both those lines just printed on loop | |||
MasterDuke | diakopter: was that question to me? | ||
samcv | so it's looping twice and then.. starting over? or someplace is calling it again and a again? | 04:38 | |
should add in a print for when it exits the loop | |||
diakopter | MasterDuke: sure :) | ||
anyone | |||
MasterDuke | diakopter: just once per nqp::index call right? but i think i tried doing many in a loop and the total time was no faster | 04:39 | |
diakopter | just curious for the motive of optimization (or, how much one could theoretically speed it up) | ||
MasterDuke | but i believe also used for literal regexes | ||
e.g., /foobar/ | |||
samcv | no, it's exiting the loop | ||
diakopter | well I meant in a long-running program such as p6 setting compilation, how many times is it called | ||
samcv | a huge no | ||
diakopter | samcv: ok, so it's returning a wrong result | 04:40 | |
MasterDuke | i've profiled the compile of rakudo, but moarvm ops don't show up in a profile at that level | ||
diakopter | yeah you'd have to use something fancy :D | ||
MasterDuke | i thought i once perf recorded a rakudo compile, but i'm not sure if i gisted the results | 04:41 | |
samcv | ok yea'h it is | ||
10 in the haystack it fails somehow. will fix that | |||
curious what part of the code just uh. rechecking forever | |||
if it can't find something | |||
diakopter | samcv: yes I'm curious about that too | 04:42 | |
MasterDuke | diakopter: gist.github.com/MasterDuke17/4b9dc...ac0b2556cd | 04:44 | |
also running a new one now | 04:46 | ||
diakopter | 0.16% 0.07% moar libmoar.so [.] MVM_string_index | 04:47 | |
so the max you could speed up that run, by optimizing that function infinitely, is only that fraction | 04:48 | ||
thereabouts | |||
samcv | yeah that's what i thought, i can't change the while loop to while (h_pos < hgraphs - 1) | 04:49 | |
MasterDuke | of the rakudo compile yeah, but other workloads should be helped more | ||
samcv | gonna set it back then run prove and check the logs see which it hangs | ||
SUCC 1 h_pos -2134653648 hgraphs -2122111808 | |||
XD | |||
succ means success | 04:50 | ||
diakopter | heh. | ||
samcv | well. at least it passed one of the checks. i numbered them | ||
diakopter | that's a very long string | ||
do you have that much negative memory? | |||
samcv | well it's alternating uhm | 04:51 | |
between two things, one where it succeeds and one which fails | |||
alternating | |||
the failing one is the odd numbers | |||
maybe it's just a print error idfk | 04:52 | ||
or maybe it's the same one and only failing in part of the print's | |||
oh i forgot to put anything after the fprintf (variables) | 04:53 | ||
wtf it looks like the values get corrupted? | 04:55 | ||
loopy h_pos 1 hgraphs 10 | 04:56 | ||
loopy h_pos 3 hgraphs 10 | |||
SUCC 1 h_pos 530666800 hgraphs 543208640 | |||
exiting loop succ 1.1 h_pos 3 hgraphs 10 | |||
fprintf(stderr, "SUCC 1 h_pos %i hgraphs %i\n", h_pos, hgraphs); # corruption | |||
then below itc | |||
fprintf(stderr, "exiting loop succ 1.1 h_pos %i hgraphs %i\n", h_pos, hgraphs) | |||
and prints the correct values | |||
04:57
MasterDuke joined
|
|||
diakopter | MasterDuke: true, so then profile those other workloads.. :) | 04:57 | |
samcv | time to try making them all | ||
%li | |||
diakopter | lol at "idfk" | 04:58 | |
MasterDuke | for the heck of it i'll perf record a spectest run, see what that looks like | ||
diakopter | well that'll be a TON of invocations | 04:59 | |
process executions | |||
MasterDuke | if anyone is interested, here's a perf report of building rakudo with target=parse. gist.github.com/MasterDuke17/aff44...6d1d0ba537 | 05:02 | |
samcv | ok diakopter it does fine on all the things i've tested it with | 05:24 | |
but it's still hanging | |||
diakopter | samcv: push the changes? | 05:26 | |
samcv | diakopter, pushed | 05:32 | |
diakopter | "h_pos + 1 < hgraphs - 1" | 05:34 | |
I think you meant <= | |||
samcv | that's what it says? | 05:36 | |
line 245? or elsewhere? | |||
diakopter | yes, 245, I think you meant to write <= instead of < | ||
samcv | yeah that seems so then | 05:37 | |
diakopter | I think the check needs to be "h_pos + 1 <= hgraphs - 1" or "h_pos + 1 < hgraphs" | ||
I still can't conceive of why that would make something hang though XD | 05:38 | ||
samcv | yeah | ||
in the test it ust goes over the same string segment again and again | |||
some 10 long string | 05:39 | ||
i tested all positions of abcdefg.. for hgraphs 10 | |||
but yeah shouldn't hang | |||
should give me some message like, confused at ... | |||
diakopter | so did that fix it | 05:42 | |
samcv | i really doubt it | 05:43 | |
MasterDuke | fyi, just doing an nqp::index() in a loop gives ~40% time in MVM_string_substrings_equal_nocheck and ~10% time in MVM_string_index | ||
samcv | yeah no | ||
hangggg | 05:44 | ||
MasterDuke | which isn't all that surprising | ||
samcv | it tests the same string again and again | ||
MasterDuke | anyway, i'm off to sleep, later all... | 05:45 | |
samcv | kk | ||
diakopter | try removing the return -1 line | 05:47 | |
to let it fall back to the other thing | |||
sleep& | 05:48 | ||
samcv | k night | ||
i guess i could attempt to print out the needle and the haystack as their unicode cp's... | 05:56 | ||
unless there's an easy way to dump a string? | |||
06:31
pyrimidi_ joined
07:13
domidumont joined
07:20
domidumont joined
08:23
zakharyas joined
|
|||
timotimo | the easiest thing is to just encode it to utf8, print that, and free the string again | 09:45 | |
09:52
brrt joined
10:04
domidumont joined
10:43
brrt joined
13:02
pyrimidine joined
13:08
pyrimidine joined
13:39
pyrimidine joined
14:06
pyrimidine joined
14:22
ggoebel joined
14:57
pyrimidine joined
15:14
pyrimidine joined
15:32
dalek joined
15:34
synopsebot6 joined
15:52
brrt joined
|
|||
brrt | ohai #moarvm | 15:54 | |
timotimo | greetings brrt | 15:55 | |
brrt | \o timotimo | ||
how are things | |||
timotimo | they're okay | 15:56 | |
yesterday i tried some simple stretches and yoga poses some random artist on twitter recommended if you regularly suffer from back pain | |||
i don't really have back pain often, but i thought i'd give it a go anyway | |||
now i have muscle soreness all over my back and shoulders %) | |||
i'm looking forward to getting a little involved with the "easier" parts of the jit soon-ish :3 | 15:57 | ||
i'd like to hear how you are today, too. i'm going to be AFK for ~half an hour first, though | |||
brrt | ehm, i'm kind of busy, as usual | 15:58 | |
unfortunately, i might add :-P | |||
i figured out that i need to add a 'barrier stack | 15:59 | ||
or rather | |||
barrier queue to the JIT | |||
jnthn has completed his very busy part of the week and looks forward to digging into Moar/Perl 6 stuff again tomorrow. :) | |||
brokenchicken | \o/ | ||
brrt | i.e. a list of all those instructions that cause a flush of (a subset of) registers | ||
brrt envies jnthn | |||
16:08
ggoebel joined
16:27
brrt joined
|
|||
brrt | so, know how i've been talking about solving the 3-operand to two-operand conversion process | 16:36 | |
that also needs to be done for the indirect ops | 16:37 | ||
to give you an example: suppose I have something intended as: | |||
rcx = rdx + [rcx + 5]; | |||
well, i can't very well overwrite rcx with rdx if i expect that to work | 16:38 | ||
timotimo | good point | 16:39 | |
i hadn't considered indirect addressing :S | |||
brrt | utlimately, the limitation is that linear scan operates on live ranges, not on tiles, and so it can't enforce per-tile constraints very well | 16:40 | |
timotimo | let's add another pass! :) | 16:41 | |
brrt | hmmm | ||
yes, but | |||
where | 16:42 | ||
before, or after linear scan | |||
timotimo | .o( why not both? ) | ||
wasn't actually a serious suggestion | |||
brrt | i know :-) | ||
the 'lets' add another pass' probably has some truth to it, but i'm not sure how | |||
so, to recap | 16:44 | ||
this is only relevant to binary ops | |||
this is only relevant when the output register would overwrite the *second* input register | 16:45 | ||
or actually, 'a secondary', because there may be more than one | 16:46 | ||
17:23
domidumont joined
18:20
domidumont joined
18:38
domidumont joined
18:50
FROGGS joined
19:38
domidumont joined
20:25
zakharyas joined
20:26
pyrimidine joined
21:28
pyrimidine joined
|
|||
MasterDuke | is there a fast way to know/find out in moar if a string is all ascii chars? | 23:12 | |
timotimo | only whatever i do in ops.c or the encoding .c files i think? | 23:15 | |
MasterDuke | ops.c is ~10k lines, what should i search for? | 23:18 |