Comment

Comment by bugake

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.

It also says not to use `for (i >= 0)` because any unsigned integer is >= 0, and the loop will never end.

parent bugake 1 day ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton