Simple and efficient.
by Raymond Chen
From the article:
The versions of the std::equal function that takes a binary predicate accepts the predicate by value, which means that if you are using a functor, it will be copied, which may be unnecessary or unwanted.
In my case, the functor had a lot of state, and I didn’t want to copy it....