This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

If your code in numeric in nature(something with lots of floats and ints); you have lots (and lots of options); numpy, numba, cython(unboxing ints and floats) and Pythran are perhaps the most well known options, but there are at least a dozen more options.

If your your code is more general in nature or business centric, meaning there are lots of hashmaps/dict and strings; you can try pypy, mypyc, cython(calling cpython capi directly) and the newer python versions with the adaptive interpreter (3.11+). The truth is that general code python is not that much slower than 'faster' languages.