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 1lyzjK-0006KY-Rb for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jul 2021 16:39:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lyzjJ-0006dA-Fq for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jul 2021 16:39:57 +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 1lyzjJ-0006d0-30 for pgsql-hackers@lists.postgresql.org; Thu, 01 Jul 2021 16:39:57 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lyzj7-0001CT-C2 for pgsql-hackers@postgresql.org; Thu, 01 Jul 2021 16:39:56 +0000 Received: by mail-io1-xd30.google.com with SMTP id u7so6120073ion.3 for ; Thu, 01 Jul 2021 09:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=61h+Lv4B2LSs52xqWc3YKxMh5pxhxqJeHJlr2xhQLU8=; b=TDoG6f8P/MkBD29LaWZrrlDztay12m6c07Aj9xeCTnBvhKal1lJgpawmaepQAgnhBi OMa6SYVWO4r7U8WK0M/23h9n+QSQlfHayFsOrFLlHnl0Va3MzbiJGVZEkTO0+3qZ+ei2 sElR77wCKKhS3s8SupkV5yzDVC5TMu+1ZBGWACm1PLEmM7ZUKGNja6UPqsYiNqIYPH3U DdyD8O6sFLu1AVIGGCxxKnb4u4vY/lgawi+TaUYa1ZlK2fmwKcidqjXUiOJFJLB8j+Of j4SjIC3T6mOXjg3iQahElgY8AQXW5yjKvbfWLeyHDNdhDIHD0Lkt4aUmsxPm4qyDCTAD jlow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=61h+Lv4B2LSs52xqWc3YKxMh5pxhxqJeHJlr2xhQLU8=; b=ZkT/Oo0tBuHPzZYKMN9JJn6IjpRcIhkezMeNQej+ZTs2RPKjQG3yMYJSg0K+qeQF2Q /O+qJTrZCPYDMVAiEfI9XsWWc+Vlct7SSFF5A6ndbBxHp+G7yDT0B8fBKPaXpVEm6fxv fREXVs2sGT4Icb+vN/294HmbfjEPWnOLxPjbBOB9tnwI2XvC5tGXoarwD2aXkBItbtMq A78YMlOHv9p4asol6dd4wAXfMhVIYybW+5cJzdLkOi+J8GXsUzJD+tFx66x0NdkfCepE azF6PP83xOnxzEsey+6ITbL8r+leUvYEOBa5vc7Xdev9UUnlo2CLn67z1Clx0CIMRlv2 MpUA== X-Gm-Message-State: AOAM533XiZKzLXdha7XDzGC6C9gl2g42MgPx1ppSjgmX5BJ4Wt6mSWdc 6wlVe8PwlERZkwgj3BbKxAUDLZ5nLzHrb8vs5/cAHP1PWXvosOZzSHbKjfNYpTYOS+URoaRxBq7 ebQCNe8jpkS4vHNZDhPjDnT+02dMNDF/hUMCpNVVmdWBdhlSqT0c7BwBIs8iOX7pfOPcolDFn9M C9aKYfm5s3YedeUJHrTerRgfPN5Nor3z9RabMKkgcAJkjBkLv68NKu X-Google-Smtp-Source: ABdhPJzOjbXaT4uBamgXXK8NbBSUKQMGx1RLZ41jOcvkG4mG2eybIV0nAeT+vmQaxv/4/VzJ/3Tx4v9f2q3MbGiFmM8= X-Received: by 2002:a5d:9c43:: with SMTP id 3mr227058iof.123.1625157583331; Thu, 01 Jul 2021 09:39:43 -0700 (PDT) MIME-Version: 1.0 References: <0F9ECBA9-1DF2-4C38-BB58-B17EEE6C7B3A@yesql.se> <20210311185847.zwb2rf3n4wzelkba@alap3.anarazel.de> In-Reply-To: From: John Naylor Date: Thu, 1 Jul 2021 12:39:32 -0400 Message-ID: Subject: Re: A qsort template To: Thomas Munro Cc: pgsql-hackers Content-Type: multipart/mixed; boundary="000000000000759c3a05c6127c47" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000759c3a05c6127c47 Content-Type: multipart/alternative; boundary="000000000000759c3805c6127c45" --000000000000759c3805c6127c45 Content-Type: text/plain; charset="UTF-8" I wrote: > One of the points of the talk I linked to is "if doing the sensible thing makes things worse, try something silly instead". For item pointers, it made sense to try doing math to reduce the number of branches. That made things worse, so let's try the opposite: Increase the number of branches so we do less math. In the attached patch (applies on top of your 0012 and a .txt to avoid confusing the CF bot), I test a new comparator with this approach, and also try a wider range of thresholds. The thresholds don't seem to make any noticeable difference with this data type, but the new comparator (cmp=ids below) gives a nice speedup in this test: # SELECT test_sort_itemptr(); NOTICE: [traditional qsort] order=random, threshold=7, cmp=32, test=0, time=4.964657 NOTICE: [traditional qsort] order=random, threshold=7, cmp=32, test=1, time=5.185384 NOTICE: [traditional qsort] order=random, threshold=7, cmp=32, test=2, time=5.058179 NOTICE: order=random, threshold=7, cmp=std, test=0, time=2.810627 NOTICE: order=random, threshold=7, cmp=std, test=1, time=2.804940 NOTICE: order=random, threshold=7, cmp=std, test=2, time=2.800677 NOTICE: order=random, threshold=7, cmp=ids, test=0, time=1.692711 NOTICE: order=random, threshold=7, cmp=ids, test=1, time=1.694546 NOTICE: order=random, threshold=7, cmp=ids, test=2, time=1.692839 NOTICE: order=random, threshold=12, cmp=std, test=0, time=2.687033 NOTICE: order=random, threshold=12, cmp=std, test=1, time=2.681974 NOTICE: order=random, threshold=12, cmp=std, test=2, time=2.687833 NOTICE: order=random, threshold=12, cmp=ids, test=0, time=1.666418 NOTICE: order=random, threshold=12, cmp=ids, test=1, time=1.666188 NOTICE: order=random, threshold=12, cmp=ids, test=2, time=1.664176 NOTICE: order=random, threshold=16, cmp=std, test=0, time=2.574147 NOTICE: order=random, threshold=16, cmp=std, test=1, time=2.579981 NOTICE: order=random, threshold=16, cmp=std, test=2, time=2.572861 NOTICE: order=random, threshold=16, cmp=ids, test=0, time=1.699432 NOTICE: order=random, threshold=16, cmp=ids, test=1, time=1.703075 NOTICE: order=random, threshold=16, cmp=ids, test=2, time=1.697173 NOTICE: order=random, threshold=32, cmp=std, test=0, time=2.750040 NOTICE: order=random, threshold=32, cmp=std, test=1, time=2.744138 NOTICE: order=random, threshold=32, cmp=std, test=2, time=2.748026 NOTICE: order=random, threshold=32, cmp=ids, test=0, time=1.677414 NOTICE: order=random, threshold=32, cmp=ids, test=1, time=1.683792 NOTICE: order=random, threshold=32, cmp=ids, test=2, time=1.701309 NOTICE: [traditional qsort] order=increasing, threshold=7, cmp=32, test=0, time=2.543837 NOTICE: [traditional qsort] order=increasing, threshold=7, cmp=32, test=1, time=2.290497 NOTICE: [traditional qsort] order=increasing, threshold=7, cmp=32, test=2, time=2.262956 NOTICE: order=increasing, threshold=7, cmp=std, test=0, time=1.033052 NOTICE: order=increasing, threshold=7, cmp=std, test=1, time=1.032079 NOTICE: order=increasing, threshold=7, cmp=std, test=2, time=1.041836 NOTICE: order=increasing, threshold=7, cmp=ids, test=0, time=0.367355 NOTICE: order=increasing, threshold=7, cmp=ids, test=1, time=0.367428 NOTICE: order=increasing, threshold=7, cmp=ids, test=2, time=0.367384 NOTICE: order=increasing, threshold=12, cmp=std, test=0, time=1.004991 NOTICE: order=increasing, threshold=12, cmp=std, test=1, time=1.008045 NOTICE: order=increasing, threshold=12, cmp=std, test=2, time=1.010778 NOTICE: order=increasing, threshold=12, cmp=ids, test=0, time=0.370944 NOTICE: order=increasing, threshold=12, cmp=ids, test=1, time=0.368669 NOTICE: order=increasing, threshold=12, cmp=ids, test=2, time=0.370100 NOTICE: order=increasing, threshold=16, cmp=std, test=0, time=1.023682 NOTICE: order=increasing, threshold=16, cmp=std, test=1, time=1.025805 NOTICE: order=increasing, threshold=16, cmp=std, test=2, time=1.022005 NOTICE: order=increasing, threshold=16, cmp=ids, test=0, time=0.365398 NOTICE: order=increasing, threshold=16, cmp=ids, test=1, time=0.365586 NOTICE: order=increasing, threshold=16, cmp=ids, test=2, time=0.364807 NOTICE: order=increasing, threshold=32, cmp=std, test=0, time=0.950780 NOTICE: order=increasing, threshold=32, cmp=std, test=1, time=0.949920 NOTICE: order=increasing, threshold=32, cmp=std, test=2, time=0.953239 NOTICE: order=increasing, threshold=32, cmp=ids, test=0, time=0.367866 NOTICE: order=increasing, threshold=32, cmp=ids, test=1, time=0.372179 NOTICE: order=increasing, threshold=32, cmp=ids, test=2, time=0.371115 NOTICE: [traditional qsort] order=decreasing, threshold=7, cmp=32, test=0, time=2.317475 NOTICE: [traditional qsort] order=decreasing, threshold=7, cmp=32, test=1, time=2.323446 NOTICE: [traditional qsort] order=decreasing, threshold=7, cmp=32, test=2, time=2.326714 NOTICE: order=decreasing, threshold=7, cmp=std, test=0, time=1.022270 NOTICE: order=decreasing, threshold=7, cmp=std, test=1, time=1.015133 NOTICE: order=decreasing, threshold=7, cmp=std, test=2, time=1.016367 NOTICE: order=decreasing, threshold=7, cmp=ids, test=0, time=0.386884 NOTICE: order=decreasing, threshold=7, cmp=ids, test=1, time=0.388397 NOTICE: order=decreasing, threshold=7, cmp=ids, test=2, time=0.386328 NOTICE: order=decreasing, threshold=12, cmp=std, test=0, time=0.993594 NOTICE: order=decreasing, threshold=12, cmp=std, test=1, time=0.995031 NOTICE: order=decreasing, threshold=12, cmp=std, test=2, time=0.995320 NOTICE: order=decreasing, threshold=12, cmp=ids, test=0, time=0.391243 NOTICE: order=decreasing, threshold=12, cmp=ids, test=1, time=0.391938 NOTICE: order=decreasing, threshold=12, cmp=ids, test=2, time=0.392478 NOTICE: order=decreasing, threshold=16, cmp=std, test=0, time=1.006240 NOTICE: order=decreasing, threshold=16, cmp=std, test=1, time=1.009817 NOTICE: order=decreasing, threshold=16, cmp=std, test=2, time=1.010281 NOTICE: order=decreasing, threshold=16, cmp=ids, test=0, time=0.386388 NOTICE: order=decreasing, threshold=16, cmp=ids, test=1, time=0.385801 NOTICE: order=decreasing, threshold=16, cmp=ids, test=2, time=0.384484 NOTICE: order=decreasing, threshold=32, cmp=std, test=0, time=0.959647 NOTICE: order=decreasing, threshold=32, cmp=std, test=1, time=0.958833 NOTICE: order=decreasing, threshold=32, cmp=std, test=2, time=0.960234 NOTICE: order=decreasing, threshold=32, cmp=ids, test=0, time=0.403014 NOTICE: order=decreasing, threshold=32, cmp=ids, test=1, time=0.393329 NOTICE: order=decreasing, threshold=32, cmp=ids, test=2, time=0.395659 -- John Naylor EDB: http://www.enterprisedb.com --000000000000759c3805c6127c45 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I wrote:

