[clug] Looking for string indexing library

Richard richard_c at tpg.com.au
Mon May 24 11:29:34 GMT 2004


Jepri wrote:

> I've got a list of city names (approx 3 million) and I need to write 
> some C code to search through them all quickly.
>
> I'm accessing them by by packing them all into a file (with null 
> termination), and then mmaping the file.
>
> So the string indexing library would have to accept pointers to the 
> strings, not copy them into some internal store, be able to do 
> substring lookups, and ideally be able to return a key or index value 
> for the string it finds.  Even better would be if it could save its 
> index and hot-start from that.


Not that this is really news to you, but I'd be doing this in Perl... :P

Richard

P.S.: Sorry if this comes in HTML, I'm still taking my new client 
(Thunderbird).


More information about the linux mailing list