Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
timo somehow, when parsing the core setting, a tremendous amount of the string "prefix" and the string "infix" are created as new MVMStrings with not-strand-storage, i.e. they are not just substr'd out of something else, or taken from a hash key or something like that 08:52
lizmat string literals ? 09:01
timo it could theoretically be the nqp::lc in EXPR 09:05
string literals should always come out of the comp unit's string heap 09:21
lizmat TIL :-)
timo ok so we definitely do create a bunch of strings because we nqp::lc the $KEY that comes into EXPR 09:24
question is, does it matter 09:25
there is an "unless $KEY { return 0 }" and later we have $KEY // "infix" which seems redundant 09:26
but why are the keys that come in always uppercase, and why don't we switch so we use upper case keys in EXPR itself so when we nqp::uc the strings that come in to make them always fit we just get the same string back usually since uc on an already-uppercase string re-uses the incoming string 09:27
oh, ah, we do use $key as a key into $/'s hashn
we also create a lot of int from Int, and very few num from Num 09:30
(this is all just looking at core.c setting compilation fwiw)
timo add_numeric_constant does that part 09:33
from World.nqp
lizmat well, that's going to go the way of the dodo 09:34
timo because of rakuast i assume 09:35
lizmat yes 09:37
timo .o( i think stagestats should output the number of gc runs at the end haha ) 09:39
1865 gcs run (but i did not count minor vs major) with my little patch to eliminate lc calls, and 1869 without my patch 09:45
so ... drop in the bucket territory here 09:46
lizmat still, each GC run less is like .05 second wallclock less ? 09:49
*and* less memory usage total, I'd say, so easier to build on memory challenged hardware ? 09:50
I mean, if there's no downsides
or is this a patch in World.nqp ?
timo gist.github.com/timo/42ebfc80ed905...b4584a86c2 only a very small change in World 09:53
the more important change is in Actions 09:54
not sure if the "else" branch ever encounters something that is not Num 09:55
maybe an if or ??!! cascade is faster than a hash here 09:56
lizmat timo: I think you're focusing on the past here 10:04
I couldn't find anything like that in the RakuAST code, so I guess it has been fixed in another way
Voldenet it's not the past if rakuast is only experimental 10:06
lizmat rakuast will not be experimental in 6.e
it's only marked as experimental because it may still change in API 10:07
this is different from experimental :pack and friends
Voldenet I see, it's only tagged as experimental so people don't use it, but it's stable 10:08
lizmat it's stable enough to make 64% of test files pass completely
timo does rakuast have a new EXPR?
lizmat ah, yes it does 10:09
in src/Raku/Actions, line 836
I was only looking in src/Raku/ast :-( 10:12
timo hehe.
without my patch it's 1858 minor, 11 major collections, with it it's 1857 and 11, so it could very well be it was just noise when i thought i made it noticeably better :D 10:15
1856/11 this time, maybe it gets better every time i run it 10:16
yeah but i just found some random tree to bark up for no good reason 10:17