|
01:07
ilogger2 joined
|
|||
| japhb | Is there a way to ask the *static* optimizer to inline a sub call? | 01:41 | |
| I have some really code that is built up from a lot of small routines just as a matter of both DRY and complexity management, but I'd like the whole thing to be flattened as much as possible in the compiled code. | 01:43 | ||
| (Because a lot of those small routines are called from loops, within branch trees, or both) | |||
| timo | have you checked yet how the inlining success rate is? there's a handy -M that liz came up with that you can just put on your raku command to spit out a summary of inlining at the end | 02:12 | |
| i think it's -MIL or -MSIL or so? | |||
| yeah it's -MSIL | |||
| i believe the parts of the static optimizer that were for statically inlining stuff were removed because moarvm's runtime specializer was better at the job anyway, and before that i think it might only have been active for subs with only native arguments like int num or str, so a lot of our operators | 02:16 | ||
| japhb | timo: Will that show the inlining results *for a particular routine*? | 03:07 | |
| Meanwhile: "Gee, looks like I need a new str primitive, which is almost certainly going to be a bottleneck. Guess I'll be jumping into NQP land again ..." | 03:09 | ||
| timo | it shows for all inlining attempts whether they worked or were prevented by something, and the attempts include everything from the compilation stage through execution | 03:17 | |
| japhb | Hmmm, OK, thanks timo | 03:47 | |