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 at python.org [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf Of Antoine Pitrou Sent: Wednesday, October 27, 2010 20:15 To: python-dev at 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 at ccpgames.com<mailto:kristjan at 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 at python.org<mailto:Python-Dev at python.org> http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20101027/5ba6693b/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4