Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Isn't that beauty ? (no it's not)
Date: Mon, 06 Apr 2026 13:23:02 -0700
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <86cy0bzvmh.fsf@linuxsc.com>
References: <10otm7r$1ntrg$1@raubtier-asyl.eternal-september.org> <10p3jgn$80c7$1@dont-email.me> <10p9q0h$2a77o$1@dont-email.me> <10pa02q$2d5us$1@dont-email.me> <10pa4eg$2dtli$5@dont-email.me> <10pa78l$2fjaa$1@dont-email.me> <10palrv$2jpeu$2@dont-email.me> <10pbf0q$2rtq3$1@dont-email.me> <10pbg8f$2spms$2@dont-email.me> <10pbhud$2tbk0$2@dont-email.me> <10pcvr2$3ednq$2@dont-email.me> <20260318112151.000021dc@yahoo.com> <10pdsfp$3n1pk$1@dont-email.me> <10pef9p$3u9sh$1@dont-email.me> <10pf4uj$375m9$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Mon, 06 Apr 2026 20:23:05 +0000 (UTC)
Injection-Info: dont-email.me; posting-host="d9fa7580ab63f06b181c1510d363a99a"; logging-data="2499914"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Vd3hS3Fh7yLrhYobIC0+fJ8BvkMx1LyQ="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:okKyFJJsHnPacg1hxSRjb0l7YHk= sha1:BuAWwlEodlDYi4awmfxtmSlxhKg=
Xref: csiph.com comp.lang.c:397390
antispam@fricas.org (Waldek Hebisch) writes:
[...]
> Heapsort is only marginaly more complex than bubble sort [...]
I think this claim is ridiculous. Code for heapsort is more than
twice as long as code for bubble sort, and is both harder to write
and harder to understand. Heapsort really needs two functions
rather than one. All of the simple sorts (bubble sort, selection
sort, insertion sort, merge sort) are IME easily coded without
needing any significant thought. Not so for heapsort. Even
quicksort, which isn't trivial, is easier than heapsort.
> On average heapsort is not as fast as quicksort (main factor seem
> to by much worse cache behaviour),
More to say on that matter; saving for another reply and hoping to
get to that soon.