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: [email protected] [mailto:[email protected]] On Behalf Of Antoine Pitrou Sent: Wednesday, October 27, 2010 20:15 To: [email protected] Subject: Re: [Python-Dev] new buffer in python2.7 On Wed, 27 Oct 2010 20:00:10 +0800 Kristján Valur Jónsson <[email protected]<mailto:[email protected]>> 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 [email protected]<mailto:[email protected]> http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com
_______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
