Efficient way to select a range of data between 2 values?

Gene Tani gene.tani@REDACTED
Tue Sep 1 10:07:37 CEST 2009



On Aug 31, 9:25 am, Alexander Uvarov <alexander.uva...@REDACTED>
wrote:
> I have ~100K ip2country records like {ip_address_map, {range_from,  
> range_to, country_code}} and I am searching for fastest way to lookup  
> country_code. There should be matching guard like range_from =< IP >=  
> range_to. Any ideas, guys? I am not satisfied with ets (lookup time  
> from 0.06s up to 1.6s).

There's another option, this project in Google code (B Ippolito)

http://code.google.com/p/egeoip/


More information about the erlang-questions mailing list