Re: SP-GiST micro-optimizations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SP-GiST micro-optimizations
Date: 2012-08-28 18:42:27
Message-ID: 6524.1346179347@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On 28.08.2012 20:30, Tom Lane wrote:
>> Fascinating. I'd been of the opinion that modern compilers would inline
>> memset() for themselves and MemSet was probably not better than what the
>> compiler could do these days. What platform are you testing on?

> x64, gcc 4.7.1, running Debian.

> The assembly generated for the MemSet is:
> [ pretty darn tight ]
> while the corresponding memset code is:
> [ not so good ]

Seems like that's down to the CPU not doing "rep stosq" particularly
quickly, which might well be chip-specific.

Anyway, IIRC there are similar memsets for all the SPGiST opclass
invocation calls, so I guess you should switch them all not just these
two.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-08-28 18:55:56 Re: MySQL search query is not executing in Postgres DB
Previous Message Robert Haas 2012-08-28 18:36:35 Re: MySQL search query is not executing in Postgres DB