Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
sc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

IP to Country Code Converter

Performance

500 Million IPs to Country per seconds (All IPv4 ranges in 7.8 seconds)

% time python gen.py; time make; time ./a.out
ranges 190000 and file written
python gen.py  0.59s user 0.05s system 97% cpu 0.649 total
clang -Wall -Wextra -O3 -std=c99 -Ofast -fPIC  sc/dict_int_chr.c ./*.c -o ./a.out
make  1.21s user 0.27s system 90% cpu 1.633 total
calloc/init/memset time: 13.365ms
benchmark time: 7844.078ms
destroy time: 1.383ms
./a.out  7.84s user 0.02s system 99% cpu 7.903 total

Requirements

To Generate

To Compile

node addon install

npm install kuni

Usage

var kuni = require('kuni');
kuni.lookup(0x12345678);

About

Very fast IP to Country Code Converter

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.