Re: Idea for cleaner representation of snapshots
От | Gregory Stark |
---|---|
Тема | Re: Idea for cleaner representation of snapshots |
Дата | |
Msg-id | 87y7lm4930.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Idea for cleaner representation of snapshots (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Idea for cleaner representation of snapshots
Re: Idea for cleaner representation of snapshots |
Список | pgsql-hackers |
> HeapTupleSatisfiesVisibility reduces to something like > > ((*(snapshot)->satisfies) ((tuple)->t_data, snapshot, buffer)) > > which ought to be faster than it is now. It sounds like a fine idea from the point of view of flexibility. But as far as faster... I guess it depends on how often HeapTupleSatisfiesVisibility is used in contexts where the compiler is able to optimize away the conditionals or the cpu is able to predict them accurately. I suspect in the cases where we actually care--scans where it's being called thousands of times quickly--the latter is quite effective. Function pointers are notoriously hard to optimize around and can actually make the surrounding code harder to optimize as well especially since we compile with -fno-strict-aliasing. So whether it's faster or slower may depend a lot on the specific call site. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: