Modern C++ Features: The Core of Pybind11's Efficiency

Pybind11's compact and efficient implementation, requiring only about 4K lines of core header files, is attributed to its embrace of modern C++11 features like tuples, lambda functions, and variadic templates. It also precomputes function signatures at compile time using `constexpr`, further contributing to smaller binaries.

Sources

Open the full topic