| 5 Sep 2026 | |||
| rnddim | rnddim left | 09:13 | |
| rnddim | rnddim joined | 09:14 | |
| rnddim | rnddim is now known as ShimmerFairy | ||
| Voldenet | cool benchmark, if you closely look 3 of 4 cases have very similar timings now | 09:58 | |
| and yeah iirc jit only works for x86 unless it was changed, I'm kind of hoping that it's able to make this check even further somehow | 10:00 | ||
| or x86_64 | |||
| even faster* | 10:01 | ||
| timo | the benchmark in question is very susceptible to a hot cache + hot preloader + hot branch predictor | 10:10 | |
| in moarvm we have two parts that might usually both be called "the jit" and only the second half is missing for non-x86-64 | 10:11 | ||
| the bytecode specializer is still in effect on every architecture we run on | |||
| apogee_ntv | If there are improvements I can do to the benchmark or suggestions on the code please tell me, happy to dig deeper, I'm just very new to the moarvm source and how it all works together. | 10:45 | |
| timo | it's the curse of every microbenchmark, really | 10:53 | |
| the right solution must be to not turn a getlexperinvtype into a constant lookup if the bytecode isn't actually specialized on the invocant type in the first place | 10:59 | ||
| apogee_ntv | Yeah, I couldn't see any way to tell if it was an invocant type from the metadata, the check that was there was just checking if arg0 was an object of a known type but for topic setting postfixes, arg0 is the topic. | 13:19 | |
| timo | yes, we may need to give moar more context to work with from the high level language | 13:24 | |
| apogee_ntv | Yeah so pass something like arg0_is_not_invocant in the frame metadata and then if it's true, fold to use the indexed pointer, if false, use the constant? | 14:01 | |
| I'd have to look at how the metadata arrives and how it gets attached | 14:02 | ||
| timo | I'm imagining it could be made a part of the callsite | 14:33 | |
| maybe there is something else we can very cheaply look up to check if we're in an actual "specialized on invocant" situation or not | 14:35 | ||
| for example, we already have a "caller is outer" flag somewhere. that could combine well with the information of "what is actually passed into its arg0" | 14:36 | ||
| I don't remember if we're inlining the frame with the problematic instruction, and whether turning inlining off makes a difference or not | 14:37 | ||
| Voldenet | it fails with `MVM_SPESH_INLINE_DISABLE=1` | 14:40 | |
| apogee_ntv | It fails under most things short of fully disabling spesh yeah | 15:33 | |
| notable6 | notable6 left | 20:39 | |
| notable6 | notable6 joined | 20:41 | |