Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
| 
| Lars> Yes, I see the same here. So we have to decide if this is a slow
| Lars> down that we can live with. (on the cell phone the numbers above
| Lars> came out as 218 and 27 and I got really worried...)
| 
| Where does the slowdown come from? The ShareContainer::get method?
| Concerning this ShareContainer template, an obvious question: isn't
| there a better container than vector for this kind of stuff (a map?).
| Or could we order the contents of the container so that the most
| requested items come first?

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))

Prefferably the clean should be moved into the get, but I am a bit
afraid that this can cause wrong behaviour, I have to think a bit more
on that.

        Lgb

Reply via email to