7 ms·
TL:DR: O(2n^2) complexity is better than O(5000n) for small n. I believe the above to be an accurate summary.
by StavrosK 16y ago
TL:DR: O(2n^2) complexity is better than O(5000n) for small n.
I believe the above to be an accurate summary.
- JoachimSchipper 16y agoPretty much, although O() notation doesn't really work with constants.
- StavrosK 16y agoI know, but it was the most concise way I could express it.
- BrandonM 16y agoIs there a problem with just leaving off the O() altogether?
- silentbicycle 16y agoRight. Big O notation usually excludes constant factors, but here, the constant factors are the point.
- davidw 16y agoI don't see him pin any actual numbers to things. It'd be interesting to see how things work out with different sized lists and hash tables.
- StavrosK 16y agoHe doesn't, but that's the crux of his entire argument. It's not like the theory is unsound, it's just that it applies to very large n, where the constant factor is insignificant in comparison. When n is small, it's the constant factor that dominates, and that's what he's saying (albeit in too condescending a manner).
- unwind 16y ago... and using upper-case characters at the start of sentences is just silly.
- StavrosK 16y agoEh, I think that more things are matters of style than people would have one believe.
- xyzzyz 16y agohttp://groups.google.pl/group/comp.unix.questions/msg/d377ad7f4de2a210 http://groups.google.pl/group/comp.unix.questions/msg/d377ad...
- KC8ZKF 16y agoI remember Erik giving this up at some point, and using a more conventional style, but I can't find it now.
- gahahaha 16y agoHe didn't give it up, but changed Emacs/Gnus to automatically add uppercase letters as he sent it. (Trivial, because he ended sentences with a period and two spaces)
- lisper 16y agoIn all the times I have seen this topic raised (and I've seen it raised a lot) I have yet to see anyone who engages in the debate actually do the experiment to determine where the actual breakeven point is. Hint: it's less than 5000.
- StavrosK 16y agoWhy do you assume there's a constant breakeven point? It depends on the specific implementations of the things being compared.
- lisper 16y agoI don't assume anything. I actually did the experiment.
- StavrosK 16y ago...and?
- lisper 16y agoAnd its a lot less than 5000. (And you should do your own homework.)
- jimbokun 16y agoDon't you have a better use of your time than to tell everyone "Hey, I figured this thing out. But I'm not going to tell you the answer." I'm struggling to think of a non-trolling motivation that explains this behavior. This is giving me comp.lang.lisp flashbacks.
- lisper 16y agoI was hoping to motivate people to do the experiment for themselves. It's not very hard. Doesn't seem to be working though. Oh well. On Clozure Common Lisp the breakeven point for the average case is 20 items (10 for the worst case).