3 ms·
Not all Python is just a front-end to fast C code. That only really works with numerical computing of big tensors. Though I'd still agree - if your Python is s
by IshKebab 3y ago
Not all Python is just a front-end to fast C code. That only really works with numerical computing of big tensors.
Though I'd still agree - if your Python is slow you're doing it wrong - you shouldn't be using Python!
- punnerud 3y agoIf you switch away from Python, you are probably sub optimizing
- eru 3y agoThere are reasons other than speed that makes people move away from Python. Btw, recently CPython has sped up a lot. Between versions 3.9 to 3.12 many programs run about twice as fast. Much of that improvement is thanks to the 'faster-cpython' project (which Microsoft is generously funding). I contributed about a 1% speedup during that time, too.
- eru 3y agoYou can also call eg Rust or OCaml code from Python, doesn't have to be C.
- IshKebab 3y agoOf course. When people talk about calling C from Python they really mean "a fast language".