Question: are range based for loops faster?
Answer: Range-for is as fast as possible since it caches the end iterator[citation provided], uses pre-increment and only dereferences the iterator once. Then, yes, range-for may be slightly faster, since it's also easier to write there's no reason not to use it (when appropriate).