Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

RE: Sorting a list of IP addresses (aka Why I hate Big O)

by Maqs (Deacon)
on Aug 03, 2000 at 22:01 UTC ( #26039=note: print w/replies, xml ) Need Help??


in reply to Sorting a list of IP addresses (aka Why I hate Big O)

I'd try another solution :)
why not to read all IP adresses, convert them to binary,
for each part do:
join "", unpack "B8", pack "I" , $value;

, getting rid of '.' (couse now they play no role)
write these adresses to a txt file and then sort them execing external 'sort'?
Then convert them back to decimal , '.'-separated.. and voi la...
I havent tested that, but it seems to me it'll be quicker.

/Maqs.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://26039]
help
Chatterbox?
[Corion]: Meh... Github (understandably) doesn't allow files larger than 100MB, but my rebase of an older repo (from Github) includes such a file and now I can't push my changes there
[Corion]: Maybe that is the push I need to finally try out Gitprep ;)
[Corion]: On the upside, I should finally improve Image::CCV to also do ImageNet classification using their pretrained parameters
[Lady_Aleena]: Hello Corion.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-09-24 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (274 votes). Check out past polls.

    Notices?