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

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Mar 23 12:08:35 EDT 2016


On 23/03/2016 10:34, 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.
>
> And doing it 'Pythonically' can lead to suggestions such as the
> following the other day:
>
>   c, psource = psource[0], psource[1:]
>
> (where psource is a very long string), which even I could tell, from
> knowing what goes on behind the scenes, wasn't going to work well
> (duplicating the rest of the string roughly every other character).
>

It would work perfectly. How would it duplicate the rest of the string 
roughly every other character?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list