I am writing an application which uses a vector to store quite a few elements; as the program goes on, the vector will come to store, let's say 10,000+ items. I will essentially call to search through this vector within a while loop that will be running during the entire length of the execution.
What kind of overhead would this create? Would it be noticeable? I am not all too familiar with the way RAM works during program execution, and so I need to know whether I should pursue this method, or change it up a bit.
The complexcity of the linear searching is O( n ) where n - is the size of your vector.
You can use map instead of vector. In this case the complexity of searching will be O( log( size ) ).