Re:Ask HN: Why can't Python be compiled?
by dagw on Thursday June 22, 2017 @04:52AM
(#14610932)
Cython compiles any python code to C which is then complied normally. If you provide type hints cython will use that to produce more optimized C code.
That being said the speedup from compiling your untyped python code is minimal, generally in the 0-40% range. However by adding types to your code you can often get significant speedups.
That being said the speedup from compiling your untyped python code is minimal, generally in the 0-40% range. However by adding types to your code you can often get significant speedups.