Boost logo

Boost :

From: Péter Szilágyi (peterke_at_[hidden])
Date: 2007-05-22 15:37:43


>
> VC++ is not a compiler. At the very least, this needs a version, after all
> there are ages between VC6 and VC8 and both are still in use!

Yes... that's why I wrote 2005 in parenthesis.

Sorry, can't help with that. If you dearly need TR1's unordered containers,
> you could license a TR1 implementation from Dinkumware though.

Not really the answer I was looking for.

Other than that, what exactly is it that you want to achieve? Knowing that
> could help giving better advise...
>

Actually what I need is a container to associate an ID with an object and to
enable very fast lookups to see if the item I'm looking for does already
exist (has an ID) or not.

My current implementation uses the STL map, but as far as I know, a hash map
would be a far better choice for consequent lookups and as my object
(currently 4-tuple unsigned int) count in the map could potentially reach
one to two million. Here speed is everything.

STLPort has unordered_* containers. I'm not sure how they are
> compliant with TR1, but since initially SGI's hash containers were
> close to it, I'd expect this implementation to be good.

I don't really want to add additional libraries, that aren't needed. I'd
rather solve it with the already available tools.

Here's a sketch of how this
> might be done - although, completely untested, as I'm using Linux at the
> moment.

Thx for the example and the explanation, I'll try it out.

Peter


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk