lizmat if a JIT log says: "Cannot get template for: getcode" 11:32
is that good or bad ?
jnthn At a guess it means the expression JIT doesn't know about that op yet 11:36
lizmat and "BAIL: op <param_on_o>" 11:37
what's param_on_o ?
jnthn on = optional named
o = object register
lizmat ok, so that means we cannot JIT any sub/method that takes an optional named parameter ? 11:38
jnthn No
Most of the time, spesh rewrites param_* instructions into sp_ instructions
lizmat I was checking gfldex's note about DateTime being slow 11:39
jnthn Specializations are often keyed on callsite objects, meaning that when we specialize, we know if we're getting such an argument
lizmat and it turns out the real bottleneck is that new-from-positional and SET-SELF don't even get speshed, let alone JITted
jnthn So it specializes to either the default code or a fast op to directly read from the incoming args buffer without checking 11:40
And those cases JIT just fine
jnthn So there's a few possible things that could be happening 11:40
1) There's something about the params otherwise that is too complex for spesh to deal with
2) The function is megamorphic 11:41
3) The function is called with flattening args
lizmat I guess it's the number of args
jnthn How many?
lizmat 9 and 8
I guess that's too many :-) 11:42
jnthn src/spesh/args.c
#define MAX_POS_ARGS 8
/* Maximum number of named args we'll consider for optimization purposes. */
#define MAX_NAMED_ARGS 8
Maybe tweak those up to 16 :) 11:43
And see if it helps
(Can just go to your MoarVM directory, replace 8 with 16, and type make install, no need to rebuild NQP or Rakudo or to re-configure)
lizmat ack
will do
nine jnthn: what's the reason for having those limits in the first place? 11:51
jnthn Easier memory management
(Can just declare the array on the stack)
Plus a figuring that if you have that many args, then chances are this ain't all that hot path anyway :P 11:52
*params
nine Good guess... p5_call_method has exactly 8 arguments ;) 11:53
jnthn haha 11:54
The other thing that it really doesn't like at the moment is aliases
:foo(:$f)
lizmat setting it to 16 doesn't change the profile 12:01
jnthn OK, then it's probably something else 12:02
jnthn lunch; bbl 12:03
lizmat jnthn: could it also be that some attributes live in a role? 12:37
jnthn No 12:52
Not for failing to rewrite args
lizmat ack 12:53
bart_ good * #moarvm 14:17
jnthn o/ brrt
brrt ohai jnthn
long time no direct chat, i think :-)
jnthn Aye...I did a bit of travel, got flu, just about got rid of it for Christmas/New Year but still mostly rested then...slowly starting to get back to things a bit 14:20
[Coke] welcome back to the land of the breathing. 16:34
dogbert17 is the following a well known problem or should I report it? gist.github.com/dogbert17/a7cb8eaf...fc2dc29c5f 17:02
Geth MoarVM: dogbert17++ created pull request #776:
Fix typo
18:43
MoarVM: 47769a5a77 | (Jan-Olof Hendig)++ | src/gc/orchestrate.c
Fix typo
18:49
MoarVM: c2de234c4c | (Zoffix Znet)++ (committed using GitHub Web editor) | src/gc/orchestrate.c
Merge pull request #776 from dogbert17/fix-typo

Fix typo
jnthn Fun (slightly irritated :)) read for those interested in the intersection of GC, concurrency primitives, and JIT: psy-lob-saw.blogspot.cz/2018/01/wha...makes.html 22:53