Speed of PyCall and Python wrapper vs. Julia wrapper

I’m looking at using a C++ library that already has a Python wrapper. I’m curious if there is a speed penalty using Python/PyCall vs. writing my own Julia wrapper.

Depends on a number of factors, I think, but the penalties you’ll get for running through Python are converting from Julia objects to Python objects and back, starting up Python, whatever over head is introduced in the python library.

I think it’s safe to say it would be faster to do it all in Julia, but how much faster? Not sure.

Might be worth trying it with Python and then profiling different steps in the process. Then you can decide if enough of the time is spent outside of C++ to be worth it

There should be a good number of libraries which are wrapped both from Julia and from Python, which can be used to benchmark the overhead. Need to check that they are called in the same way of course and that no other high level logic is added.