The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)
BartC
bc at freeuk.com
Mon Mar 21 08:43:47 EDT 2016
On 21/03/2016 12:08, Ned Batchelder wrote:
> On Sunday, March 20, 2016 at 9:15:32 PM UTC-4, BartC wrote:
>>
>> A tokeniser along those lines in Python, with most of the bits filled
>> in, is here:
>>
>> http://pastebin.com/dtM8WnFZ
>>
>
> Bart, we get it: you don't like the trade-offs that Python has made.
...
> You don't like Python. Can we leave it at that?
On the contrary, I do like it. It's just a shame it's made those
trade-offs as a bit more speed would have made it more useful to me.
And apart from my personal opinions, if anyone else is engaged in
implementing any of this stuff, they might be interested in what plain
byte-code can achieve.
This tests highlights the benefits of an O(1) switch statement. And of
being able to work with integers, as Python seems to discourage that.
(It seems silly to have to compare strings because using ints could be
slower!)
--
Bartc
More information about the Python-list
mailing list