]> granicus.if.org Git - python/commitdiff
Add a comment with implementation notes.
authorRaymond Hettinger <python@rcn.com>
Sat, 26 Jun 2004 04:42:06 +0000 (04:42 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 26 Jun 2004 04:42:06 +0000 (04:42 +0000)
Modules/collectionsmodule.c

index 4026ea50efde1bdd0427b403e65cc5387e74035f..da276ce3703cc3cef48415fb2ea4b2cecaaba30a 100644 (file)
@@ -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)
 {