From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8e7ac81a215f128c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Using Red-Black Trees Date: Tue, 16 Nov 2010 13:51:45 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <2419e829-6f45-4075-9005-b9876beb8aaa@r6g2000vbf.googlegroups.com> <46306fd9-21dc-40df-88e7-fc7e568399a4@k11g2000vbf.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1289937111 10295 69.95.181.76 (16 Nov 2010 19:51:51 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 16 Nov 2010 19:51:51 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Xref: g2news2.google.com comp.lang.ada:16493 Date: 2010-11-16T13:51:45-06:00 List-Id: "Alex Mentis" wrote in message news:ibueau$aac$1@news.eternal-september.org... ... > In the case of the OP, he wanted a specific data structure (rb tree). Unless you are a student, worrying about a specific data structure is silly in 99% of the cases. What you care about is that you use a data structure which has sufficient performance for your app. One presumes that implementations will provide high-performance implementations, tuned to the specific target. Programming to the standard containers is the easiest first step. In the rare case where the performance isn't sufficient, then a custom data structure will be needed -- but it is almost certain that you'll need to program that structure yourself (because you'll want to squeeze out any overhead from features that you don't need). > Since the ARM doesn't specify exactly how a container must be > implemented, he could go sleuthing through the library code like this > to find out, and in this case he would be lucky enough to determine > that there is, in fact, a container using rb trees, so hooray! Or he could just use the standard containers, and find out that in fact the performance is good enough for his application, so hooray, he doesn't need to worry about it further. I don't know what data structures this newsreader and browser use, but they're good enough for the application, so why should I care?? Same goes for the standard containers. Randy.