Given a pointer on a struct, I need to very quickly find whether it is part of a set (that I have to define/implement myself). I may consider a technique like Bloom Filter, but don't really know how to do it on a pointer.
The solution needs to work on 32 and 64 bits machine.
Edit: All those pointers (2k-5k of them) points to various random memory addresses since they target an element of a doubly linked list I have no control on. This can be rephrased as: "How to find in an element is part of a read-only doubly linked list by creating another structure aside?"
Edit 2: The doubly linked list may growth with the time, but not the set I am controlling.
From the page you referenced:
If you only have 2k-5k items then I doubt you're talking about an "impracticably large hash area in memory".
In short, I'd recommend a hash table. You'd need to do one O(n) pass over the data to build the table, and then lookups would be O(1).