Author sfllaw
Recipients sfllaw
Date 2012-11-03.19:31:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2012-11-03 19:31:06sfllawsetrecipients: + sfllaw
2012-11-03 19:31:06sfllawsetmessageid: <>
2012-11-03 19:31:06sfllawlinkissue16398 messages
2012-11-03 19:31:06sfllawcreate