You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using BenchmarkTools
using GeoIP
using StableRNGs
import Sockets: IPv4
db =load(zipfile ="GeoLite2-City-CSV_20210427.zip")
rng =StableRNG(2021)
smp =rand(rng, db.db.v4net, 100)
ips =map(smp) do net
IPv4(net.netaddr +1)
end
I have the following results
julia> ip = ips[1]
ip"201.186.185.1"
julia>@btimegeolocate($db, $ip)
278.274 ms (12858984 allocations:196.22 MiB)
julia>@timegeolocate.(db, ips)
16.092770 seconds (666.95 M allocations:9.939 GiB, 8.59% gc time)
I use @time because there is no need in BenchmarkTools precise measurements, 16 seconds is way too long.
The text was updated successfully, but these errors were encountered:
geolocate
is extremely slow.With the following setup
I have the following results
I use
@time
because there is no need inBenchmarkTools
precise measurements, 16 seconds is way too long.The text was updated successfully, but these errors were encountered: