Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group