4 ms·
The go-to solution for speeding up Python code should always be first to use Cython on critical sections of your Python code and tweak your code using type anno
by fermigier 9y ago
The go-to solution for speeding up Python code should always be first to use Cython on critical sections of your Python code and tweak your code using type annotations, at least IMHO.
- hoschicz 9y agoDo type annotations really make any difference to the interpreter? I thought that the interpreter doesn't care about what type a variable is annotated to...
- klibertp 9y agoCython compiles to native library exposing Python extensions API.
- deleted 9y ago[deleted]
- dragonwriter 9y ago> Do type annotations really make any difference to the interpreter? Note the advice was first use Cython (a compiler for a superset of Python), and then tweak as needed with type annotations. Cython’s compiler definitely uses type annotations.
- kankroc 9y agoI don't understand why your comment is so low. Cython is the easy-to-implement solution here.