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

alister alister.ware at ntlworld.com
Sat Mar 12 14:03:07 EST 2016


On Sat, 12 Mar 2016 16:42:47 +0000, BartC wrote:

> On 12/03/2016 15:30, Chris Angelico wrote:
>> On Sun, Mar 13, 2016 at 2:12 AM, BartC <bc at freeuk.com> wrote:
> 
>>> However, I was going to revise my benchmark to use strings instead of
>>> integers, to show how much slower they would be. But the program was
>>> 10% faster with strings!
> 
>>> So there's something funny going on. Either string operations are
>>> super-fast or integer operations are somehow crippled. Or maybe there
>>> so many other overheads, that the difference between strings and ints
>>> is lost.
> 
>> Or maybe they're all actually *object* comparisons,
> 
> Yeah, that explains it!
> 
>   and what you know
>> about assembly language has no relationship to what's going on here.
>> This is why we keep advising you to get to know *Python*,
> 
> I'm not sure /my/ knowing Python better is going to help it get any
> faster.
> 
how will you konw untill you start writing python
rather than C or assembler?

> I discovered something that might be a clue to what's going on, but
> you're content to just brush it under the carpet.
> 
> OK.





-- 
Caf'e Minimalism:
	To espouse a philosophy of minimalism without actually putting
into practice any of its tenets.
		-- Douglas Coupland, "Generation X: Tales for an 
Accelerated
		   Culture"



More information about the Python-list mailing list