News for hackers. Stuff that matters.
Re:Loops in Python – Comparison and Performance by jcranmer on Thursday August 08, 2019 @02:52PM (#20647401)
> For the most part, its slowness is due to its power. It's so terribly powerful that very near nothing is determined statically.

No. It's slow because the language is interpreted, not JITed. Powerful, highly-dynamic languages can be quite amenable to JIT compilation, especially if you're not using the features. Shape optimizations (assuming the code in question is going to be used more or less monomorphically) can convert name lookups to structure offsets. You can make code work with dynamic modifications by implementing deoptimization guards.

The CPython implementation explicitly favored simplicity of the interpreter over making it a competitively fast runtime.

Re:Loops in Python – Comparison and Performance by m_mueller on Friday August 09, 2019 @03:13PM (#20657430)
Yes and I recommend trying numba for a mostly seemless optimization using JIT.