← Back to team overview

instant team mailing list archive

Re: Slow memory cache?

 

2008/9/11 Anders Logg <logg@xxxxxxxxx>:
> On Thu, Sep 11, 2008 at 03:47:37PM +0200, Martin Sandve Alnæs wrote:
>> Have you added __hash__ and __eq__ or __cmp__ functions to your jit
>> object class? If not, the memory cache may not work as expected.
>
> I have added _hash_. What should __eq__ return?
>
> --
> Anders

Equality with other object, True or False. Hashmaps do not actually
require unique hash keys, so objects with the same hash may be
different. __cmp__ returns -1, 0 or +1 meaning self<other,
self==other, self>other. Don't implement both.

--
Martin


Follow ups

References