View Single Post
Old Dec 21st, 2007, 12:08 PM   #7
mbd
Programmer
 
Join Date: Nov 2007
Posts: 86
Rep Power: 1 mbd is on a distinguished road
Re: Count number of occourences of a IP address in a log file.

it is a delicate balance between whos time is more valuable. this is not a great example of it seeing that your solution would be rather simple to implement also, but:

my time * my salaray > (my cpu's time ^ 2) * my cpu's salaray

i wager that my algorithm could count a 1MB file in less than ten minutes under the worst case of no ip address duplicates.
mbd is offline   Reply With Quote