Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rh0BM-009516-OO for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 04:44:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rh0BL-0047uN-5w for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 04:44:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rh0BK-0047uE-QC for pgsql-hackers@lists.postgresql.org; Mon, 04 Mar 2024 04:44:07 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rh0BI-002evL-75 for pgsql-hackers@postgresql.org; Mon, 04 Mar 2024 04:44:06 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-512e4f4e463so4049133e87.1 for ; Sun, 03 Mar 2024 20:44:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709527443; x=1710132243; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NNJ1y5ZP03gPlEBOjRNPF8aJZrNYk9LbAY8bdHFNr1U=; b=X8QdtYfI3L+PHnqwzuxYgcFioxJRhQNQXh274UCBu39mSfMxjXbvUWXrh9JBcgyIKz dwpYHF5roD0fO28AGeo6eWL7vUihs4nSBxKPK9KP/9NoVWdplDJK68+nfmJbSDCvBKSC gctnILOraQu0aeCwCr67n/mbmn4RIPmSHrOQQIIOtNySoxtDsksQ+kXz43nFRDttT+1r CHmqf6tGdIZip88Uz8Cn+oplA/DyOpwWUlxL56djGKPpkwbNysOAhPhT81bGHmuLL8oM 8IRFS6/OOsQiZQTnUd0sHSDUS0lQ3/OnaGyWq86338fIhgUCxfvhDcs5RMflUIpLVTyi u7sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709527443; x=1710132243; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NNJ1y5ZP03gPlEBOjRNPF8aJZrNYk9LbAY8bdHFNr1U=; b=VkvAPRxwZBfE61h+ZX9gGEMPIwSqulQKR9d0+WQ/ZED0wUFBX47+tCfz46phTyPxLa H4cJkUwYlqGmo5JBDDZzVcKtlYqD8F5BBAa2kvF2ao5A7hjVhX/THT4dNXaxXUuI7nl8 CWmxNUHDXBOrv+nDzJpJ9SZnG1Qx2TEpA6sYMd79DfL+WobxFHA4oEvCuG2hdmRKRPxp KUFYxRyRo4ZEcuOdSyclGwp482/UtYykNJKq3QUUeSevrF6OrT/F5ghBduWhk3RTbbHL rE6XudFTNprY6mkW6/mLoF6HSlsJeeXta6yCvqHEqvbTkKO2gvuVaDkqRnZaaHUqWD+R NboQ== X-Gm-Message-State: AOJu0YwhzgBeqJJSafkTjgZSrQ8bwmAay/Q+amHChzKoVbCELGlNRpx2 PHY6tmu6E6u+gtlWIJUiTk9F74zUgn64eEE4M6WX0ql+HGDwPVbxZI4c8E8p8bEgMXm5DaT41LJ yjwwZTrTy0at//IBR8lf9jaLpc5o= X-Google-Smtp-Source: AGHT+IEeTF5E9Ui9Fof9rjfekPRwkHn8W5holy6XIg6cAzGLXcP5vY4JWaDsfUsKGIFjMiYSPlAPPXFjCb2tmF+PALw= X-Received: by 2002:a19:f70b:0:b0:512:ff21:294f with SMTP id z11-20020a19f70b000000b00512ff21294fmr5530196lfe.8.1709527442977; Sun, 03 Mar 2024 20:44:02 -0800 (PST) MIME-Version: 1.0 References: <20210719195950.gavgs6ujzmjfaiig@alap3.anarazel.de> <20230719085236.jltxal2eztqrprfg@awork3.anarazel.de> <20240222225343.7a57fiv7quehhlur@awork3.anarazel.de> In-Reply-To: From: David Rowley Date: Mon, 4 Mar 2024 17:43:50 +1300 Message-ID: Subject: Re: Avoid stack frame setup in performance critical routines using tail calls To: Andres Freund Cc: pgsql-hackers@postgresql.org, Robert Haas , Michael Paquier , Tomas Vondra Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 29 Feb 2024 at 00:29, David Rowley wrote: > I switched over to working on doing what you did in 0002 for > generation.c and slab.c. > > See the attached patch which runs the same test as in [1] (aset.c is > just there for comparisons between slab and generation) > > The attached includes some additional tuning to generation.c: I've now pushed this. David > [1] https://postgr.es/m/CAApHDvqss7-a9c51nj+f9xyAr15wjLB6teHsxPe-NwLCNqiJbg@mail.gmail.com