News for hackers. Stuff that matters.
Re:Learn Big-O and stop hacking your way through algorithms by qppo on Thursday August 20, 2020 @06:55PM (#24229977)
I have the opposite opinion, people focus on Big O too much. Designing for Big O is like designing for scale. For some reason we can recognize that building a system for a billion users doesn't make sense when you have a thousand... meanwhile we're out writing code with std::unordered_map instead of std::vector with fewer than a hundred elements in the table.

We need to make a bigger fuss out of the "C" in Big O, teach people how to use a profiler, and teach more about memory layout and how computers actually function - time complexity isn't time of execution. But too many people treat it like that.

Re:Learn Big-O and stop hacking your way through algorithms by cmckn on Thursday August 20, 2020 @07:20PM (#24230169)
Deciding if your code is a bottleneck is definitely important in deciding how much to worry about asymptotic behavior. But in a lot of cases, it's no more complicated to use a set instead of a list, for example. Totally agree though that benchmarking/profiling is the ultimate decider of what is fast.
Re:Learn Big-O and stop hacking your way through algorithms by qppo on Thursday August 20, 2020 @07:32PM (#24230267)
Sorry if I was unclear, the point I wanted to make was that asymptotic behavior is not something you need to worry about because it's unlikely your program will behave asymptotically.