Hacker News new | ask | show | jobs
by Arcten 1912 days ago
Iterating via reference instead of copy in C++ is a great way to get a speed up with a one character change.

I.e. changing for (const MyType v : collection) to for (const MyType& v : collection)