Live data from Hacker News

Ask HN: Why can't Python be compiled?

news.ycombinator.com

1–3 of 3 posts

Re: Ask HN: Why can't Python be compiled?

#3
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.