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 1llAYQ-0005mI-OD for pgsql-hackers@arkaria.postgresql.org; Mon, 24 May 2021 13:23:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1llAXu-0007SE-5L for pgsql-hackers@arkaria.postgresql.org; Mon, 24 May 2021 13:23:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llAXt-0007S6-U6 for pgsql-hackers@lists.postgresql.org; Mon, 24 May 2021 13:23:01 +0000 Received: from sfr-1.cri.mines-paristech.fr ([77.158.180.225] helo=smtp.cri.ensmp.fr) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llAXr-0001hf-Mq for pgsql-hackers@lists.postgresql.org; Mon, 24 May 2021 13:23:01 +0000 Received: from pseudo (185.141.6.84.rev.sfr.net [84.6.141.185]) by smtp.cri.ensmp.fr (Postfix) with ESMTPSA id 1499EC01AF; Mon, 24 May 2021 15:24:46 +0200 (CEST) Date: Mon, 24 May 2021 15:22:58 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Aleksander Alekseev cc: PostgreSQL Developers Subject: Re: rand48 replacement In-Reply-To: Message-ID: References: <43a6e30b-542f-671a-e7bb-b7f78cf90e8c@enterprisedb.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Aleksander, >> - better software engineering >> - similar speed (slightly slower) >> - better statistical quality >> - quite small state >> - soundness > > Personally, I think your patch is great. Thanks for having a look! > Speaking of the speed I believe we should consider the performance of > the entire DBMS in typical scenarios, not the performance of the single > procedure. Sure. I tested a worst-case pgbench script with only "\set i random(1, 100000000)" on a loop, the slowdown was a few percents (IFAICR < 5%). > I'm pretty sure in these terms the impact of your patch is neglectable > now, and almost certainly beneficial in the long term because of better > randomness. > > While reviewing your patch I noticed that you missed test_integerset.c. > Here is an updated patch. Indeed. Thanks for the catch & the v2 patch! -- Fabien.