Not sure what you are using it for. If you need to extend the buffer
in case it is too small, there is absolutely no way this could work
without copies in the general case because of how computers use
address space. Even _PyBytes_Resize will copy the data.

That's not a given. Depending on the memory allocator, a copy can be
avoided. That's why the "str += str" hack is much more efficient under
Linux than Windows, AFAIK.

Even Linux will have to copy a block on realloc in certain cases, no?

Regards,
Martin

_______________________________________________
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