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 1skxaQ-0045ww-F4 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Sep 2024 03:18:39 +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 1skxaO-006cyW-Ox for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Sep 2024 03:18:36 +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 1skxaN-006cxP-Tm for pgsql-hackers@lists.postgresql.org; Mon, 02 Sep 2024 03:18:36 +0000 Received: from m16.mail.163.com ([220.197.31.3]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1skxaH-000EHE-Jj for pgsql-hackers@postgresql.org; Mon, 02 Sep 2024 03:18:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=GJ8EkGhyKyUcwzzM71npbkebBeHd71UaHSI9FGYaGhA=; b=e9DBG5f7sKSoQgY8M6lG07X5cHQhB9Qm+jI04NhyMvU0OOykWQ/OaJlrqE2JKx YRPpJ/qPCJkH7M9ZRUrwXvC9sOVW0JtDR5s9lWXmoliyyr7Jr3uw+aBBX31T4cSv 1LCqTXrznMWB8hdJajp8QhZlbjf5GSvkZg1tiBjl+SyrY= Received: from lovely-coding (unknown [219.151.178.97]) by gzsmtp1 (Coremail) with SMTP id sCgvCgB3eyJ_LtVm2O0qAg--.10585S3; Mon, 02 Sep 2024 11:18:23 +0800 (CST) From: Andy Fan To: David Rowley Cc: Tom Lane , pgsql-hackers Subject: Re: Make printtup a bit faster In-Reply-To: <87v7zihaf1.fsf@163.com> (Andy Fan's message of "Fri, 30 Aug 2024 13:00:50 +0800") References: <87wmjzfz0h.fsf@163.com> <3601908.1724945588@sss.pgh.pa.us> <87v7zihaf1.fsf@163.com> Date: Mon, 02 Sep 2024 03:18:23 +0000 Message-ID: <878qwaaglc.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain X-CM-TRANSID: sCgvCgB3eyJ_LtVm2O0qAg--.10585S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Xw1kJw13Gry8CrWfJr4Dtwb_yoW3JFcE9a s3Xr4kGw4jyryUtws3Cw4DZa4kGryxJr1fuw409ws5K34rAw4DZa1qyr9Fyw1xGwsFvrsI 93ZxXr4v93y3ZjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xREv383UUUUU== X-Originating-IP: [219.151.178.97] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/1tbiNh9OU2XAnSweuAAAsG List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andy Fan writes: > The attached is PoC of this idea, not matter which method are adopted > (rewrite all the outfunction or a optional print function), I think the > benefit will be similar. In the blew test case, it shows us 10%+ > improvements. (0.134ms vs 0.110ms) After working on more {type}_print functions, I'm thinking it is pretty like the 3rd IO function which shows some confused maintainence effort. so I agree refactoring the existing out function is a better idea. I'd like to work on _print function body first for easy review and testing. after all, if some common issues exists in these changes, it is better to know that before we working on the 700+ out functions. -- Best Regards Andy Fan