Not cheap enough.  There is no reason why creating another memoryview shouldn't 
be as cheap as creating a string slice.

I'm investigating why.

K



-----Original Message-----
From: python-dev-bounces+kristjan=ccpgames....@python.org 
[mailto:python-dev-bounces+kristjan=ccpgames....@python.org] On Behalf Of 
Antoine Pitrou
Sent: Wednesday, October 27, 2010 20:15
To: python-dev@python.org
Subject: Re: [Python-Dev] new buffer in python2.7



On Wed, 27 Oct 2010 20:00:10 +0800

Kristján Valur Jónsson <krist...@ccpgames.com<mailto:krist...@ccpgames.com>> 
wrote:

> Calling getbuffer on a bytearray or a bytes object should be really

> cheap, so I still don't accept this as a matter of fact situation.



It *is* cheap. It's just that copying a short slice is dirt cheap as well.



Of course, it you manipulate 1 KB slices or longer, it's different.



Regards



Antoine.

_______________________________________________

Python-Dev mailing list

Python-Dev@python.org<mailto:Python-Dev@python.org>

http://mail.python.org/mailman/listinfo/python-dev

Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to