Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Sort char array Date: Sun, 06 Oct 2019 12:46:18 -0700 Organization: None to speak of Lines: 20 Message-ID: References: <3mRlF.745330$vW4.322977@fx24.am4> <20191006154145.2b16eec342e56444e3583385@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="b1979d179714e1d8dd3bfb152cce8e77"; logging-data="16564"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vufvoHspcVg8G+9bLuYwu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:Xq6RWGqxteMnJdw84erCKsal6z4= sha1:7x9R+vOBGxxNiBm4kJV88uDlB5E= Xref: csiph.com comp.lang.c:146656 Anton Shepelev writes: [...] > Sound like the work for radix sort, does it not? My quick- > and-dirty implementation of it, however, loses by a factor > of ten to the standard qsort() even with gcc -O5 and extra > large arrays: [...] gcc's highest optimization level is -O3. (There are also switches for more specific optimization options.) Apparently anything above 3 is quietly treated as -O3, though as far as I can tell that's not documented. It's probably intended to allow for higher levels in future releases, but -O3 has been the maximum for a very long time. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */