Live data from Hacker News

Untitled topic

news.ycombinator.com

1–9 of 9 posts

Re: undefined

#3
Just a reminder - seeking the lowest O doesn't always improve performance. Sometimes the startup cost for a lower O algorithm is too much.

Re: undefined

#4
post #3

Just a reminder - seeking the lowest O doesn't always improve performance. Sometimes the startup cost for a lower O algorithm is too much.

See Galactic Algorithms for examples!

Re: undefined

#5
Better to tune this out even if you're a beginner. You normally don't say "The big O of the algorithm is ..." because it's ambiguous whether you are talking about time complexity or space complexity. Also, when someone says O(n), then n has to refer to something, normally the input size. The text area doesn't even have you define your input, and will say things like

for (i =0; iis O(N), without even knowing what x is (could be a constant).

Re: undefined

#6
This hardly works at all so I am skeptical of the benefits it offers learners. Even using just for loops it gets tripped up and says the following code is O(n) when it isn't.

  for (int i = 0; i 

Re: undefined

#8
post #3

Just a reminder - seeking the lowest O doesn't always improve performance. Sometimes the startup cost for a lower O algorithm is too much.

Also, in many cases, implementation details like cache locality mean that asymptotically inferior algorithms can in practice outperform those with a lower theoretical runtime complexity.