> One of the points of the talk I linke= d to is "if doing the sensible thing makes things worse, try something= silly instead".

For item pointers, it made sense to try doing = math to reduce the number of branches. That made things worse, so let's= try the opposite: Increase the number of branches so we do less math. In t= he attached patch (applies on top of your 0012 and a .txt to avoid confusin= g the CF bot), I test a new comparator with this approach, and also try a w= ider range of thresholds. The thresholds don't seem to make any noticea= ble difference with this data type, but the new comparator (cmp=3Dids below= ) gives a nice speedup in this test:

# SELECT test_sort_itemptr();NOTICE: =C2=A0[traditional qsort] order=3Drandom, threshold=3D7, cmp=3D32= , test=3D0, time=3D4.964657
NOTICE: =C2=A0[traditional qsort] order=3Dra= ndom, threshold=3D7, cmp=3D32, test=3D1, time=3D5.185384
NOTICE: =C2=A0[= traditional qsort] order=3Drandom, threshold=3D7, cmp=3D32, test=3D2, time= =3D5.058179
NOTICE: =C2=A0order=3Drandom, threshold=3D7, cmp=3Dstd, test= =3D0, time=3D2.810627
NOTICE: =C2=A0order=3Drandom, threshold=3D7, cmp= =3Dstd, test=3D1, time=3D2.804940
NOTICE: =C2=A0order=3Drandom, threshol= d=3D7, cmp=3Dstd, test=3D2, time=3D2.800677
NOTICE: =C2=A0order=3Drandom= , threshold=3D7, cmp=3Dids, test=3D0, time=3D1.692711
NOTICE: =C2=A0orde= r=3Drandom, threshold=3D7, cmp=3Dids, test=3D1, time=3D1.694546
NOTICE: = =C2=A0order=3Drandom, threshold=3D7, cmp=3Dids, test=3D2, time=3D1.692839NOTICE: =C2=A0order=3Drandom, threshold=3D12, cmp=3Dstd, test=3D0, time= =3D2.687033
NOTICE: =C2=A0order=3Drandom, threshold=3D12, cmp=3Dstd, tes= t=3D1, time=3D2.681974
NOTICE: =C2=A0order=3Drandom, threshold=3D12, cmp= =3Dstd, test=3D2, time=3D2.687833
NOTICE: =C2=A0order=3Drandom, threshol= d=3D12, cmp=3Dids, test=3D0, time=3D1.666418
NOTICE: =C2=A0order=3Drando= m, threshold=3D12, cmp=3Dids, test=3D1, time=3D1.666188
NOTICE: =C2=A0or= der=3Drandom, threshold=3D12, cmp=3Dids, test=3D2, time=3D1.664176
NOTIC= E: =C2=A0order=3Drandom, threshold=3D16, cmp=3Dstd, test=3D0, time=3D2.5741= 47
NOTICE: =C2=A0order=3Drandom, threshold=3D16, cmp=3Dstd, test=3D1, ti= me=3D2.579981
NOTICE: =C2=A0order=3Drandom, threshold=3D16, cmp=3Dstd, t= est=3D2, time=3D2.572861
NOTICE: =C2=A0order=3Drandom, threshold=3D16, c= mp=3Dids, test=3D0, time=3D1.699432
NOTICE: =C2=A0order=3Drandom, thresh= old=3D16, cmp=3Dids, test=3D1, time=3D1.703075
NOTICE: =C2=A0order=3Dran= dom, threshold=3D16, cmp=3Dids, test=3D2, time=3D1.697173
NOTICE: =C2=A0= order=3Drandom, threshold=3D32, cmp=3Dstd, test=3D0, time=3D2.750040
NOT= ICE: =C2=A0order=3Drandom, threshold=3D32, cmp=3Dstd, test=3D1, time=3D2.74= 4138
NOTICE: =C2=A0order=3Drandom, threshold=3D32, cmp=3Dstd, test=3D2, = time=3D2.748026
NOTICE: =C2=A0order=3Drandom, threshold=3D32, cmp=3Dids,= test=3D0, time=3D1.677414
NOTICE: =C2=A0order=3Drandom, threshold=3D32,= cmp=3Dids, test=3D1, time=3D1.683792
NOTICE: =C2=A0order=3Drandom, thre= shold=3D32, cmp=3Dids, test=3D2, time=3D1.701309
NOTICE: =C2=A0[traditio= nal qsort] order=3Dincreasing, threshold=3D7, cmp=3D32, test=3D0, time=3D2.= 543837
NOTICE: =C2=A0[traditional qsort] order=3Dincreasing, threshold= =3D7, cmp=3D32, test=3D1, time=3D2.290497
NOTICE: =C2=A0[traditional qso= rt] order=3Dincreasing, threshold=3D7, cmp=3D32, test=3D2, time=3D2.262956<= br>NOTICE: =C2=A0order=3Dincreasing, threshold=3D7, cmp=3Dstd, test=3D0, ti= me=3D1.033052
NOTICE: =C2=A0order=3Dincreasing, threshold=3D7, cmp=3Dstd= , test=3D1, time=3D1.032079
NOTICE: =C2=A0order=3Dincreasing, threshold= =3D7, cmp=3Dstd, test=3D2, time=3D1.041836
NOTICE: =C2=A0order=3Dincreas= ing, threshold=3D7, cmp=3Dids, test=3D0, time=3D0.367355
NOTICE: =C2=A0o= rder=3Dincreasing, threshold=3D7, cmp=3Dids, test=3D1, time=3D0.367428
N= OTICE: =C2=A0order=3Dincreasing, threshold=3D7, cmp=3Dids, test=3D2, time= =3D0.367384
NOTICE: =C2=A0order=3Dincreasing, threshold=3D12, cmp=3Dstd,= test=3D0, time=3D1.004991
NOTICE: =C2=A0order=3Dincreasing, threshold= =3D12, cmp=3Dstd, test=3D1, time=3D1.008045
NOTICE: =C2=A0order=3Dincrea= sing, threshold=3D12, cmp=3Dstd, test=3D2, time=3D1.010778
NOTICE: =C2= =A0order=3Dincreasing, threshold=3D12, cmp=3Dids, test=3D0, time=3D0.370944=
NOTICE: =C2=A0order=3Dincreasing, threshold=3D12, cmp=3Dids, test=3D1, = time=3D0.368669
NOTICE: =C2=A0order=3Dincreasing, threshold=3D12, cmp=3D= ids, test=3D2, time=3D0.370100
NOTICE: =C2=A0order=3Dincreasing, thresho= ld=3D16, cmp=3Dstd, test=3D0, time=3D1.023682
NOTICE: =C2=A0order=3Dincr= easing, threshold=3D16, cmp=3Dstd, test=3D1, time=3D1.025805
NOTICE: =C2= =A0order=3Dincreasing, threshold=3D16, cmp=3Dstd, test=3D2, time=3D1.022005=
NOTICE: =C2=A0order=3Dincreasing, threshold=3D16, cmp=3Dids, test=3D0, = time=3D0.365398
NOTICE: =C2=A0order=3Dincreasing, threshold=3D16, cmp=3D= ids, test=3D1, time=3D0.365586
NOTICE: =C2=A0order=3Dincreasing, thresho= ld=3D16, cmp=3Dids, test=3D2, time=3D0.364807
NOTICE: =C2=A0order=3Dincr= easing, threshold=3D32, cmp=3Dstd, test=3D0, time=3D0.950780
NOTICE: =C2= =A0order=3Dincreasing, threshold=3D32, cmp=3Dstd, test=3D1, time=3D0.949920=
NOTICE: =C2=A0order=3Dincreasing, threshold=3D32, cmp=3Dstd, test=3D2, = time=3D0.953239
NOTICE: =C2=A0order=3Dincreasing, threshold=3D32, cmp=3D= ids, test=3D0, time=3D0.367866
NOTICE: =C2=A0order=3Dincreasing, thresho= ld=3D32, cmp=3Dids, test=3D1, time=3D0.372179
NOTICE: =C2=A0order=3Dincr= easing, threshold=3D32, cmp=3Dids, test=3D2, time=3D0.371115
NOTICE: =C2= =A0[traditional qsort] order=3Ddecreasing, threshold=3D7, cmp=3D32, test=3D= 0, time=3D2.317475
NOTICE: =C2=A0[traditional qsort] order=3Ddecreasing,= threshold=3D7, cmp=3D32, test=3D1, time=3D2.323446
NOTICE: =C2=A0[tradi= tional qsort] order=3Ddecreasing, threshold=3D7, cmp=3D32, test=3D2, time= =3D2.326714
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D7, cmp=3Dstd, = test=3D0, time=3D1.022270
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D= 7, cmp=3Dstd, test=3D1, time=3D1.015133
NOTICE: =C2=A0order=3Ddecreasing= , threshold=3D7, cmp=3Dstd, test=3D2, time=3D1.016367
NOTICE: =C2=A0orde= r=3Ddecreasing, threshold=3D7, cmp=3Dids, test=3D0, time=3D0.386884
NOTI= CE: =C2=A0order=3Ddecreasing, threshold=3D7, cmp=3Dids, test=3D1, time=3D0.= 388397
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D7, cmp=3Dids, test= =3D2, time=3D0.386328
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D12, = cmp=3Dstd, test=3D0, time=3D0.993594
NOTICE: =C2=A0order=3Ddecreasing, t= hreshold=3D12, cmp=3Dstd, test=3D1, time=3D0.995031
NOTICE: =C2=A0order= =3Ddecreasing, threshold=3D12, cmp=3Dstd, test=3D2, time=3D0.995320
NOTI= CE: =C2=A0order=3Ddecreasing, threshold=3D12, cmp=3Dids, test=3D0, time=3D0= .391243
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D12, cmp=3Dids, tes= t=3D1, time=3D0.391938
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D12,= cmp=3Dids, test=3D2, time=3D0.392478
NOTICE: =C2=A0order=3Ddecreasing, = threshold=3D16, cmp=3Dstd, test=3D0, time=3D1.006240
NOTICE: =C2=A0order= =3Ddecreasing, threshold=3D16, cmp=3Dstd, test=3D1, time=3D1.009817
NOTI= CE: =C2=A0order=3Ddecreasing, threshold=3D16, cmp=3Dstd, test=3D2, time=3D1= .010281
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D16, cmp=3Dids, tes= t=3D0, time=3D0.386388
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D16,= cmp=3Dids, test=3D1, time=3D0.385801
NOTICE: =C2=A0order=3Ddecreasing, = threshold=3D16, cmp=3Dids, test=3D2, time=3D0.384484
NOTICE: =C2=A0order= =3Ddecreasing, threshold=3D32, cmp=3Dstd, test=3D0, time=3D0.959647
NOTI= CE: =C2=A0order=3Ddecreasing, threshold=3D32, cmp=3Dstd, test=3D1, time=3D0= .958833
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D32, cmp=3Dstd, tes= t=3D2, time=3D0.960234
NOTICE: =C2=A0order=3Ddecreasing, threshold=3D32,= cmp=3Dids, test=3D0, time=3D0.403014
NOTICE: =C2=A0order=3Ddecreasing, = threshold=3D32, cmp=3Dids, test=3D1, time=3D0.393329
NOTICE: =C2=A0order= =3Ddecreasing, threshold=3D32, cmp=3Dids, test=3D2, time=3D0.395659

