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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: Al Christians Subject: Re: Ada vs C++ vs Java Date: 1999/02/08 Message-ID: <36BF2560.46E39E21@easystreet.com>#1/1 X-Deja-AN: 442010611 Content-Transfer-Encoding: 7bit References: <369C1F31.AE5AF7EF@concentric.net> <369DDDC3.FDE09999@sea.ericsson.se> <369e309a.32671759@news.demon.co.uk> <77ledn$eu7$1@remarQ.com> <77pnqc$cgi$1@newnews.global.net.uk> <8p64spq5lo5.fsf@Eng.Sun.COM> <77t3ld$nou$1@nnrp1.dejanews.com> <79ce4s$lfq$1@nnrp1.dejanews.com> <79chc7$ko6@drn.newsguy.com> <79dodb$rhf$1@nnrp1.dejanews.com> <79fm3e$ffs$1@nnrp1.dejanews.com> <79fnce$iv8@drn.newsguy.com> <79grbs$d5u$1@nnrp1.dejanews.com> <79hujb$ck3@drn.newsguy.com> <79mvba$2qi$1@nnrp1.dejanews.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: news14.ispnews.com 918495918 206.102.3.13 (Mon, 08 Feb 1999 12:45:18 EDT) Organization: Trillium Resources Corporation MIME-Version: 1.0 NNTP-Posting-Date: Mon, 08 Feb 1999 12:45:18 EDT Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-02-08T00:00:00+00:00 List-Id: dennison@telepath.com wrote: > > > No. The choice of sort algorithm I want to use is highly dependent on my > problem space. Some algorithms are better on nearly sorted data, some are > better on completely scrambled data. Some are great for huge amounts of input > items, but are not so hot for small amounts of input items. > There exists one > algorithm that is superior to all others when the items to be sorted are all > integers. Then there's the static vs. dynamic (array vs. pointers) issue... > > I don't see how a compiler vender is going to have any better clue which one I > need than a language standard writer would. The only person really capable of > making the decision is the developer in question. > But there are so many common cases where any reasonable algorithm is perfectly ok, ie when you've got a modern computer and a second or two to sort some number of items less than 100,000 or so. It doesn't matter worth 2 cents which one gets used 99% of the time. Except for the rare application that has to do an extremely large number of sorts in a brief interval, the 'not so hot for small amounts of input items' criticism is irrelevant, because it means not so hot in relation to a totally negligible cost of sorting a small amount of data. Your logic, if correct, would also apply to many of the algorithms in the standard libraries, for example Ada.Strings.Fixed.Index. We've got a choice of algorithms there, Knuth-Morris-Pratt, Karp-Rabin, Quick Search, Boyer-Moore, etc. None is best in all cases. I don't know which one the library uses, and I don't care. Whatever one it uses works well enough, and, I doubt that any of the others would be enough better in any of my applications that anyone would notice any difference at all. When I have an application in which it matters, I'll find out and write my own if I need to. But that's not something that everyone wants to worry about, ever. Some week or two ago, in the discussion of Modula-2 that somehow spilled into comp.lang.ada, a comment was repeated about the ISO library spec for M2 being bad enough to demise the language. If a bad library spec can kill a language, maybe a good one could help one at least a little. Al