pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yura Sokolov <funny.falcon@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Sokolov Yura <funny.falcon@postgrespro.ru>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL-Dev <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Small improvement to compactify_tuples
Date: Sun, 4 Mar 2018 12:57:45 +0300
Message-ID: <5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com> (raw)
In-Reply-To: <20180301192206.2caqkwo2wzb777jq@alap3.anarazel.de>
References: <CAL-rCA3n4Neat4pH382nuZ9v0-SCZOBJ=KHT5CoBGXim=KTAhw@mail.gmail.com>
	<CAL-rCA2cCyvapkb15fADR3qKsRMo+XimPgmGviur1ui-y0q-aQ@mail.gmail.com>
	<CAH2-WznEQBxeij1_PnczUD=vQqS0aPWOxJAkmjH_rXoBpeo0ZQ@mail.gmail.com>
	<CAL-rCA3=MiVU7SWenhPL0a3e5KfOkzvXZDp_WL+ea2Ky57Fqdg@mail.gmail.com>
	<20171128224150.syswowiaiojth7ke@alap3.anarazel.de>
	<CAH2-Wzk19G5=RxQpgfUirRvihjrMvZSMSi=u53TbMbvLj1+5vA@mail.gmail.com>
	<CAB7nPqS4JRP_xyO3YCuBktGhTkDMRvg3-WBTgLqwpnLrtx-Qzg@mail.gmail.com>
	<CAL-rCA2n7UfVu1Ui0f+7cVN4vAKVM0+-cZKb_ka6-mGQBAF92w@mail.gmail.com>
	<20180123033429.GF2416@tamriel.snowman.net>
	<9410de56-794b-147f-20f2-d5ef28e98e45@gmail.com>
	<20180301192206.2caqkwo2wzb777jq@alap3.anarazel.de>

01.03.2018 22:22, Andres Freund пишет:
> Hi,
> 
> 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..?
>>
>> I don't think it is really necessary to implement generic version
>> through templated.
> 
> 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.

> 
>> 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.
>>
>> Rebased version of first patch (qsorted tamplate) is in atttach.
> 
> 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
> 

With regards,
Yura.

Attachments:

  [application/pgp-signature] signature.asc (454B, ../5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com/2-signature.asc)
  download

view thread (60+ messages)  latest in thread

Message-ID: <5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com>
Permalink:  ../5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com/
Also on:    postgresql.org/message-id/5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: funny.falcon@gmail.com, andres@anarazel.de, sfrost@snowman.net, michael.paquier@gmail.com, pg@bowt.ie, tgl@sss.pgh.pa.us, klaussfreire@gmail.com, robertmhaas@gmail.com, funny.falcon@postgrespro.ru, alvherre@2ndquadrant.com, hlinnaka@iki.fi
  Subject: Re: [HACKERS] Small improvement to compactify_tuples
  In-Reply-To: <5e5a61fc-961f-9c1a-bc28-2946812da561@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox