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 sfllaw
Recipients sfllaw
Date 2012-11-03.19:31:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351971066.78.0.209275581981.issue16398@psf.upfronthosting.co.za>
In-reply-to
Content
If you look at the implementation of deque.rotate(), it does the equivalent of deque.append(deque.popleft()) or deque.appendleft(deque.pop()).

Unfortunately, for larger rotations, the pop() and append() calls just do too much work. Since the documentation recommends using rotate() to do slicing-style operations, this could get seriously slow.

deque.rotate() could just touch up the internal pointers and use memmove() to realign the data.

Benchmarks, of course, would have to be written to make sure this is a win.
History
Date User Action Args
2012-11-03 19:31:06sfllawsetrecipients: + sfllaw
2012-11-03 19:31:06sfllawsetmessageid: <1351971066.78.0.209275581981.issue16398@psf.upfronthosting.co.za>
2012-11-03 19:31:06sfllawlinkissue16398 messages
2012-11-03 19:31:06sfllawcreate