4 ms·
> What I meant is inline. So inside of a py file, you can rewrite the one function which you identified as the bottleneck. In C or another language. Have a loo
by chronial 5y ago
> What I meant is inline. So inside of a py file, you can rewrite the one function which you identified as the bottleneck. In C or another language.
Have a look at cython – it provides exactly that.
- FreeHugs 5y agoBut can you swap out CPython for Cython in - say - a Django stack and things go smooth? Every time I look up how to replace CPython with something faster for Django, everybody who tried it (in production) is of the opinion that it was surprisingly painful and is not worth the hassle.
- jonatron 5y agoI use Cython for the small part that has a tight loop in a Django project. Using Cython with Django itself sounds difficult, but the Falcon framework looks like it uses Cython.