
2 May
2005
2 May
'05
9:05 p.m.
"Eric Niebler" <eric@boost-consulting.com> writes:
Stefan Strasser wrote:
Eric Niebler schrieb:
Even when writing loops by hand, it's a good idea to save the result of .end() in a local to avoid repeated function calls that are not necessary. It's called "hoisting". It's one of the side-benefits of using FOREACH and std:: algorithms.
I think it's not worth it here. besides that it isn't a performance overhead on most containers you don't expect that from a keyword.
Huh, *I* would expect that from a keyword.
Me too. Furthermore, I wouldn't use this library unless it did hoisting. -- Dave Abrahams Boost Consulting www.boost-consulting.com