Re: Idea for cleaner representation of snapshots - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Idea for cleaner representation of snapshots
Date
Msg-id 87y7lm4930.fsf@oxford.xeocode.com
Whole thread Raw
In response to Idea for cleaner representation of snapshots  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Idea for cleaner representation of snapshots
Re: Idea for cleaner representation of snapshots
List 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 by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Documentation access problems.
Next
From: stark
Date:
Subject: datestyle GUC broken in HEAD?