I wrote:
> Here's a v2 responding to your suggestions.  0001 refactors
> att_align_nominal(), and then 0002 is nearly the same as the
> prior patch except for rebasing over that change.

I did some simple benchmarking and convinced myself that v2-0001
is a measurable win performance-wise even as things stand.
This test case spends nearly all its time in ExecEvalScalarArrayOp,
which has one of the loops improved by v2-0001:

\timing on

do $$
declare a int8[]; i int8 := 1; b bool;
begin
  while i < 10000 loop
    a[i] := i;
    i := i+1;
  end loop;
  for j in 1..10 loop
    for k in 1..10000 loop
      b := (k = any(a));
    end loop;
  end loop;
end $$;

I see about 10% improvement in runtime with 0001 compared to HEAD.
So I'm inclined to go ahead and push that patch, and then return
to considering what we're going to do about int8 vs. double
alignment.

                        regards, tom lane


Reply via email to