27.7.1.5. pybind11
pybind11 is amazingly easy to use. But it can also make your builds really slow:
-
pybind11 accounts for 50% of gem5 build time. As mentioned there, if pybind11 would split everything that can go into a cpp file from the hpp (i.e. everything except templates) that could already significantly reduce build times in certain cases. This is discussed upstream at: https://github.com/pybind/pybind11/issues/708
-
https://discuss.pytorch.org/t/how-are-python-bindings-created/46453/2