Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: SortedMap question? Date: Sun, 25 Nov 2012 14:44:48 -0500 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: <50b26f67$0$295$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 25 Nov 2012 19:44:51 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="ffb8f7085759b339c1002252b48331a4"; logging-data="24293"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192uIz1yIK9KoxdqfRu9NhL" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <50b26f67$0$295$14726298@news.sunsite.dk> Cancel-Lock: sha1:e9lAm7bGUZaDM3B1cKW2egspV0Q= Xref: csiph.com comp.lang.java.programmer:19953 On 11/25/2012 2:20 PM, Arne Vajhøj wrote: > On 11/25/2012 9:02 AM, Eric Sosman wrote: >> Finally, O() itself hides a lot of detail -- that is, after all, >> its purpose. Given the choice between O(N*N) Algorithm X and O(1) >> Algorithm Y, which would you choose? Might you change your mind >> if you learned that X takes N*N nanoseconds while Y takes a constant >> eighteen hours? Might you change your mind yet again if you learned >> that N was ten million? O() alone is not enough to decide a question >> of speed. > > Obviously true. > > But I would consider it very rare that a worse big-O > algorithm/data-structure is faster in a case where it has > a measurable impact on overall performance. That's why Quicksort implementations never use an O(N*N) InsertionSort for small subfiles. Oh -- Hey, wait ... -- Eric Sosman esosman@comcast-dot-net.invalid