Re: remove BufferBlockPointers for speed and space
От | Gavin Sherry |
---|---|
Тема | Re: remove BufferBlockPointers for speed and space |
Дата | |
Msg-id | Pine.LNX.4.58.0508111542420.376@linuxworld.com.au обсуждение исходный текст |
Ответ на | remove BufferBlockPointers for speed and space ("Qingqing Zhou" <zhouqq@cs.toronto.edu>) |
Ответы |
Re: remove BufferBlockPointers for speed and space
|
Список | pgsql-patches |
On Thu, 11 Aug 2005, Qingqing Zhou wrote: > It is said that the BufferBlockPointers is used to speedup the > BufferGetBlock() macro. I compared three ways of getting block pointers. > I.e., existing method (arrary method), calculating block pointer by adding > base addr and offset*blockid method (mul method) and optimizing mul method > by using bit shift (shift method). All of them calculate the block pointer > 80000 times (i.e., the BufferBlockPointers array is of size 80000), and each > take 3 rounds. > > The result is: > > SunOS/gcc 3.2 > duration round 1 of array method: 4.179 ms > duration round 2 of array method: 4.160 ms > duration round 3 of array method: 4.143 ms > duration round 1 of mul method: 3.311 ms > duration round 2 of mul method: 3.233 ms > duration round 3 of mul method: 3.233 ms > duration round 1 of shift method: 3.554 ms > duration round 2 of shift method: 3.235 ms > duration round 3 of shift method: 3.233 ms > > Linux/gcc 3.2 > duration round 1 of array method: 0.422 ms > duration round 2 of array method: 0.324 ms > duration round 3 of array method: 0.354 ms > duration round 1 of mul method: 0.271 ms > duration round 2 of mul method: 0.248 ms > duration round 3 of mul method: 0.304 ms > duration round 1 of shift method: 0.322 ms > duration round 2 of shift method: 0.239 ms > duration round 3 of shift method: 0.265 ms > > We can conclude that: > (1) mul or shift are definitely better than array method; > (2) mul and shift are comparable; Do you have results for more recent gcc releases? Thanks, Gavin
В списке pgsql-patches по дате отправления: