Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZtqC-0004zP-FO for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2019 09:42:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iZtqA-00087M-8G for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2019 09:42:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZtq9-00086L-SR for pgsql-hackers@lists.postgresql.org; Wed, 27 Nov 2019 09:42:30 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZtq2-0000u5-0B for pgsql-hackers@lists.postgresql.org; Wed, 27 Nov 2019 09:42:29 +0000 Received: by mail-wm1-x344.google.com with SMTP id f129so6642789wmf.2 for ; Wed, 27 Nov 2019 01:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=F5Ph4E3Yi6I05q5OqbyunG85mxATBmGPEBwY5aeTBsI=; b=bDXZ0nt+lmnmD2ZHxyOfCp7Y/AKqNqFXOFyIc8nt16cAmVCfOBRTErAruz89Fu5kWM 6GNIprAZB/j2Fi4ncSHoKk6yTN7flzaGvcXmp6JNaLE3SjJxnbEyNO56fsWXHfnH/KMV pNd8coYfQs3Nf0KHR/UMPOY2caMVxy+F5FEpKhhc1HWMF3+3xE0e3egwb1KfInz6Kk0L yGaUp5mrYOT4QzTw25h335p14OKSkybFV9iKkMYcMV5WQFHSn46Ru5ghPyI3aHOxcVmx Rsgp/3GYXwMf2d8otR0DTViJuErYTM6KK1Al2RZ9d4mkzZbEAb7GzV6wr6t7dEA2HsIS Y9iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F5Ph4E3Yi6I05q5OqbyunG85mxATBmGPEBwY5aeTBsI=; b=Sv64a+yJVNyA8rmNkMxoTeE3/0kzR3UlpGK2OTlkfFqkv77n2eZdmthBv9gmiLzLhD 7I0/yqCWfYoNesc/5OMvz8rs0/KfpGuT7izTR6Hc2g4a8xl1I4fHrVg8w6R3arL60cSl cjKH2NzBX7wuOEbaT4zgFzx1oKHW1GIKdeDdRJp+FS2GEYvmbo2e7DjGru+cdLimxKUE LKNoLHpeZzI22LP8jHzhH1hfRBiSgJdn0IQgntLm/ezLDi/6aVDjFDAdRaWGGKrHzsU0 dfn3WKT6MDQZGOMUsR2Vt2O/oNHc00XR+pE+s112VwfuADr1z1uegZq+rVxVNQ7VG5Vh VTMg== X-Gm-Message-State: APjAAAUJ+gr3xMBRJ2ThF9Wfk8/qxxfYS3HtFlugdprrSGdTNWHSLaUC oymeW7z2B4nJ2qN2UFGRCrANbQ== X-Google-Smtp-Source: APXvYqxOOcgms9gqwArnN95SkdmJdUbZmipWW0lpIIDPf4WWesfk+O382Kk/bUuoOeghPXLjl9FsnQ== X-Received: by 2002:a1c:200f:: with SMTP id g15mr3446581wmg.96.1574847740817; Wed, 27 Nov 2019 01:42:20 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id o1sm18568749wrs.50.2019.11.27.01.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 01:42:19 -0800 (PST) Date: Wed, 27 Nov 2019 10:42:17 +0100 From: Tomas Vondra To: Michael Paquier Cc: Peter Eisentraut , Andrey Borodin , Alvaro Herrera , Gasper Zejn , pgsql-hackers@lists.postgresql.org Subject: Re: pglz performance Message-ID: <20191127094217.5caghrkttntybugj@development> References: <20191101154828.GA15829@alvherre.pgsql> <20191101165950.b5azncggaqfan5fi@development> <35c2a448-06b8-eab0-05ea-34a3f51ba9a8@2ndquadrant.com> <20191125080309.GK99720@paquier.xyz> <13C6049A-C3D9-4021-9934-41488DE38BE9@yandex-team.ru> <20191125082940.GP99720@paquier.xyz> <20191126094324.7y2n3n3houetavwd@development> <20191126200559.7ol33csmuwl6la2h@development> <20191127080147.GB221153@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191127080147.GB221153@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Nov 27, 2019 at 05:01:47PM +0900, Michael Paquier wrote: >On Tue, Nov 26, 2019 at 09:05:59PM +0100, Tomas Vondra wrote: >> Yeah, although the difference is minimal. We could probably construct a >> benchmark where #2 wins, but I think these queries are fairly realistic. >> So I'd just go with #1. > >Nice results. Using your benchmarks it indeed looks like patch 1 is a >winner here. > >> Code-wise I think the patches are mostly fine, although the comments >> might need some proof-reading. >> >> 1) I wasn't really sure what a "nibble" is, but maybe it's just me and >> it's a well-known term. >> >> 2) First byte use lower -> First byte uses lower >> >> 3) nibble contain upper -> nibble contains upper >> >> 4) to preven possible uncertanity -> to prevent possible uncertainty >> >> 5) I think we should briefly explain why memmove would be incompatible >> with pglz, it's not quite clear to me. >> >> 6) I'm pretty sure the comment in the 'while (off < len)' branch will be >> badly mangled by pgindent. >> >> 7) The last change moving "copy" to the next line seems unnecessary. > >Patch 1 has a typo as well here: >+ * When offset is smaller than lengh - source and >s/lengh/length/ > >Okay, if we are reaching a conclusion here, Tomas or Peter, are you >planning to finish brushing the patch and potentially commit it? I'd like some feedback from Andrey regarding the results and memmove comment, ant then I'll polish and push. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services