Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esQPL-0001en-QJ for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Mar 2018 09:58:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1esQPK-0002iZ-Co for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Mar 2018 09:58:18 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esQPK-0002iP-02 for pgsql-hackers@lists.postgresql.org; Sun, 04 Mar 2018 09:58:18 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1esQPG-0008MT-Rj for pgsql-hackers@postgresql.org; Sun, 04 Mar 2018 09:58:16 +0000 Received: by mail-lf0-x242.google.com with SMTP id r80so18998219lfe.13 for ; Sun, 04 Mar 2018 01:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=Me/WWqBD8E8dsoH0ovbOknKYvr8ulVtjFoq5eBIEqIA=; b=MV7Boc93wTqERnO3b+L5k8zfHAQz2jTbgu7Km9lMxdHT28DNUeVBHvusfGiq+JEV5N GIiLEB5na6+jS/7K9+4VkybnKAm6op80HDlRKiCxHjo+xZCfS/1i2j+ThoJZktRtErBU b3wPa55qXV8zZfNw8ouS4EpcZicXrzw0tyGjIvx7m+tp13TelOIKB8UlruBm2UIcgv+W HaVjpswAW8LT6Muoh0CZplw/A2wLF+KcL+9e52xnV4usqvx2xuVlKqQeTwQo2Cry3fZg cBQi1lgOrK3zvcgi/N9a9p4pmy+xwZ9wzN00lJ0s+VeiLenPoQeEFCFNTlHzyFZKXBDI ojKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=Me/WWqBD8E8dsoH0ovbOknKYvr8ulVtjFoq5eBIEqIA=; b=t39bhdJDIg5JicD2wDhnMa6JSMPcMipQm446hzmbvHr10ak6Cq2P6K65/Yh6Nij4sr aeNn0IhscJ2rFs9B5phauUoajVV50C8+W1c3JK2+VaFosH/HCaE9WD0fwr72yargeSeS tGSvT4RnWIqfzMzax35vJPsnpeXITEBEvuO/P6NWfzyF67642bdjDmxzlcUrG5KZCLZq X0Ve4YfOxqGes5pJm2QWfB/rtPfUfmrXuuFckbUdHyws7mDnA/6WteeL8FEr0neoSzwq 3+QsFPGAUASd4ZW3SccAY+mw2NjFJwXUngW++CuNz0aFHJpnUzWiUQCPKz2/EhAyCzlN SIdQ== X-Gm-Message-State: AElRT7HYQoZisIwRCwJ0eo5cZPN0KjPdBrl7sPeZIAiO1re+Pu4V/cVT bUsZLO6zAefruWc58o/PdVzS9P+/X04= X-Google-Smtp-Source: AG47ELstRFwCFKjn3svNXERxF7x2WMLyMoyrgDanmi0ARvskVPXyNxGT8li6m45kTD1uOg5MX2wbkQ== X-Received: by 10.25.34.81 with SMTP id i78mr7228784lfi.50.1520157492532; Sun, 04 Mar 2018 01:58:12 -0800 (PST) Received: from ?IPv6:2a02:2168:1503:9b00:f571:5619:6971:b38e? ([2a02:2168:1503:9b00:f571:5619:6971:b38e]) by smtp.gmail.com with ESMTPSA id 63sm2187115lfr.26.2018.03.04.01.58.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Mar 2018 01:58:11 -0800 (PST) Subject: Re: [HACKERS] Small improvement to compactify_tuples To: Andres Freund Cc: Stephen Frost , Michael Paquier , Peter Geoghegan , Tom Lane , Claudio Freire , Robert Haas , Sokolov Yura , Alvaro Herrera , Heikki Linnakangas , PostgreSQL-Dev References: <20171128224150.syswowiaiojth7ke@alap3.anarazel.de> <20180123033429.GF2416@tamriel.snowman.net> <9410de56-794b-147f-20f2-d5ef28e98e45@gmail.com> <20180301192206.2caqkwo2wzb777jq@alap3.anarazel.de> From: Yura Sokolov Message-ID: <5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com> Date: Sun, 4 Mar 2018 12:57:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180301192206.2caqkwo2wzb777jq@alap3.anarazel.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2Yr3GOAFWwcUBHGPEDVfewtVmZASOk2uJ" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2Yr3GOAFWwcUBHGPEDVfewtVmZASOk2uJ Content-Type: multipart/mixed; boundary="GXNfwxJf4YzoLLPMXQbJZBY3DyfDLsXaF"; protected-headers="v1" From: Yura Sokolov To: Andres Freund Cc: Stephen Frost , Michael Paquier , Peter Geoghegan , Tom Lane , Claudio Freire , Robert Haas , Sokolov Yura , Alvaro Herrera , Heikki Linnakangas , PostgreSQL-Dev Message-ID: <5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com> Subject: Re: [HACKERS] Small improvement to compactify_tuples References: <20171128224150.syswowiaiojth7ke@alap3.anarazel.de> <20180123033429.GF2416@tamriel.snowman.net> <9410de56-794b-147f-20f2-d5ef28e98e45@gmail.com> <20180301192206.2caqkwo2wzb777jq@alap3.anarazel.de> In-Reply-To: <20180301192206.2caqkwo2wzb777jq@alap3.anarazel.de> --GXNfwxJf4YzoLLPMXQbJZBY3DyfDLsXaF Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 01.03.2018 22:22, Andres Freund =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Hi, >=20 > On 2018-02-25 21:39:46 +0300, Yura Sokolov wrote: >>> If that's the case then does it really make sense to make this change= =2E.? >> >> I don't think it is really necessary to implement generic version >> through templated. >=20 > Why? It is better to replace use of generic version with templated in appropriate places. Generic version uses variable size of element. It will be difficult to describe through template. >=20 >> Updated numbers are (same benchmark on same notebook, but with new >> master, new ubuntu and later patch version) (average among 6 runs): >> >> master - 16135tps >> with templated qsort - 16199tps >> with bucket sort - 16956tps >> >> Difference is still measurable, but less significant. I don't know why= =2E >> >> Rebased version of first patch (qsorted tamplate) is in atttach. >=20 > Hm, that's a bit underwhelming. It's nice to deduplicate, but 16135tps > -> 16199tps is barely statistically significant? I mean bucket sort is measurably faster than both generic and templated sort (16956 vs 16199 and 16135). So initial goal remains: to add bucket sort in this place. BTW, I have small change to templated version that improves sorting of random tuples a bit (1-1.5%). Will post it a bit later with test. > - Andres >=20 With regards, Yura. --GXNfwxJf4YzoLLPMXQbJZBY3DyfDLsXaF-- --2Yr3GOAFWwcUBHGPEDVfewtVmZASOk2uJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJam8MyAAoJEDiUW3vLdplxS1sH/0wEYBAgZ6nCQorPrORFxaKk M0yJQNdiZtMIZXDEC8ol7RxqI9LUZDrR0iWDDlP4IzDCsY15w3dJ1CQtSbp2RPOX iagFHEEHqwjWQsicNKhrRCyMcK6mi1+OJMdtTqke8cz1/tQHIc9A60yUzuMraOTb wI68zACuyPARMUXni3Tf8d1R8SnaOmQvUK9HSMpWr3JzpN8M65FMoZ6Eeq9+MnyW KHSGP0cjvY6otWJOWyHPolYOoIX/YhX1hMp+TeZRrgBx07FYTIKWmnO8pnuoaUeJ V4MV3XcegZzaO6I8eWWD5fV6T/AiiyZKWdUnapyP/jJg2V7HQsTgQYRrc433sqk= =xTW9 -----END PGP SIGNATURE----- --2Yr3GOAFWwcUBHGPEDVfewtVmZASOk2uJ--