Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKQWQ-0007J3-Sq for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Mar 2021 18:58:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKQWP-0003af-6A for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Mar 2021 18:58:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKQWO-0003aS-Vo for pgsql-hackers@lists.postgresql.org; Thu, 11 Mar 2021 18:58:56 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKQWI-0008QA-F0 for pgsql-hackers@postgresql.org; Thu, 11 Mar 2021 18:58:55 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 89B285C00E4; Thu, 11 Mar 2021 13:58:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 11 Mar 2021 13:58:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=6xhGuVSVivm7WVayS56qMrGVWt3 efXCvoDiiCY1UdHM=; b=droW+PxzWRhYe7LPKKAtb/D5XGpLQMV2HDs0kRwpSk+ /vJhl+8Ad8VFoaQQ6YNWTK6OZ8X3ubt9/q1e8rbAM3orPsEnrgiV79F5FC/3OioJ h5AX1ercuAGjVJE6oOsjZgFlqZR9cV11rpu0GGCm1H+yUyMJY6pwe4g2tQ8A4yvB TG34zAmSxIVbS2GqZihTWKENmPVTkI82quIaH92BPu/Aibl8fhJvgPhgFrjFY9gp XdotQqt7+VLxKWPArYQq5VOt3nFvH3Ak0hw5G/WRpWuZknCB5RPKIjiMk3Fmf3l0 CatsVYvmw5WHbL0T3ZgRpFhKIpUcNBzA/2eCuaqBnTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6xhGuV SVivm7WVayS56qMrGVWt3efXCvoDiiCY1UdHM=; b=hwzTFtHT5YIL68zG6Nmdh4 6VGOqETCC0HkH+kj/2MHyw+E7uXZhBOQ61sXNhnCYEkyuHVI1Ne4uSDAKqgwyz9P BDgEPsDE2FOVzEz17HUGTFT3HFPOPIriHxwIyMZ+V9tvnrdkzjLf7kMAKRf5KRuA yCNn+2fC9gewONbINRqV06m6lyqwa7c2wGuY5f4OCNzTvYDoywcNsUQyLQC2aCf1 mb7jOsVj84Y5mEg5hbf+PeVf8mwWxFhZoPS9wtRhq2KWv0KuqT8zFGFCg9TRt5Q2 dr/A1d/yl3o5xkoRkLOM/xbfJWRGr+zu7cgf08CiLHL+aVaD5OShJwlvvwfRqvCA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvtddguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepffdvvdevleelgffhheeitdevhfefgfeivdevieeltdffkeefgffguedt keeiheejnecuffhomhgrihhnpehpohhsthhgrhdrvghsnecukfhppeeijedrudeitddrvd dujedrvdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id 0DADE240065; Thu, 11 Mar 2021 13:58:49 -0500 (EST) Date: Thu, 11 Mar 2021 10:58:47 -0800 From: Andres Freund To: Thomas Munro Cc: Daniel Gustafsson , pgsql-hackers Subject: Re: A qsort template Message-ID: <20210311185847.zwb2rf3n4wzelkba@alap3.anarazel.de> References: <0F9ECBA9-1DF2-4C38-BB58-B17EEE6C7B3A@yesql.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I wish we had the same for bsearch... :) On 2021-03-03 17:17:13 +1300, Thomas Munro wrote: > As for which cases are actually worth specialising, I've attached the > example that Andres mentioned earlier; it seems like a reasonable > candidate to go ahead and commit too, but I realised that I'd > forgotten to attach it earlier. > From 4cec5cb9a2e0c50726b7337fb8221281e155c4cd Mon Sep 17 00:00:00 2001 > From: Thomas Munro > Date: Thu, 18 Feb 2021 14:47:28 +1300 > Subject: [PATCH] Specialize checkpointer sort functions. > > When sorting a potentially large number of dirty buffers, the > checkpointer can benefit from a faster sort routine. One reported > improvement on a large buffer pool system was 1.4s -> 0.6s. > > Discussion: https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRDZxB_Tow0n-gse%2BHG0Yig%40mail.gmail.com Looks good to me. Greetings, Andres Freund