3 ms·
I went from C++ for personal projects to Python for wrapper and C libraries with Python callable code. I basically prototype shit in pure python, and then if i
by ActorNightly 3y ago
I went from C++ for personal projects to Python for wrapper and C libraries with Python callable code. I basically prototype shit in pure python, and then if i decide i need more speed, I just rewrite the thing in C extension. Its pretty easy to do. ChatGPT can even do 90% of the work for you.
- remram 3y agoHave you tried Cython, numba, and the like?
- ActorNightly 3y agoNo real need. Python 3.12 without any C is usually fast enough for pretty much anything I do. Most of the bottleneck is latency, and for stuff I was using C for, mainly OpenCV for image processing, pytorch already has all the kernels that can run on Nvidia hardware that are way faster anyways.
- remram 3y agoI'm confused, you said you sometimes rewrite code as a C extension...? Have you considered Cython or numba for that?
- ActorNightly 3y agoNo, I used to just python.h, as per https://docs.python.org/3/extending/extending.html https://docs.python.org/3/extending/extending.html I currently don't do that anymore.