Re: SP-GiST micro-optimizations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SP-GiST micro-optimizations
Date
Msg-id 6524.1346179347@sss.pgh.pa.us
Whole thread Raw
In response to Re: SP-GiST micro-optimizations  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: SP-GiST micro-optimizations
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: MySQL search query is not executing in Postgres DB
Next
From: Tom Lane
Date:
Subject: Re: MySQL search query is not executing in Postgres DB