From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12F0070836 for ; Wed, 5 Aug 2026 00:35:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785890160; cv=none; b=jyEQsJBDmpwi7t5wCmEkWsfnw9xgBzItCIc5+kKVIqC34WictIM2oB7Mb1/CcQFVZimzv6YHjRg44tOraXVodeK9ryfKguYFG1xB0Rah9pmiVIOPFBBLudK2mX+AmfneahuiYQO62Pw7G3a22Qd5hvWxLNsafYgMot24GbA9WxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785890160; c=relaxed/simple; bh=Ic/rreh7MvaCkDD41sdPRxMa7Ulqnz30bORj4avDdZg=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=bwD+hPyH7bHzkCyIbihFzfUzYcpswo6mAl1fJZBG13/VmqLKCfp7IMHdM6VMh/uADsm3Dsi6F8gjj6QyVQNttQHcOdYmh8ipceC2VRzFmz/guoa1YHNtKQTnNyelZZL7/Ta03Y9SYkGwcJ4Y6er3FEBqYmUoJ9W1aIBTSEAkHns= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=wUmZQkAs; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="wUmZQkAs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33AD31F000E9; Wed, 5 Aug 2026 00:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1785890158; bh=0d2scoTHvBJ/Cm5boUy9DRs+y0lV3OR7GwBXf73ZJ2s=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=wUmZQkAsJfrrtpBPXCHmAnn8eLF3VyBpyGO2CJkuFxuYu1JTN7BZiunxKebh+A2JO 3aqZWlnfhFuVpYbCVpW2Yib2cT63IorwzseUVuTCy1F5B6/uzIu0lJtQbWRJJaXxTN 6S+8GlDdCuKFay+QpDqMUkbQkr/RqtpdN2tjZUSw= Date: Tue, 4 Aug 2026 17:35:57 -0700 From: Andrew Morton To: Peter Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] lib: add statsort(), a distribution/bucket sort Message-Id: <20260804173557.782c7ed2242a19ca831c62f1@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 4 Aug 2026 17:15:36 -0700 Peter wrote: > because it's much faster than current alternatives and linux kernel will > need it in future. don't forget the unknown is much larger than known. > > FYI - this alg is even faster than C++ Boost library: > https://github.com/drpt78stu2/fspclib OK, thanks. Some measurements which help us understand the performance difference would be useful. I'm not aware of any kernel code which spends significant time sorting things(?), so the motivation here won't be high. The existing sort() has a little self-test in lib/tests/test_sort.c.