From: | Vadim Mikheev <vadim(at)krs(dot)ru> |
---|---|
To: | PostgreSQL Developers List <hackers(at)postgreSQL(dot)org> |
Subject: | sbufdesc' padding... |
Date: | 1998-11-30 05:07:37 |
Message-ID: | 36622819.FDB4B8DF@krs.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 called a billion times and it
* does an C pointer subtraction (i.e., "x - y" -> array index of x
* relative to y, which is calculated using division by struct size).
^^^^^^^^^^^^^^^^^^^^^^^^
* Integer ".div" hits you for 35 cycles, as opposed to a 1-cycle
* "sra" ... this hack cut 10% 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
From | Date | Subject | |
---|---|---|---|
Next Message | Akmal Hasan | 1998-11-30 09:27:08 | How to build Distributed Databases with JDBC and PostgreSQL? |
Previous Message | Oleg Bartunov | 1998-11-30 04:09:10 | Re: [HACKERS] How to see rules,functions and triggers in psql ? |