Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Have you tried Cython, numba, and the like?


No 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.


I'm confused, you said you sometimes rewrite code as a C extension...? Have you considered Cython or numba for that?


No, I used to just python.h, as per https://docs.python.org/3/extending/extending.html

I currently don't do that anymore.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: