[Python-Dev] Using PEP384 Stable ABI for the lzma extension module (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Wed Oct 5 18:14:08 CEST 2011
- Previous message: [Python-Dev] Using PEP384 Stable ABI for the lzma extension module
- Next message: [Python-Dev] Using PEP384 Stable ABI for the lzma extension module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le mercredi 05 octobre 2011 à 18:12 +0200, "Martin v. Löwis" a écrit :
>> 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 PyBytesResize 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?
Probably so. How often is totally unknown to me :)
Regards
Antoine.
- Previous message: [Python-Dev] Using PEP384 Stable ABI for the lzma extension module
- Next message: [Python-Dev] Using PEP384 Stable ABI for the lzma extension module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]