Once I noticed the handful of errors in Bug 128578, I did some more searching and turned up a few more. Per http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2049.pdf, the ranged iterator syntax: for( type-specifier-seq simple-declarator : expression ) statement is syntactically equivalent to typedef decltype(expression) C; auto&& rng(expression); for (auto begin(std::For<C>::begin(rng)), end(std::For<C>::end(rng)); begin != end; ++ begin) { type-specifier-seq simple-declarator(∗begin); statement } The issue here is that the type of auto (instead of 'auto&' or 'const auto&') causes us to make a copy of each element as we pass through the loop. When the container is just a set of pointers, it's not much of an issue. But when we have iterate over reference-counted types, strings, or other larger objects we incur unnecessary costs.
Created attachment 223932 [details] Patch
Committed r163959: <http://trac.webkit.org/changeset/163959>