github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:41 lucasb left 02:07 MasterDuke left
nwc10 good *, #moarvm 04:44
05:58 leont left 06:22 sena_kun joined 07:02 sena_kun left 07:06 sena_kun joined
nwc10 .tell brrt o/ 07:15
tellable6 nwc10, I'll pass your message to brrt
07:24 Altai-man joined 07:26 sena_kun left 07:51 zakharyas joined, MasterDuke joined 08:22 domidumont joined 09:45 MasterDuke left
timotimo github.com/erlang/otp/pull/2745 - erlang otp jit based on ASMJIT with interesting tidbits like "We also considered using dynasm, but found the tooling that comes with asmjit to be better." and that it only eliminates dispatch overhead and specializing on argument types, and doing it at load-time 10:04
i assume erlang "beam instructions" are sufficiently statically optimizable in this way
10:25 MasterDuke joined 11:01 MasterDuke left 11:12 timotimo left 11:13 timo joined 11:14 timo is now known as Guest97478, zakharyas left 11:15 Guest97478 is now known as timotimo 11:25 sena_kun joined 11:27 Altai-man left 11:59 MasterDuke joined 12:15 leont joined 13:00 rypervenche left 13:04 rypervenche joined 13:45 zakharyas joined
Geth MoarVM/optimize-boxed-float-boolification: 50d3311c75 | (Jonathan Worthington)++ | 8 files
Better specialize boolification of boxed Num

