Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > I can see that being useful for a single-user application that doesn't > > have locking or I/O bottlenecks, and doesn't have a multi-stage design > > like a database. Do we do enough of such processing that we will _see_ > > an improvement, or will our code become more complex and it will be > > harder to make algorithmic optimizations to our code? > > The main concern I've got about this is the probable negative effect on > code readability. There's a limit to the extent to which I'm willing to > uglify the code for processor-specific optimizations, and that limit is > not real far off. There are a lot of other design levels we can work at > to obtain speedups that won't depend on the assumption we are running > on this-year's Intel hardware.
That is my guess too. We have seen speedups by inlining and optimizing frequently-called functions and using assembler for spinlocks. Proof of the assembler is in /pg/include/storage/s_lock.h and proof of the inlining is in /pg/include/access/heapam.h. Those were chosen for optimization because they were used a lot. I think the big question is whether there are other areas that have a similar CPU load and can be meaningfully optimized, and does the optimization include such things as multi-staging. I think we should take a wait and see attitude and see what test results people get. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match