News for hackers. Stuff that matters.
Re:Show HN: PageFish search algorithm by nine_k on Tuesday July 17, 2018 @09:50AM (#17549704)
Making a longer hash than 2 bytes would help selectivity, and filesystems are usually very good at finding files by name.

Also, apparently the files are not sorted by name (or I failed to see it). Searching in a sorted file using binary search is logarithmic, much faster than grepping which is linear.

Sorting can be done once, when the files are formed. BTW inserting into a sorted file should also be pretty fast (cheaper than appending and re-sorting).

Re:Show HN: PageFish search algorithm by peterburkimsher on Tuesday July 17, 2018 @10:08AM (#17549814)
The data is in the order it came in from OSMNames.

http://osmnames.org/download/

When there's two elements with the same name (e.g. Geneva), the first result is the most common (the city I was born, not the town in the US).