See my other mail on the list about exactly this problem. The set
is not
the right containter, but vector isn't either... Let's wait for some
conclusion before optimising for the trash here.
Well, add 'no additional includes if they are not absolutely needed'
to
your set of requirements then.
What's the amount of data we are talking about? Is a sorted vector
really off limits?
Well, it is supposed to be a list of all the words in the buffer which
are longer than a certain length. If you have a big text and a good
vocabulary (and a language like German where every second word has >8
characters or so)... Don't know really, but let's say we have 200
strings there. Everytime you finish a (long) word with a non-letter,
it should be put into the words array, in a sorted way.
Ok, copying 200 or also 2000 strings might be not so much. But if you
parse a paragraph with many words this grows linear in the paragraph
size.
Stefan