Try using the hashed_non_unique instead of ordered_non_unique index implementation. This will use hashed values to access keys, and not a comparison function.
Would this really work? If i use the hashed_non_unique index, i cant use std::difference and "upper_bound" to get the count of same words, because it isnt sorted anymore? Or am i wrong?
Please take a look at:
http://www.boost.org/libs/multi_index/doc/reference/hash_indices.html#hash_i...
There is a member count (2 overloads), which can count all items with a given key or another member equal_range (2 overloads), which ruturns the pair
for begin and end of the range.
I took a look at it. Thank you very much. I never used a hashed index, but i should sometime. For now, thanks to the quick solution some posts before, i will optimize at another place. But ill come back, if needed! Thank you for your help, Bye Manu