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
{{ message }}
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
This test/benchmark program is not working on Windows due to several things:
Hard-coded paths like /usr/local/share/GeoIP/GeoIP.dat.
IMHO, a macro using SRCDIRshould be used here.
Or better, a path based on GetModuleFileName() + ../data.
MSVC does not have <sys/time.h>.
The elapsed time calculation seems broken:
double timerstop()
{
__int64 delta; /* VC6 can't convert an unsigned int64 to to double */
GetSystemTimeAsFileTime(&timer_t2);
delta = FILETIME_TO_USEC(timer_t2) - FILETIME_TO_USEC(timer_t2);
return delta;
}
This return # of micro-seconds, not seconds as the non-Win32 version does.
Anyway, with some patching [1] of the above, I seems to get very decent results:
GeoIP Country
120000 lookups made in 2.149048 seconds
GeoIP Country with GEOIP_CHECK_CACHE
120000 lookups made in 2.118030 seconds
GeoIP Country with GEOIP_MEMORY_CACHE
1200000 lookups made in 21.132135 seconds
GeoIP Country with GEOIP_MEMORY_CACHE and GEOIP_CHECK_CACHE
1200000 lookups made in 21.096256 seconds
GeoIP Region
120000 lookups made in 0.522512 seconds
GeoIP Region with GEOIP_CHECK_CACHE
120000 lookups made in 0.522512 seconds
GeoIP Region with GEOIP_MEMORY_CACHE
1200000 lookups made in 5.223323 seconds
GeoIP Region with GEOIP_MEMORY_CACHE and GEOIP_CHECK_CACHE
1200000 lookups made in 5.212008 seconds
GeoIP Org
60000 lookups made in 0.466460 seconds
GeoIP Org with GEOIP_INDEX_CACHE
240000 lookups made in 1.853766 seconds
GeoIP Org with GEOIP_INDEX_CACHE and GEOIP_CHECK_CACHE
240000 lookups made in 1.862786 seconds
GeoIP Org with GEOIP_MEMORY_CACHE
600000 lookups made in 4.680498 seconds
GeoIP City
60000 lookups made in 1.884824 seconds
GeoIP City with GEOIP_INDEX_CACHE
240000 lookups made in 7.531220 seconds
GeoIP City with GEOIP_INDEX_CACHE and GEOIP_CHECK_CACHE
240000 lookups made in 7.524210 seconds
GeoIP City with GEOIP_MEMORY_CACHE
600000 lookups made in 18.783081 seconds
Using TDM-gcc v5.1 with -O2 -fomit-frame-pointer -ffast-math. On Intel i7, 3.5GHz, Win-10,
Can someone on non-Windows with similar hardware confirm these times?
1.6.10
* GeoIP_database_info now returns the full version string rather than
incorrectly truncating it. GitHub #79.
* This API is now distributed with a small test copy of GeoIP.dat rather than
a full copy.
* Fix issue where Visual Studio 2015 was optimizing out initialization code.
Reported and fixed by Scott Godin. GitHub #81.
* Fix test/benchmark on Windows. Gisle Vanem. GitHub #75.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This
test/benchmark
program is not working on Windows due to several things:/usr/local/share/GeoIP/GeoIP.dat
.IMHO, a macro using
SRCDIR
should be used here.Or better, a path based on
GetModuleFileName()
+../data
.<sys/time.h>
.This return # of micro-seconds, not seconds as the non-Win32 version does.
Anyway, with some patching [1] of the above, I seems to get very decent results:
Using TDM-gcc v5.1 with
-O2 -fomit-frame-pointer -ffast-math
. On Intel i7, 3.5GHz, Win-10,Can someone on non-Windows with similar hardware confirm these times?
[1] http://www.watt-32.net/misc/GeoIP-API-C-benchmark.diff
The text was updated successfully, but these errors were encountered: