Changes between Version 16 and Version 17 of ip2c


Ignore:
Timestamp:
Oct 27, 2006, 8:54:22 PM (15 years ago)
Author:
omry
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ip2c

    v16 v17  
    1212IP2C works directly on a binary file, and does not load it into memory, so required memory is minimal.[[BR]]
    1313'''PHP:''' My tests shows that PHP code resolves an IP in 4ms. this means you can do about 250 searches in a second.[[BR]]
    14 '''Java:''' My tests show that Java code resolves an IP address in 0.0018 ms, this means you can do more than 7140 searches in a second.[[BR]]
     14'''Java:'''
     15 * No cache: 100,000 random ip searches takes 14270 ms. around 7000 searches/second.
     16 * Memory cache: 100,000 random ip searches takes 600 ms. around 160,000 searches/second.
    1517
    1618== Download ==
    17 [http://firefang.net/projects/firestats/browser/trunk/ip2c/release/ip2c-1.1.zip?format=raw ip2c 1.1]
     19[http://firefang.net/projects/firestats/browser/trunk/ip2c/release/ip2c-1.2.zip?format=raw ip2c 1.2]
    1820
    1921== Source ==
     
    4547#!java
    4648String ip = 85.64.225.159;
    47 IP2Country ip2c = new IP2Country();
     49boolean cache = true; // true will load the file into memory, using around 460k ram. (much faster)
     50IP2Country ip2c = new IP2Country(cache);
    4851Country c = ip2c.getCountry(ip);
    4952if (c == null)