Re: Minor performance improvement in transition to external sort

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Jeremy Harris <jgh(at)wizmail(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minor performance improvement in transition to external sort
Date: 2014-02-05 01:11:54
Message-ID: CAB7nPqSAFzHju9FYzw1sUcuAn8xMVhnv5VW_iM6OOL-0xMX+cg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 5, 2014 at 7:22 AM, Jeremy Harris <jgh(at)wizmail(dot)org> wrote:
> The attached patch replaces the existing siftup method for heapify with
> a siftdown method. Tested with random integers it does 18% fewer
> compares and takes 10% less time for the heapify, over the work_mem
> range 1024 to 1048576.
>
> Both algorithms appear to be O(n) (contradicting Wikipedia's claim
> that a siftup heapify is O(n log n)).
It looks interesting but it is too late to have that in 9.4... You
should definitely add this patch to the next commit fest so as it is
not lost in the void:
https://commitfest.postgresql.org/action/commitfest_view?id=22
Regards,
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-02-05 01:13:22 Re: should we add a XLogRecPtr/LSN SQL type?
Previous Message Michael Paquier 2014-02-05 00:38:04 Re: should we add a XLogRecPtr/LSN SQL type?