6 ms·
I did Big O Notation in college and I still can't remember which notation is faster/slower. After college/university you begin to forget a lot of the specific
by benbristow 7y ago
I did Big O Notation in college and I still can't remember which notation is faster/slower.
After college/university you begin to forget a lot of the specific textbook stuff and begin to replace it with the put-food-on-your-table practical stuff.
- jedberg 7y agoAbsolutely. But Big O still comes up in practical stuff depending on what you're doing. You can usually get by without it, but sometimes when you need to process a few 100 terabytes of log files, having a basic grasp on Big O comes in handy for reducing your processing time from days to hours by picking the right algorithm.
- RussianCow 7y agoI think the point the parent was trying to make is that the concept is way more important than the specific notation. Someone that doesn't know Big O could still tell you why one algorithm would be better, it just might be slightly less succinct: "The execution time of algorithm A scales up with the number of items, while algoritm B's is constant." vs "The execution time of algorithm A is O(n), while algorithm B's is O(1)."
- taqwerty 7y agoIn practice I've always found avoiding premature optimization and then profiling better than worrying about Big O.
- learc83 7y agoYou save an awful lot of time when you know have an idea of what's going to be slow up front. I've spent so much time trying to chase down bugs caused by junior programmers because something that worked fine with 100 rows in db, slows to a crawl when we move a feature out of beta and we suddenly have 1000 rows. If they had some idea that the query they were writing was O(n^3) they could have done a quick estimate and saved us all the trouble.
- Pete-Codes 7y agoAs someone without a CS this is reassuring.
- aliceryhl 7y agoI really recommend trying to learn just the basics about big-O, because it is really the single most important thing that a CS degree teaches you.
- tylerl 7y agoYeah, I agree. You can learn it in like 30 minutes, and understanding the concept behind it (not just the notation) is the core of understanding why some algorithms work better than others.
- gscott 7y agoIndustry specific certifications can help ease the way into the job market along with a portfolio of (side) projects.
- mav3rick 7y agoThis is not something to "remember". If you don't know this, you don't understand it.
- voxl 7y agoI don't think so, I think this is one of the easiest things to forget. Even in school, Big-O is used almost exclusively, very rarely do you see Big-Omega, Big-Theta, Little-O, etc. Even though in algorithmic analysis these are all used to give a more accurate characterization of the algorithms behavior. Its funny, too, because the professionals (that are admittedly very smart) that like to talk down about Big-O as if it was a waste of time, seem to not realize there is a whole taxonomy of tools for analyzing and characterizing algorithmic complexity...
- deleted 7y ago[deleted]
- mav3rick 7y agoAgain you don't need to remember or forget this. Big O is worst case , theta is always guaranteed bound, Omega is minimum bound. My point is call them whatever, just know the concept to help you make design decisions.
- LorenPechtel 7y agoThis is something you need to know! What approach you use most definitely needs to keep in mind it's runtime. O(n^2) must be looked at with a skeptical eye and you better be sure there's no better answer when going higher. (I've hit O(n^8) in production code in a data verification routine and O(2^n) in a side project--the latter had to be scrapped in favor of an O(n^2) that wasn't guaranteed to find the best answer.)