Skip to content

Instantly share code, notes, and snippets.



Created Apr 7, 2010
What would you like to do?
require "geoip_city"
require "geoip"
require "benchmark"
db = '/usr/local/share/GeoIP/GeoIPCity.dat'
ip = ''
geoip_c =
geoip_city =
ITER = 100_000
Benchmark.bmbm do |x|"geoip-c") { ITER.times { geoip_c.look_up(ip) } }"geoip_city") { ITER.times { geoip_city.look_up(ip) } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.