Rev 4736: Some ideas about StaticTuple.__richcompare__. in http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple
John Arbash Meinel
john at arbash-meinel.com
Fri Oct 2 06:38:44 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple
------------------------------------------------------------
revno: 4736
revision-id: john at arbash-meinel.com-20091002053835-q4ztao5hwvzyr181
parent: john at arbash-meinel.com-20091002042030-65rlathg6cere9a4
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-static-tuple
timestamp: Fri 2009-10-02 00:38:35 -0500
message:
Some ideas about StaticTuple.__richcompare__.
-------------- next part --------------
=== modified file 'bzrlib/_static_tuple_c.c'
--- a/bzrlib/_static_tuple_c.c 2009-10-01 21:34:36 +0000
+++ b/bzrlib/_static_tuple_c.c 2009-10-02 05:38:35 +0000
@@ -378,9 +378,15 @@
return Py_False;
}
}
+ /* TODO: if STATIC_TUPLE_INTERNED_FLAG is set on both objects and they are
+ * not the same pointer, then we know they aren't the same object
+ * without having to do sub-by-sub comparison.
+ */
/* It will be rare that we compare tuples of different lengths, so we don't
* start by optimizing the length comparision, same as the tuple code
+ * TODO: Interning may change this, because we'll be comparing lots of
+ * different StaticTuple objects in the intern dict
*/
vlen = vk->size;
wlen = wk->size;
More information about the bazaar-commits
mailing list