The more context you can give a function, the better the chances that it can do something useful with the information. In particular, when you call a single function and pass it a pair of iterators
first and
last that delimit a range, it can perform optimizations based on knowing the number of objects that are going to be added, which it obtains by computing
The same applies to "repeat
n times" operations, such as the
vector constructor that takes a repeat count and a value.