This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josiahcarlson
Recipients josiahcarlson, pitrou
Date 2008-08-08.20:38:27
SpamBayes Score 0.008028194
Marked as misclassified No
Message-id <>
Sadly, this isn't quite as easy as it would seem.  The O(1) memory
overhead version of this requires 2n reads and 2n writes, but does both
reads and writes at two memory locations at a time, which may have
nontrivial performance implications.

The simple version that copies out the small part of the shift into a
temporary buffer, doing a memcpy/memmov internally, then copying the
small data back is likely to have much better performance (worst-case
1.5n reads and 1.5n writes.

Offering this ability in the momoryview object would be very
interesting, though I'm not sure that the memoryview object is able to
offer a multi-segment buffer interface where the segments are not the
same length (this could be hacked by having a single pointer per byte,
but at that point we may as well perform a copy).
Date User Action Args
2008-08-08 20:38:31josiahcarlsonsetrecipients: + josiahcarlson, pitrou
2008-08-08 20:38:31josiahcarlsonsetmessageid: <>
2008-08-08 20:38:30josiahcarlsonlinkissue3489 messages
2008-08-08 20:38:28josiahcarlsoncreate