logoalt Hacker News

ameliustoday at 2:49 PM4 repliesview on HN

I never hear anyone talk about big-O notation anymore ...

Nowadays it's all about optimizing the same old algorithms but on a GPU.


Replies

aidenn0today at 3:40 PM

1. For the most common things people will write, we have a plethora of asymptotically optimal choices that have been discovered.

2. Consider any algorithm of roughly linear complexity (this probably applies to N lg N as well): the only way to make it significantly faster now is to improve parallelism (whether making it so the CPU can exploit ILP, running multicore, or running on a GPU). In 1992, you could make things run significantly faster by just waiting until it was 1994.

show 1 reply
bunderbundertoday at 3:26 PM

I still think about it sometimes, but I don’t think it matters nearly as much nowadays as it did back in the day. Oftentimes I’m working in situations where the all the complicating factors that big O explicitly excludes matter much more now than they used to. Partially because they’re relatively larger (e.g., cost of memory access) and partially because they’ve become variable in a way that they weren’t 30+ years ago (e.g., the cost of a conditional branch instruction).

Also to some extent it’s just that we’ve pretty well standardized on algorithm implementations. Thinking about the relative merits of a BST vs a red-black tree vs a hash table with bucketing or open addressing or whatever just doesn’t happen as often when the standard library has one implementation and not choosing it would cost you a week of implementing testing and justifying the decision to your colleagues.

hectdevtoday at 2:54 PM

It is fun when debugging slow code and you see a for loop in a for loop. Feels rewarding to sort that out.

jayd16today at 3:47 PM

Big O doesn't capture parallelism well enough and that's really been the push since Moore's Law started to hit diminishing returns on single threaded perf.