in reply to Ways to optimize perl compile that's only to be used for embedding?

Exactly so.   First, what exactly does “optimize” mean, to you, in this situation.   And then, second, why do you care?   (The latter is meant as a serious question.)   Taking a step back from this requirement, what exactly differentiates this requirement from an ordinary application of XS?   Perl packages make use of low-level C/C++ modules more-or-less all the time.   How is this different?

I suggest that you append a comment to this thread (please don’t change the original post) in which you elaborate on what you said about “in a nutshell.”   Your thoughts have obviously gone a very long way down one particular path, whereas when I read your brief description from an outsider’s point of view I’m not sure why this path was taken nor why exactly you concluded that one must do what you are now attempting to do.   I graciously presume that there is a reason and that you are entirely right.   But I can’t see it yet.   Therefore, kindly clarify.   What, exactly, is “going down” here?   Where are you coming from, and to where are you bound?