3 ms·
I really wonder how this 10KLines is handled by the network subsystem. Is it compiled into a big regexp ? or another form of compacted runnable logic ? or at wh
by agumonkey 12y ago
I really wonder how this 10KLines is handled by the network subsystem. Is it compiled into a big regexp ? or another form of compacted runnable logic ? or at which point does it slow local name lookup.
- jacquesm 12y agoAt a guess, by doing a match first on a substring using a hashtable. That way if something is a 'candidate' you can hit a more expensive datastructure to figure out if you really have a hit without burning a lot of cycles.
- agumonkey 12y agoThis kind of long blacklists seems so fitting for Tries. I should grep *nix kernels (I wish I had windows >Xp source too) I guess. Linux (well, glibc, from http://unix.stackexchange.com/questions/81979/how-does-etc-hosts-match-work http://unix.stackexchange.com/questions/81979/how-does-etc-h...): http://repo.or.cz/w/glibc.git/blob/HEAD:/nss/nss_files/files-hosts.c http://repo.or.cz/w/glibc.git/blob/HEAD:/nss/nss_files/files... Windows : #tbd