= --
John Naylor
EDB: http://ww= w.enterprisedb.com
--000000000000759c3805c6127c45-- --000000000000759c3a05c6127c47 Content-Type: application/octet-stream; name="itemptr-cmp-blockids.patch" Content-Disposition: attachment; filename="itemptr-cmp-blockids.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kql4qvjz0 ZGlmZiAtLWdpdCBhL3NyYy90ZXN0L21vZHVsZXMvdGVzdF9zb3J0X3BlcmYvbWFrZS1pdGVtcHRy LXRlc3RzLnNoIGIvc3JjL3Rlc3QvbW9kdWxlcy90ZXN0X3NvcnRfcGVyZi9tYWtlLWl0ZW1wdHIt dGVzdHMuc2gKaW5kZXggOTE1MWVhNzAzZi4uZmQwMDQ4ZWJhMyAxMDA3NTUKLS0tIGEvc3JjL3Rl c3QvbW9kdWxlcy90ZXN0X3NvcnRfcGVyZi9tYWtlLWl0ZW1wdHItdGVzdHMuc2gKKysrIGIvc3Jj L3Rlc3QvbW9kdWxlcy90ZXN0X3NvcnRfcGVyZi9tYWtlLWl0ZW1wdHItdGVzdHMuc2gKQEAgLTEs NyArMSw3IEBACiAjIS9iaW4vc2gKIAogIyBkaWZmZXJlbnQgdmFsdWVzIHRvIHRlc3QgZm9yIGlu c2VydGlvbiBzb3J0cwotVEhSRVNIT0xEUz0iNyA4IDkgMTAgMTEgMTIgMTMiCitUSFJFU0hPTERT PSI3IDEyIDE2IDMyIgogCiAjIGFtb3VudCBvZiBkYXRh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