Open philnik777 opened 1 year ago
Just curious, since I am new to the codebase, can you give me the links to the files where the optimizations are done for the vector of other types?
In general, there aren't special optimizations for other types. If there are any optimizations, they are there because the vector iterator models a contiguous iterator. e.g. std::find(vec.begin(), vec.end(), 23)
(assuming vector<int>
) would be optimized to a wmemchr
on most platforms, because that is optimized for contiguous iterators. That kind of optimization would be done in libcxx/include/__algorithm/find.h
and friends.
Currently we are missing a lot of
vector<bool>
optimizations, because we are overloading the public interface instead of a private one.