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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,385be4c68a9e4de6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-02 10:00:29 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: achrist@easystreet.com Newsgroups: comp.lang.ada Subject: Re: Smart sorting algorithm ? Date: Tue, 02 Jul 2002 10:00:21 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <3D21DC25.AD402F70@easystreet.com> X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 References: <3D21D581.6EF6CB06@despammed.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:26809 Date: 2002-07-02T10:00:21-07:00 List-Id: Wes Groleau wrote: > > The reason I'm asking is that I have a situation > where deciding the order of two items is very slow. > > If the program determines that A < B and later > determines that B < C and stores this information, > then if and when A ? C comes up, it can determine > the answer from the stored information. > Using, e.g., qsort, isn't it true that this should not happen? If you've compared A vs B and B vs C, then B is the pivot, and A and C are on opposite sides of the pivot and won't get compared. Al