While it is nice that this option is available, it would be much better if Python itself would embrance the necessary runtime capabilties to not have to rely on it.
To write fast Cython, you basically need to write in C and control everything including Python API calls. No runtime will help with this.
Cython is 20
31–40 of 71 posts
Re: Cython is 20
#32Re: Cython is 20
#33Re: Cython is 20
#34I love Cython. I really feel like it's the right balance of usability and allowing you to do what you want/need. Want to make your code a bit faster? Write Python with type annotations. Want to call a C library? Just import the header, and then use it from a function. Pybind11 is also great, but quite different in aims - I feel like it's more like a project for C++ programmers wanting to expose functionality to Pytho…
But some packages can utilize it for higher performance but most of the time it'll be slower cause you need to parse extra information if you want to reuse it in pure python.
Re: Cython is 20
#35Re: Cython is 20
#36Re: Cython is 20
#37I love Cython. I really feel like it's the right balance of usability and allowing you to do what you want/need. Want to make your code a bit faster? Write Python with type annotations. Want to call a C library? Just import the header, and then use it from a function. Pybind11 is also great, but quite different in aims - I feel like it's more like a project for C++ programmers wanting to expose functionality to Pytho…
Python with type annotations isnt faster using python runtime. But some packages can utilize it for higher performance but most of the time it'll be slower cause you need to parse extra information if you want to reuse it in pure python.
Re: Cython is 20
#38Earlier quoted context omitted.
To write fast Cython, you basically need to write in C and control everything including Python API calls. No runtime will help with this.
Common Lisp and simlar languages are a prof of what is possible.
Re: Cython is 20
#39and i still have no idea what i could use it for...
With a bit of care (and benchmarking) you can get very respectable speed. The main drawback is that the further you go, the more C knowledge you need in order to not blast your own feet off.
If you're just after a bit more performance in general, a drop in solution like pypy might be enough.
Re: Cython is 20
#40Earlier quoted context omitted.
Common Lisp and simlar languages are a prof of what is possible.
Writing a much faster language runtime for a language that looks quite a bit like Python is easy. The hard problem is writing a faster language runtime that is 100% compatible with all current python programs (and their extensions) out in the world.