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

From Ants Aasma
Subject Re: SP-GiST micro-optimizations
Date
Msg-id CA+CSw_sGs7mSwFsHR7KKextJUcUeF_nLHjrbtagEgwJAP-bTuA@mail.gmail.com
Whole thread Raw
In response to Re: SP-GiST micro-optimizations  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SP-GiST micro-optimizations
List pgsql-hackers
On Tue, Aug 28, 2012 at 9:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Seems like that's down to the CPU not doing "rep stosq" particularly
> quickly, which might well be chip-specific.

AMD optimization manual[1] states the following:
   For repeat counts of less than 4k, expand REP string instructions
into equivalent sequences of simple
AMD64 instructions.

Intel optimization manual[2] doesn't provide equivalent guidelines,
but the graph associated with string instructions states about 30
cycles of startup latency. The mov based code on the other hand
executes in 6 cycles and can easily overlap with other non-store
instructions.

[1] http://support.amd.com/us/Processor_TechDocs/25112.PDF
[2] http://www.intel.com/content/dam/doc/manual/64-ia-32-architectures-optimization-manual.pdf

Ants Aasma
--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Audit Logs WAS: temporal support patch
Next
From: Pavel Stehule
Date:
Subject: Re: Audit Logs WAS: temporal support patch