Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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.


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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2020-02-22 10:40 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (99 votes). Check out past polls.