std::string::find vs std::find
I have a large number of elements to be stored into vector or basic string(delimited by \n). I need to search for an element and I would like to know what is faster:
std::string str = "\nElement1\nElement2...element1000\n"
I'm only interested in search time, I don't need to access any of the elements for reading, modifying or removing.
v.push_back("Element1"); v.push_back("Element2"); ....
std::find(v.begin(), v.end(), "Element3") != v.end() )
Thanks a lot,