From nobody Mon Nov 28 09:21:50 2022 X-Original-To: freebsd-arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NLKjl3rpKz4jdg7 for ; Mon, 28 Nov 2022 09:22:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4NLKjj0Xd8z4d2h for ; Mon, 28 Nov 2022 09:22:00 +0000 (UTC) (envelope-from hps@selasky.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org; dmarc=none Received: from [10.36.2.69] (unknown [84.210.222.10]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 549A126019B; Mon, 28 Nov 2022 10:21:53 +0100 (CET) Message-ID: Date: Mon, 28 Nov 2022 10:21:50 +0100 List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [RFC] Proposal adding new sorting algorithm, bsort() to libc From: Hans Petter Selasky To: Robert Clausecker , "freebsd-arch@freebsd.org" References: <1e609631-37e2-3818-37e3-72773758ff40@selasky.org> Content-Language: en-US In-Reply-To: <1e609631-37e2-3818-37e3-72773758ff40@selasky.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.28 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.982]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-arch@freebsd.org]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[selasky.org]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4NLKjj0Xd8z4d2h X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 9/8/22 16:19, Hans Petter Selasky wrote: > On 9/8/22 15:52, Robert Clausecker wrote: >>> See: >>> https://reviews.freebsd.org/D36493 >> >> Looks interesting!  Any particular reason you add a new function to the >> libc instead of just replacing qsort(3) with the new algorithm? >> >> Yours, >> Robert Clausecker >> > > Hi, > > It's a good question. My plan was first to establish the concept about > bsort() and then at some point remove qsort() and make those qsort() > functions symbol aliases for bsort(). > > There are several write-ups about "trying to fix qsort()". Here is a > link for one of them: > > https://www.raygard.net/2022/02/27/Re-engineering-a-qsort-part-4/ > > The question is, if there is a fix for qsort() in FreeBSD, will there be > a fix in other operating systems too? That's one argument for giving > bitonic sort an own name. > > --HPS > Update - interested parties - please have a look! https://reviews.freebsd.org/D36493 --HPS