The gcc
implementation of the standard library implements find_if
using loop unrolling for RA iterators, and other search functions (search
, none_of
, find
, etc) are implemented by calling find_if
to reuse that optimization if it applies.
However, why is find_if
the only function optimized that way, and not, for instance, std::for_each
?