Comment

Comment by layer8

The problem isn’t counting the files (the algorithm in the article also counts the files), but that if you determine that you want to use the ith file only after counting all files, you have to iterate over the whole directory again (or over expected half of it) to find that file.
parent layer8 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton