GeoIP Benchmarks

All benchmarks were run on an Intel Core i5 2.53 GHz machine with a SATA hard drive.

C-based APIs

All APIs built on top of libGeoIP have similar performance. These tests were done with the Geo::IP Perl libraries, which link to libGeoIP.

GeoIP Database Cache Flags Queries per Second
Country None 306,227
Country GEOIP_CHECK_CACHE 291,169
Country GEOIP_MEMORY_CACHE 7,284,470
Country GEOIP_MEMORY_CACHE and GEOIP_CHECK_CACHE 4,514,672
Region None 234,937
Region GEOIP_CHECK_CACHE 247,439
Region GEOIP_MEMORY_CACHE 5,090,656
Region GEOIP_MEMORY_CACHE and GEOIP_CHECK_CACHE 3,440,317
City None 120,475
City GEOIP_INDEX_CACHE 1,180,004
City GEOIP_MEMORY_CACHE 2,670,678
City GEOIP_INDEX_CACHE and GEOIP_CHECK_CACHE 1,008,742

Java API

GeoIP Database Cache Flags Queries per Second
Country None 32,930
Country GEOIP_MEMORY_CACHE 724,637
Region None 63,965
Region GEOIP_MEMORY_CACHE 692,840
City None 24,469
City GEOIP_MEMORY_CACHE 375,939

Pure PHP API

GeoIP Database Cache Flags Queries per Second
Country None 6,513
Country GEOIP_MEMORY_CACHE 9,382
Region None 7,900
Region GEOIP_MEMORY_CACHE 8,402
City None 5,462
City GEOIP_MEMORY_CACHE 6,399