[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:

| A map is not very good since we don't have a obvious key (for the same
| reason a hash_map would be hard to use since a hash function would be
| hard to get fast/right/uniue).
| 
| I agree that the linear search is not good. (and this is what causes
| the slowdown I belive, (also that we clean the container very
| often))

we can sort the vector on the use_count of the shared_ptr. Then the
items that is used by the most will be found first.

Hmm... but we cannot use any of the other std::containers... but we
can perhaps use a priority_queue (with a deque underneath). I'll do
some other small changes first and then I will try that.

I will send new patches as I make progress.

        Lgb

Reply via email to