The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

Ned Batchelder ned at nedbatchelder.com
Wed Mar 23 11:40:14 EDT 2016


On Wednesday, March 23, 2016 at 6:35:12 AM UTC-4, BartC wrote:
> On 23/03/2016 06:09, Ben Finney wrote:
> 
> > The problem is that Bart simultaneously is a beginner at Python, and
> > expresses astonishment that everyone shrugs when Bart's
> > dreadfully-written code performs so badly.
> 
> My interests differ from most people here writing Python.
> 
> For example, I'm interested in byte-code (any byte-code) and what can be 
> done with it. Investigating how well it performs in 'extreme' cases 
> means executing algorithms predominantly in byte-code, not measuring how 
> well some library function (in some unspecified language) can cope with 
> the algorithm.

Thanks for clarifying your focus.  As you explore this topic, keep in mind
then that you are only looking at part of Python.  When you find yourself
wondering why the bytecode is a certain way, the answer might be, "Because
wherever this bytecode is run, the standard library is available, and this
problem is better solved with a thing in the standard library."

This doesn't mean your investigations are invalid, but they are only part
of the story.  When it seems to you like Python has made a strange choice,
you may have to broaden your perspective to understand it.

--Ned.



More information about the Python-list mailing list