Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by ferrency (Deacon)
on Aug 03, 2000 at 00:55 UTC ( #25848=note: print w/ replies, xml ) Need Help??


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

I think O() analysis definitely has its uses. It's good for determining "all else being equal, which algorithm will be faster?" It doesn't say anything about implementations. I'm pretty sure I could write a poor implementation of an O(n log n) algorithm that runs slower than a good implementation of an O(n^2) algorithm (for sufficiently small datasets. How small? Small enough so the O(n log n) implementation is slower :) But in general, the O(n log n) solution will be faster, as your data set increases in size, and as you tweak the "all else" in your implementation to get it as close to "equal" as possible.

I wasn't a huge fan of O() notation in college either, once we started analyzing the more complicated algorithms. Not because it was inaccurate, but because it was difficult, and "no one uses those algorithms anyway." However, now I'm glad I did it, because after doing all the hard analysis, the easy analysis which I do use regularly (though not explicitly) comes intuitively.

Alan


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://25848]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2014-08-30 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls