Making python fast for free - adventures with mypyc
I recently learnt that mypy has a compiler called mypyc. The compiler uses standard python type hints to generate c extensions automatically from python code. I found the idea very interesting as I have a library (Lagom - a dependency injection container) which is fairly extensively annotated with types. I liked the idea of getting a performance boost without having to rewrite any code or having to deal with multiple languages. This blogpost is intended to be a short overview of what I did, the problems I ran into and the workflow I ended up with.
Source: Making python fast for free - adventures with mypyc, an article by Steve Brazier.