r/cpp • u/_bstaletic • Jun 21 '26
Pymetabind: Writing pybind11 bindings with C++26 reflections
https://codeberg.org/bstaletic/pymetabind/
81
Upvotes
r/cpp • u/_bstaletic • Jun 21 '26
View all comments
Show parent comment
1
u/_bstaletic Jun 22 '26
I may have been too terse with that statement.
In my case, part of the benchmark suite were purely c++ benchmarks and another part of the suite dealt with
py::lists. To my surprise all benchmarks were affected equally. I do compile the bindings as part of the rest of the project, so everything gets compiled with-O3, against nanobind's recommendations. I think I've messed withNOMINSIZEargument ofnanobind_add_module(), but it's been a long time, so don't take my word for it.Yes, I was surprised by the numbers I saw as well. nanobind definitely did make some improvements that I was convinced would make it beat pybind11.