Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'tree': 0.05; 'developer': 0.10; 'cc:addr:python-list': 0.11; 'benefit.': 0.16; 'dwarfed': 0.16; 'freely,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'roy': 0.16; 'utterly': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'cc:addr:python.org': 0.22; 'typical': 0.24; 'cc:2**0': 0.24; 'developers': 0.25; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'cases': 0.33; 'guess': 0.33; 'table': 0.34; 'problem': 0.35; 'equal': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'wrong': 0.37; 'pick': 0.64; 'mar': 0.68; 'smith': 0.68; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=HKdQU1e/hB89y2NNFq8LIwHs1iIe5xjQlBHnOxSBC7g=; b=qukIVUCvX0Z3Vblebd+pgNrXzwqwR/vyh46MvuY9JOTlqPMAdpFQ1gKXgpQAVDWgyI IfcyC5Ih+bC6gKb8iAGWzHn62y39jDjiXPxrnjxsqteZ4txUaF7cPdb6sj1ZX7l4D1sk cvBnfSscfb+DzmXXoolqRJPxR9DLR2EC/g+FypeAeXU3FXyOtuOxH3TIZkAOci6s0yXf It1P9I+mIWE4DsCS0cuWFopTW/mcMnQBCQHn0vhLcINkpj98CooJqyNDdvE3GKYBu1rv mkBnrvv3/R7Bip2e49KDXANX+2rMdgtLrRejY34QR0MS7ZkJnfn2a/OplJThRWEE2DON w1/w== MIME-Version: 1.0 X-Received: by 10.68.201.10 with SMTP id jw10mr43616780pbc.25.1394494021749; Mon, 10 Mar 2014 16:27:01 -0700 (PDT) In-Reply-To: References: <87eh2d3x8h.fsf_-_@elektro.pacujo.net> <87eh2ctmht.fsf@elektro.pacujo.net> <87zjkz3eo3.fsf@elektro.pacujo.net> <87a9czrrax.fsf@elektro.pacujo.net> <531d3058$0$29994$c3e8da3$5496439d@news.astraweb.com> <87eh2atw6s.fsf@elektro.pacujo.net> <8761nmrnfk.fsf@elektro.pacujo.net> Date: Tue, 11 Mar 2014 10:27:01 +1100 Subject: Re: Balanced trees From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1394494024 news.xs4all.nl 2934 [2001:888:2000:d::a6]:36104 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68180 On Tue, Mar 11, 2014 at 10:24 AM, Roy Smith wrote: > As this discussion has shown, figuring out whether a hash table or a > tree is better for a given problem is non-trivial. My guess is that if > you gave 1000 typical developers both data structures and let them pick > freely, the number of cases where it really mattered and the developer > picked the right one would be approximately equal to the number of cases > where they picked the wrong one. And both would be utterly dwarfed by the cases where it doesn't matter, and everyone's paying a cost (having to choose) for no benefit. ChrisA