Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Python can be considered slow compared to compiled languages because it is an interpreted language, which means code is executed at runtime rather than being compiled into native code beforehand.

This is often perpetuated by Python devs but it's only half the story. You can have pretty darn fast JIT compilers give static compilers a run for their money.

The problem are underlying semantics and compiler guarantees given by the language itself. The more constraints you have the more wiggle room the compiler has for optimization. And this is not nearly as cut and dry as most think since a JIT can leverage extensive runtime information to make better decisions than static compilation could.

It's the highly dynamic nature of Python which makes it highly un-optimizable. There are several crutches in place such as list comprehension but the memory model is ridden with indirections.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: