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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,385be4c68a9e4de6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-08 15:24:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!bos-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3D2A0A25.52A62B7C@despammed.com> From: Wes Groleau Reply-To: wesgroleau@despammed.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Smart sorting algorithm ? References: <3D21D581.6EF6CB06@despammed.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 08 Jul 2002 16:54:45 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: bos-service2.ext.raytheon.com 1026165316 151.168.144.162 (Mon, 08 Jul 2002 17:55:16 EDT) NNTP-Posting-Date: Mon, 08 Jul 2002 17:55:16 EDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:26953 Date: 2002-07-08T16:54:45-05:00 List-Id: > Anyone know anything about a sorting algorithm > that includes the ability to infer the answer > to a comparison from comparisons already done? I solved this part. Wrote an "<" that first checks a 2D lookup table. If the answer is "unknown" it does the comparison, then updates as many cells in the table as possible. Once you compare A & B, you may be able to determine (and record) the order of A,C based on B,C or vice versa. > The reason I'm asking is that I have a situation > where deciding the order of two items is very slow. Since the actual comparison was the bottleneck, the choice of sorting algorithms doesn't matter any more. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau