I am currently using boost-python to embed a Python interpreter into my C++ application and facilitate passing data from the executed Python process to the running C++ application through the boost-python bindings, as per https://www.boost.org/doc/libs/1_75_0/libs/python/doc/html/tutorial/tutorial/embedding.html
I have some troubles with respect to performance, especially when calling wrapped functions with a large number of arguments, the overhead of parsing and boxing all those arguments for "passing" to the C++ "side" is considerable.
I checked alternatives to boost-python, for example pybind11, which can also be embedded, but the performance is unlikely to improve. I also found out about cppyy, but from the documentation I am at loss as how to facilitate embedding an interpreter into my program, or rather, how I should convert my current approach of an embedded interpreter to be able to use cppyy. My aim in trying out cppyy is to check whether using cppyy and/or PyPy as an interpreter can increase the performance of my code, since neither boost-python nor pybind11 support embedding PyPy.
Can anyone give any pointers in how to replace an embedded Python interpreter using boost-python with cppyy?