> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?


Reply via email to