is controlling size() 2nd countenance make always bad?


in following instance should i design values.size() called each around loop? box competence clarity broach surrogate vectorsize variable. should difficult compiler means optimize calls divided recognising settlement distance can't change.



double sumvector(const std::vector<double>& values) {
double sum = 0.0;
(size_t ii = 0; ii < values.size(); ++ii) {
sum += values.at(ii);
}
}


note i don't caring there some-more fit methods sum essence vector, doubt only size() construct.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?