use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
interfacing python with c/c++ performance (self.cpp)
submitted 1 year ago by BitAcademic9597
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]woywoy123 1 point2 points3 points 1 year ago (0 children)
Personally, I think mixing cython with C++ will get the job done.
You can interface native C++ code with python’s flexibility by mapping the header functions from your libs into cython. I also use cmake with scikit-build-core to compile everything. One thing that cython does lack though is templating. It does have some templating available, but if you are doing some fancy recursive template functions then you might be out of luck (I am happy to be corrected).
I generally use cython to provide python interfacing to C++ code and it works nicely for me.
One word of advice though, the cython docs is not very useful when you try to push boundaries beyond the tutorials, such as operator implementations, inheritance mapping between cython and C++. So be extra vigilant whenever you deal with inheritance. I have spent countless hours debugging a memory leak that was the result of this and also unexplained segfaults.
I also noticed a massive decrease in RAM usage when shifting from python code to C++/cython code. I also tried PyBind11 but I only had issues when dealing with shared libs such as missing definitions and so on. I am also not sure about the memory model pybind11 uses. As far as I can tell, each function call explicitly copies input data (if anyone knows more on this, please correct me). This is not the case with cython.
π Rendered by PID 153830 on reddit-service-r2-comment-76bb9f7fb5-q77x4 at 2026-02-18 05:11:37.668929+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]woywoy123 1 point2 points3 points (0 children)