Previously this wasn't specialized at all, and so fell back on the late-bound `istrue` instruction. Now it optimizes into an unbox and a truth test on the unboxed float, which in turn can be JIT-compiled into a relatively short sequence of instructions.
13:52
MoarVM: jnthn++ created pull request #1346:
Better specialize boolification of boxed Num
timotimo assumedly you ran into some code that hits this often enough to matter for performance? :) 14:09
always love seeing a factor or before/after numbers :) 14:11
MasterDuke github.com/rakudo/rakudo/issues/3910 14:12
gist.github.com/Whateverable/dd3eb...e594cc3371 has some maybe-relevant timings 14:20
timotimo ah, a nice speedup, indeed 14:33
Geth MoarVM: 322c2e0b4e | (Nicholas Clark)++ | src/core/str_hash_table.h
Comments and ASCII diagrams explaining the hash structure.
nwc10 the hash structure "this week". 14:34
there's a plan for post release.
to merge the allocations. 14:35
timotimo ah, so the "metadata and other stuff" and key, value, etc go in one big block? 14:36
14:37 MasterDuke left
nwc10 yes. 14:37
I have the test code working. Now I just need to port it over.
jnthn Another halving of the number of allocations. :) 14:38
nwc10 The bit I'm wondering about (and this can happen later) is whether to use the FSA. Beacuse for the initial hash sizes the total size needed fits inside the FSA
And I don't know how frequently we create "small" hashes 14:39
versus hashes that grow beyond 32 entries.
in Perl 5 land, there are often lots of small hashes, because hashes are also objects. (And symbol tables, but they usually have many entries)
jnthn My guess would be that a lot of hashes are small
But...yes, that
nwc10 I guess I can test it and see what the max RSS is with the FSA and without. Or just wonder about the complexity. 14:40
timotimo i could always dump stats for yall
nwc10 anyway, it's not yet (re)written
if that's easy (in advance) that would be cool. but actually, no rush. It can be done "later".
currently I am considering beer. 14:41
timotimo just need to know where to do that :)
like, end of stage parse perhaps?
nwc10 yes, I guess so 14:42
timotimo let me get all newest commits maybe 14:43
14:43 MasterDuke joined
timotimo ah, just the comment changed 14:43
jnthn Core setting compilation is probably quite a skrewed benchmark though, in that due to it doing a load of parsing, that will produce a lot more match objects and thus small hashes than the average program probably does 14:49
*skewed
timotimo true
qast nodes also have hashes on them in many cases
jnthn many many many many :) 14:53
The RakuAST-based compiler basically doesn't use annotations on QAST nodes, so we'll save those at least :) 14:54
timotimo very good 14:57
jnthn Alas, it only passes a little over 200 spectest files (in full, others partially), so there's a bit of work to go on it yet... 14:58
timotimo quite
got any plan in particular to handle nqp:: ops in compile-time code? can't really just literally call an nqp op from nqp code without compilation 14:59
jnthn Will probably just punt those to the compiler. 15:00
timotimo there could of course be a class that has methods for a bunch of the nqp ops and we just call methods on that
jnthn It's not like we want to encourage writing nqp::ops anyway
timotimo the stuff in the core setting, tho :) 15:01
jnthn Yes, but how much at BEGIN time? :)
timotimo the specific instance that makes me ask is one of the first trait mods that uses an nqp op
but i didn't verify how often that is actually called, though 15:02
trait_mod:<is>($child, $parent) uses nqp::can 15:03
is DEPRECATED, is required, and is default do
is tighter, is looser, is equiv, is preq, is export 15:04
but we did all that for performance optimization, who knows if we'll revert a lot of the "uglification" when RakuAST gets good at generating optimal code from idiomatic raku code 15:06
15:12 zakharyas left 15:24 Altai-man joined 15:27 sena_kun left
timotimo ooh, i looked only at a minor collection, that's why there's only a couple of hashes, lol 15:33
15:36 nebuchadnezzar left
timotimo gist.github.com/timo/44d925390cbd1...a02ebfc54e 15:37
15:37 Guest65602 joined
timotimo minor and major in two files 15:37
[Coke] nwc10: "whereas what actually do" 15:40
nwc10 ooh, a typo? 15:46
timotimo ("1 6" => 56, "4 6" => 39, "3 6" => 33, "2 6" => 27, "0 0" => 23, "9 12" => 7, "11 12" => 6, "7 12" => 5, "766 768" => 4, "6 6" => 3, "3379 6144" => 1, "78 96" => 1, "36 48" => 1, "6408 12288" => 1).Seq 15:48
that took way too long LOL
this is how many items in use, space, how many items big the storage is 15:49
well, cur_items and max_items
didn't look if max_items is including or excluding the extra at the end, but probably not, since there's 11/12 in there?
that is one hella big hash, tho 15:56
gist.github.com/timo/44d925390cbd1...a02ebfc54e (same url as before) has the fsck output for the very big hash 16:00
oh, ummm 16:01
firefox is unhappy about the gist page being so huge it seems like
gist.githubusercontent.com/timo/44...ntents.txt
jnthn String constant table?
For unique strings during compilation?
timotimo quite possibly, yeah 16:02
since it also contains filenames like SETTING::...
i'll output the smaller one, too 16:05
gist.githubusercontent.com/timo/fa...tfile1.txt - this is the smoler one 16:08
it's ... literally numbers
do we have a string numification cache of this size? 16:09
16:09 Guest65602 is now known as nebuchadnezzar` 16:11 nebuchadnezzar` is now known as nebuchadnezzar
timotimo ah, the values are MAST::Frame objects, or at least one is 16:14
nwc10: do you think it'd be a bad idea to offer an fsck flag that casts entries to MVMHashEntry and outputs the debug_name of the st the value has? 16:17
not all str_hash_table store MVMHashEntry, of course 16:18
but if you're calling the fsck function, you would know that
timotimo implements and will ask for forgiveness later 16:20
16:31 domidumont left
timotimo when do we build one central "dump a smol representation of this object, whatever it may be" function 16:50
1 1 51b22accc4f020 ( 5) 0x1e96e80 False object (BOOTHash) 16:52
2 2 4eb0d297c22c16 ( 4) 0x1e95b30 Code object (BOOTHash)
3 2 b99a6291b74b79 (18) 0x5a7e100 PredictiveIterator object (BOOTHash)
[...]
recursion, tho ... :D
MVM_dump_whatsthis 16:55
17:11 MasterDuke left
timotimo 1 17:19
NQPRoutine.new(#`(from NQPRoutine) $!do, $!signature, $!dispatchees, $!dispatch_cache, $!dispatch_order, $!clone_callback, $!onlystar=0)
2 1 1059557ceb465b9 ( 2) 0x5e25e0 at object (NQPRoutine)
NQPRoutine.new(#`(from NQPRoutine) $!do, $!signature, $!dispatchees, $!dispatch_cache, $!dispatch_order, $!clone_callback, $!onlystar=0)
3 1 1eee78eba121738 ( 4) 0x5e0ab0 made object (NQPRoutine)
NQPRegex.new(#`(from NQPRegex) $!do, $!caps=RegexCaptures.new(#`(from RegexCaptures) @!pos-capture-counts, @!named-capture-names, @!named-capture-counts, $!onlyname='', $!flags=1), $!nfa, %!alt_nfas, $!generic_nfa, @!nested_codes, $!clone_callback)
5F 1 2fdde68b8b96f419 (22) 0x6723b0 quote_escape:sym<misc> object (NQPRegex) 17:20
doesn't recurse too deeply apparently? %)
17:28 Altai-man left 17:31 Altai-man joined
timotimo MAST::Lexical.new(#`(from MAST::Lexical) $!index=165, $!frames_out=0) 17:33
1A2 1 d15135b8edc5a72a ( 4) 0x273efd0 Pair object (MAST::Lexical)
MAST::Lexical.new(#`(from MAST::Lexical) $!index=78, $!frames_out=0)
1A3 1 d1afe9cc80bbc303 ( 4) 0x1e95d40 Slip object (MAST::Lexical)
for some reason i find this interesting %)
17:34 Altai-man left
timotimo (though of course having the "extra info" above the line it refers to is confusing) 17:34
oarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!callsites=MoarVM::Callsites.new(#`(from MoarVM::Callsites) $!callsites, %!callsites, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!latin1decoder), $!annotations, $!compunit=MAST::CompUnit.new(#`(from 17:38
MAST::CompUnit) @!frames, $!hll='Raku', $!mainline_frame=MAST::Frame.new(#`(from MAST::Frame) $!cuuid='6154', $!name='', @!lexical_types, @!lexical_names, @!local_types, $!outer=(MAST::Node), %!lexical_map, %!debug_map, @!debug_map_idxs, $!flags=65536, $!frame_idx=-1, @!static_lex_values, $!code_obj_sc_dep_idx=0, $!code_obj_sc_idx=0, $!writer=MoarVM::BytecodeWriter.new(#`(from
MoarVM::BytecodeWriter) $!mbc, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!callsites=MoarVM::Callsites.new(#`(from MoarVM::Callsites) $!callsites, %!callsites, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!latin1decoder),
$!annotations, $!compunit=MAST::CompUnit.new(#`(from MAST::CompUnit) @!frames, $!hll='Raku', $!mainline_frame=MAST::Frame.new(#`(from MAST::Frame) $!cuuid='6154', $!name='', @!lexical_types, @!lexical_names, @!local_types, $!outer=(MAST::Node), %!lexical_map, %!debug_map, @!debug_map_idxs, $!flags=65536, $!frame_idx=-1, @!static_lex_values, $!code_obj_sc_dep_idx=0, $!code_obj_sc_idx=0,
$!writer=MoarVM::BytecodeWriter.new(#`(from MoarVM::BytecodeWriter) $!mbc, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!callsites=MoarVM::Callsites.new(#`(from MoarVM::Callsites) $!callsites, %!callsites, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings,
%!strings), $!latin1decoder), $!annotations, $!compunit=MAST::CompUnit.new(#`(from MAST::CompUnit) @!frames, $!hll='Raku', $!mainline_frame=MAST::Frame.new(#`(from MAST::Frame) $!cuuid='6154', $!name='', @!lexical_types, @!lexical_names, @!local_types, $!outer=(MAST::Node), %!lexical_map, %!debug_map, @!debug_map_idxs, $!flags=65536, $!frame_idx=-1, @!static_lex_values, $!code_obj_sc_dep_idx=0,
$!code_obj_sc_idx=0, $!writer=MoarVM::BytecodeWriter.new(#`(from MoarVM::BytecodeWriter) $!mbc, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!callsites=MoarVM::Callsites.new(#`(from MoarVM::Callsites) $!callsites, %!callsites, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings,
$!strings-count=6404, @!orig-strings, %!strings), $!latin1decoder), $!annotations, $!compunit=MAST::CompUnit.new(#`(from MAST::CompUnit) @!frames, $!hll='Raku', $!mainline_frame=MAST::Frame.new(#`(from MAST::Frame) $!cuuid='6154', $!name='', @!lexical_types, @!lexical_names, @!local_types, $!outer=(MAST::Node), %!lexical_map, %!debug_map, @!debug_map_idxs, $!flags=65536, $!frame_idx=-1,
@!static_lex_values, $!code_obj_sc_dep_idx=0, $!code_obj_sc_idx=0, $!writer=MoarVM::BytecodeWriter.new(#`(from MoarVM::BytecodeWriter) $!mbc, $!string-heap=MoarVM::StringHeap.new(#`(from MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!callsites=MoarVM::Callsites.new(#`(from MoarVM::Callsites) $!callsites, %!callsites, $!string-heap=MoarVM::StringHeap.new(#`(from
MoarVM::StringHeap) $!strings, $!strings-count=6404, @!orig-strings, %!strings), $!latin1decoder), $!annotations, $!compunit=MAST::CompUnit.new(#`(from MAST::CompUnit) @!frames, $!hll='Raku', $!mainline_frame=MAST::Frame.new(#`(from MAST::Frame) $!cuuid='6154', $!name='', @!lexical_types, @!lexical_names, @!local_types, $!outer=(MAST::Node), %!lexical_map, %!debug_map, @!debug_map_idxs,
$!flags=65536, $!frame_idx=-1, @!static_lex_values, $!code_obj_sc_dep_idx=0, $!code_obj_sc_idx=0, $!writer=MoarVM::BytecodeWriter.new(#`(from MoarVM::BytecodeWriter
oh yikes, sorry about the many lines %)
just thought that's frickin funny
looks infinite-recursive 17:39
17:47 patrickb joined
timotimo would want something like a seen hash, though tbh it'd already be a big help if it knew what's on the stack already and avoided going back into that 17:57
ah, yes, every MAST::Frame has an $!outer 18:13
and a link to the compunit, which has a link to its mainline frame 18:15
$!outer=(MAST::Node), %!lexical_map, %!debug_map, @!debug_map_idxs, $!flags=65536, $!frame_idx=-1, @!static_lex_values, $!code_obj_sc_dep_idx=0, $!code_obj_sc_idx=0, $!writer=(same as 3 outside), $!compunit=(same as 2 outside), $!string-heap=MoarVM::StringHeap.new [...] 18:16
still rather difficult to spot what's what in that huge string without newlines and such
18:21 zakharyas joined 18:37 colomon_ joined
timotimo cdn.discordapp.com/attachments/557.../image.png 18:40
^- colored parenthesis
with random words, made to look vaguely like the output of dump_p6opaque
nwc10 n der Schweiz, Ɩsterreich und SĆ¼dtirol wird das Wort ā€žSchmandā€œ nicht verwendet; das entsprechende Produkt ist Sauerrahm -- ahah 18:43
so that's another of those words they teach me that isn't actually German.
timotimo :) 18:44
but doesn't that sound more like it's more german than A/CH? 18:45
nwc10 I meant that Sauerrahm is the not-German word. Like seemingly every other food word
18:46 raku-bridge joined, raku-bridge left, raku-bridge joined
raku-bridge <timotimo> test 18:46
timotimo ooh
that's how you meant it, ok!
nwc10 Quite often I ask "is this word Vienese dialect, Austrian, or something Germans would also understand?" and sometimes the answer round here is "don't know" (usually between the last two). This isn't totally helpful :-) 18:48
Obviously I just speak English :-)
timotimo i recall a site for either A or CH that has a "usage map"
patrickb timotimo: Did you notice github.com/MoarVM/MoarVM/issues/1345 ? 18:53
timotimo aw crap
18:54 donaldh joined
timotimo didn't i put an include in there just so we have pthread_t there? 18:55
what is a dentiloquist %) 18:57
why is this word :D
nwc10: you think dump p6opaque should do newlines and indentation? 19:03
19:03 zakharyas left
nwc10 do newlines and indentation make it clearer to read? 19:05
19:05 raku-bridge left, raku-bridge joined 19:09 Geth left
nwc10 good *, raku-bridge 19:10
or should that be good *able? :-)
timotimo well, i hope it would 19:13
probably easier to read than with colored parenthesis
nwc10: gist.github.com/timo/00112498d970e...459689b840 19:27
nwc10 I find that quite readable. 19:29
timotimo not sure why it crashes tho :)
ah, a null string 19:31
hm, i think i'm actually hitting an exception being thrown and that's how it escapes back into the interp 19:34
same gist now has a beautiful braid to look at 19:41
nine timotimo: I have some local changes to improve that dumper and fix that endless recursion 19:57
and that segfault 19:58
Sorry, should have pushed it long ago
did so now: github.com/MoarVM/MoarVM/commit/1f...8bded61d2a 20:00
timotimo ah, a vector of "seen" values 20:01
yeah that's good
no indentation?
i'm thinking, with the newline-ified output, why not give a little copy-paste-able code snippet to get at individual objects and do something with them ... or something like that 20:07
nine: how would you feel about a dumper that dumps a lot more than just p6opaque? 20:08
the p6opaque dumper can of course already dump strings and ints, but only if they are attributes of a class
perhaps at least the right cast + address for individual things 20:10
so you can with one copy-paste get at some object's Body and print it
20:27 MasterDuke joined 20:29 MasterDuke left 20:32 patrickb left
timotimo kind of makes me want an ansi escape code that tells the terminal "when this text is clicked, copy-paste the highlighted text and press enter" or something :D 20:49
kind of like the clickable URL thingies that recently made the rounds 20:50
[Coke] oh, that's not dangerous. :P 20:51
timotimo never!
21:05 Geth joined 21:13 MasterDuke joined
nine Oh, I'd love a general MVMObject dumper 21:29
22:32 donaldh left, donaldh joined 22:37 donaldh left 23:08 donaldh joined 23:15 donaldh left
timotimo gist.github.com/timo/ff8e61022d0c1...b3d39ca4c0 - nine, do you think the "already seen" impl looks sane? 23:32
i've merged your seen vector and my indentation 23:35