Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!nrl-cmf!mailrus!uflorida!novavax!proxftl!bill From: bill@proxftl.UUCP (T. William Wells) Newsgroups: comp.lang.c Subject: Re: Value of microeffiency (was: Re: Optimal ...) Message-ID: <504@proxftl.UUCP> Date: 20 Jul 88 14:46:50 GMT References: <483@proxftl.UUCP> Reply-To: bill@proxftl.UUCP (T. William Wells) Organization: Proximity Technology, Ft. Lauderdale Lines: 40 Summary: Expires: Sender: Followup-To: Distribution: Keywords: I wrote: > That leads to a quandry: should I make it a qsort replacement or > not? If so, then this is not reasonable. If not, then it is > less useful. > > Then again, I could write it with variable arguments and a global > control variable that determines whether it does the allocation > or whether the caller passes allocated memory. > > And that requires conditional compilation for those > who do not want to pull in malloc. > > Ugh! > > Sigh. Braindead programmer! Don't you know better than to make such idiot statements in public! Go back to your kennel! :-) Sorry folks. If I used drugs (other than caffeine), I'd be wondering what I was on when I wrote that. Several of you corrected me for this idiocy; thanks for the input. To set the record straight, what I am going to do is to recode my linked-list sort and my qsort as something that will be appropriate for placing in a library and which will not embarrass me unduly. (It was, after all, several years ago that I wrote it; I'd like to think that I can do a better job today.) I'll be posting three routines and a program. The three routines will be twwsort, a linked-list sort wherein you provide the memory; msort, a linked-list sort with an interface identical to qsort; and qsort, my version of qsort. The program will be a test program for it. This is likely to take several weeks, so don't hold your breath. I have not received any response to whether I ought to post it over here for comment, comparison, and benchmarking, before sending it to the appropriate source group. So ought I or not? E-mail is fine for responses pro or con.