sbufdesc' padding...

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема sbufdesc' padding...
Дата
Msg-id 36622819.FDB4B8DF@krs.ru
обсуждение исходный текст
Ответы Re: [HACKERS] sbufdesc' padding...
Список pgsql-hackers
I'm going to remove subj...

buf_internals.h:
   /*    * I padded this structure to a power of 2 (PADDED_SBUFDESC_SIZE)    * because BufferDescriptorGetBuffer is
calleda billion times and it    * does an C pointer subtraction (i.e., "x - y" -> array index of x    * relative to y,
whichis calculated using division by struct size).
^^^^^^^^^^^^^^^^^^^^^^^^   * Integer ".div" hits you for 35 cycles, as opposed to a 1-cycle    * "sra" ... this hack
cut10% off of the time to create the Wisconsin    * database! It eats up more shared memory, of course, but we're    *
(allegedly)going to make some of these types bigger soon anyway...    * -pma 1/2/93    */
 

This is not true now:

#define BufferDescriptorGetBuffer(bdesc) ((bdesc)->buf_id + 1)

Comments ?...

Vadim


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: [HACKERS] How to see rules,functions and triggers in psql ?
Следующее
От: Akmal Hasan
Дата:
Сообщение: How to build Distributed Databases with JDBC and PostgreSQL?