The (large) number of calls to xpost_object_compare() by the dictionary functions could be cut considerably by storing the actual hashed key in the table. Table elements would now become triples: (hash, key, value) and the compare function only needs to be called upon the key objects if the hash values compare exactly equal (a cheap 32bit compare).
The (large) number of calls to xpost_object_compare() by the dictionary functions could be cut considerably by storing the actual hashed key in the table. Table elements would now become triples: (hash, key, value) and the compare function only needs to be called upon the key objects if the hash values compare exactly equal (a cheap 32bit compare).