We implement two recursive algorithms, fibonnaci and factorial, in C++ and make Python bindings using pybind11, without even using CMake. We show here how we can use more than one C++ functions when we make Python bindings. The C++ functions are much faster than the Python implementations. We borrow some ideas from here.
We implement two recursive algorithms, fibonnaci and factorial, in C++ and make Python bindings using pybind11, without even using CMake. We show here how we can use more than one C++ functions when we make Python bindings. The C++ functions are much faster than the Python implementations. We borrow some ideas from here.
- C++11
- pybind11
pybind11 can be installed using:
pip install pybind11
This module can be compiled and installed using:
pip install -e . -vvv
And you can run this module using:
python main.py