Python and the need for speed

Rick Johnson rantingrickjohnson at gmail.com
Sun Apr 9 22:04:07 EDT 2017


On Sunday, April 9, 2017 at 2:39:18 AM UTC-5, Steven D'Aprano wrote:
> On Sun, 09 Apr 2017 13:57:28 +1000, Chris Angelico wrote:
>
> I don't know anyone who has ever said "this interpreter is
> too fast, can you make it run slower?"

LOL!

> [...]
>
> Well, maybe. As is pointed out many, many times, 99% of
> Python code avoids the sorts of extreme dynamism that keeps
> things slow. Lots of people would be satisfied with a
> language *really close* to Python that was ten or twenty
> times faster, even if it meant that you couldn't write code
> like this:
>
>
> answer = input("What's your name?")
> exec("name = %r" % answer)
> print(name)

Yeah, but then we'd be discriminating against Chris. Between
Python, Pike, Ook and MUDs, that pretty much defines the
extent of Chris' life.

> Even better would be if the compiler was smart enough to
> use the optimized, fast runtime when the dynamic features
> aren't used, and fall back on a slower implementation only
> when needed to support the more dynamic features.

Hmm, a "dynamic compiler" -- interesting!



More information about the Python-list mailing list