Hacker News
points by sltkr 3 hours ago | 0 comments
> For the uninformed: counting backwards in a for loop is faster because comparing an unsigned integer against 0 is generally faster than comparing it against any other value.

No it's not. It generally makes no difference at all.

If you disagree, I dare you to write a benchmark that demonstrates a difference between forward and backward iteration on a modern CPU.

Aún no hay comentarios.