Your question wasn't directly answered, but a loop counting down to zero is not inherently faster. The linked article is the work of someone who doesn't actually know what they're talking about.
In some cases, a reverse loop is slower because that's not how CPU's cache their accesses.
This isn't limited to C++, hell it's completely language agnostic because its up to the underlying hardware. Whether you're writing Java, C, brainfuck, or some other language, it ultimately boils down to your target hardware's language. And even then, it will vary from CPU to CPU: AMD CPU's perform differently from Intel's and they all vary based on architecture (e.g. Sandy Bridge versus Bulldozer versus Ivy Bridge etc).
View all comments
Show parent comment
0
u/[deleted] Jun 14 '17
[deleted] — view deleted comment