From: Raymond Hettinger Date: Sat, 26 Jun 2004 04:42:06 +0000 (+0000) Subject: Add a comment with implementation notes. X-Git-Tag: v2.4a1~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=616f4f61bae92b5733b346552d6b522ad1409937;p=python Add a comment with implementation notes. --- diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c index 4026ea50ef..da276ce370 100644 --- a/Modules/collectionsmodule.c +++ b/Modules/collectionsmodule.c @@ -359,6 +359,13 @@ deque_item(dequeobject *deque, int i) return item; } +/* delitem() implemented in terms of rotate for simplicity and reasonable + performance near the end points. If for some reason this method becomes + popular, it is not hard to re-implement this using direct data movement + (similar to code in list slice assignment) and achieve a two or threefold + performance boost. +*/ + static int deque_del_item(dequeobject *deque, int i) {