Hacker News new | ask | show | jobs
by gshulegaard 2604 days ago
This is super interesting but if I am looking to bring C++ into my Python code base it would be because performance is important enough to do so. With that in mind I am not sure how this stacks up against compiled half steps like Cython or foreign function interfaces likes ctypes or CFFI instead.
2 comments

If you have a Python code base and are looking to speed up some part of it, Cython is the way to go. Pybind11 and cppyy are more for cases where you have a bunch of C++ code that you want to provide a Python interface for.
Cython unfortunately doesn't have a very good pypy story, which cppyy does.
Check out the Rust python bindings too; specifically PyO3. If you're starting from scratch it's worth exploring. [1]

[1] https://www.benfrederickson.com/writing-python-extensions-in...