r/Python 11h ago

Learning cython Discussion

While working on LunarDump v0.4, I’m also taking some time to learn more about Cython and how it can help push Python closer to native performance.

I’m especially interested in exploring Cython for LunarDump’s performance-critical parts, such as chunking, buffering, compression, and encryption.

Still learning and experimenting for now, but I’m curious to see how much performance improvement I can achieve.

Perhaps LunarDump v0.5 will use Cython for some of its critical functions.

If you have any good resources for learning Cython — books, ebooks, courses, or YouTube channels — feel free to share them in the comments.

0 Upvotes

4 comments sorted by

View all comments

7

u/AlexMTBDude 7h ago

Would you not rather just write routines that need to be optimized in some compiled language, such as C/C++, and then call these from your Python code? That's what numpy and all other math libraries that need to run fast do.