1 .. title:: clang-tidy - performance-inefficient-algorithm
3 performance-inefficient-algorithm
4 =================================
7 Warns on inefficient use of STL algorithms on associative containers.
9 Associative containers implement some of the algorithms as methods which
10 should be preferred to the algorithms in the algorithm header. The methods
11 can take advantage of the order of the elements.
16 auto it = std::find(s.begin(), s.end(), 43);
25 auto c = std::count(s.begin(), s.end(), 43);