Re: In PG12, query with float calculations is slower than PG11

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Emre Hasegeli <emre(at)hasegeli(dot)com>, nospam-pg-abuse(at)bloodgate(dot)com, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, keisuke kuroda <keisuke(dot)kuroda(dot)3862(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: In PG12, query with float calculations is slower than PG11
Date: 2020-02-14 04:29:08
Message-ID: CA+HiwqGdpqesuyMfEUDbfru9hJ4dKypGcEbmYO=dErpSOSQo9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 14, 2020 at 3:47 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2020-02-13 13:40:43 -0500, Tom Lane wrote:
> > ... and pushed. One other change I made beyond those suggested
> > was to push the zero-divide ereport's out-of-line as well.
>
> Thanks!

Thank you all.

I repeated some of the tests I did earlier and things look good.

gcc-8
=====

HEAD

latency average = 296.842 ms

42.05% postgres postgres [.] ExecInterpExpr
15.14% postgres postgres [.] float8_accum
9.32% postgres libc-2.17.so [.] __isinf
7.32% postgres postgres [.] dsqrt
5.67% postgres postgres [.] float8mul
4.20% postgres postgres [.] ftod

11.7

latency average = 289.439 ms

41.52% postgres postgres [.] ExecInterpExpr
13.59% postgres libc-2.17.so [.] __isinf
10.98% postgres postgres [.] float8_accum
8.26% postgres postgres [.] dsqrt
6.17% postgres postgres [.] float8mul
3.65% postgres postgres [.] ftod

clang-7
=======

HEAD

latency average = 233.735 ms

43.84% postgres postgres [.] ExecInterpExpr
15.17% postgres postgres [.] float8_accum
8.25% postgres postgres [.] dsqrt
7.35% postgres postgres [.] float8mul
5.84% postgres postgres [.] ftod
3.78% postgres postgres [.] tts_buffer_heap_getsomeattrs

11.7

latency average = 221.009 ms

49.55% postgres postgres [.] ExecInterpExpr
12.05% postgres postgres [.] float8_accum
8.97% postgres postgres [.] dsqrt
6.72% postgres postgres [.] float8mul
5.62% postgres postgres [.] ftod
2.18% postgres postgres [.] slot_deform_tuple

HEAD and PG 11 are now comparable even when built with gcc.

Regards,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2020-02-14 05:31:45 Re: Should we add xid_current() or a int8->xid cast?
Previous Message Michael Paquier 2020-02-14 04:10:04 Quoting issues with createdb