Each language faction lives in its own Swiss Army Knife world. For some jobs you need a Husqvarna or Stihl.
I am not a compiler builder but I reckon not everything can be optimised by Numba (I suppose a but like C++ 'inline' is not a guarantee that code will be optimised).I haven't seen it used very widely. Where I work, if the performance offered by Python with Numpy with Pandas with TensorFlow is not good enough, someone writes the core part in C++ and exposes it to Python via Swig.
#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
char const* greet()
{
return "hello, world";
}
BOOST_PYTHON_MODULE(hello_ext)
{
using namespace boost::python;
def("greet", greet);
sudo apt-get install python-dev
IMHO if you can do something in 1 language, try doing so. Mixing different languages always introduces additional cognitive and development overhead and makes debugging harder.I am not a compiler builder but I reckon not everything can be optimised by Numba (I suppose a but like C++ 'inline' is not a guarantee that code will be optimised).I haven't seen it used very widely. Where I work, if the performance offered by Python with Numpy with Pandas with TensorFlow is not good enough, someone writes the core part in C++ and exposes it to Python via Swig.
SWIG sounds better because you get performance + data interop. I haven't tried it yet; BTW can we call Python from C++ using SWIG. I believe Boost Python can.
I am supervising several MSc students (who know C++ well) in ML-PDE-risk projects and are realising that C++ libraries e.g. OpenCV does not have the needed functionality. They are suggesting a pure Keras but a mixed C++/Python might be the best 'middle ground', especially if we can wrap Keras in a C++ jacket.
https://en.wikipedia.org/wiki/Design_by_contractAnd how was debugging? I understand if you don't want to talk about it.