(original) (raw)
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.com@python.org \[mailto:python-dev-bounces+kristjan=ccpgames.com@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 <kristjan@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
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com