3 ms·
Python is basically the master glue language at this point. If more than a few percent of execution time is spent in Python you are probably doing it wrong. P
by coppsilgold 5mo ago
Python is basically the master glue language at this point.
If more than a few percent of execution time is spent in Python you are probably doing it wrong.
Personally I don't even understand why Cython is a thing, just write performance critical functions in other languages:
<https://pypi.org/project/rustimport/ https://pypi.org/project/rustimport/>
<https://pypi.org/project/import-zig/ https://pypi.org/project/import-zig/>
Note that you can even start threads in those languages and use function calls as pseudo-RPC. All without an overly complex build system.
- physicsguy 5mo agoCython and PyBind and Nanobind are good for wrapping an existing library written in C++ and crafting an interface that doesn’t feel like it’s a C++ one. They were a big step from ctypes and SWIG
- pjmlp 5mo agoPlus, even if it has a Perl like feeling to it, C++26 reflection will make this even easier. Already available on GCC 16.
- MohamedMabrouk 5mo agoMojo aims to be this (other language) arguably with easier programming model that rust, familiar syntax to python devs, and a modern design in general. Its stated goal now, is the easiest way to extend python. it provides the same interface for zero-hassle import of .mojo files
- sirfz 5mo agoCython is a no-brainer really. You write the same language with immense speedup (matching what the "other languages" can achieve at much less effort). Also tools like numba can beat them all at way less effort. Imho, dropping into other languages should be the last resort in any project.
- fiedzia 5mo ago> If more than a few percent of execution time is spent in Python you are probably doing it wrong. Every program that starts with 1% of Python writes more Python and gets to 20,40, 60 and than 99% of it.