Re: avg(int2) and avg(int8) micro-opt - Mailing list pgsql-patches

From Neil Conway
Subject Re: avg(int2) and avg(int8) micro-opt
Date
Msg-id 4251D746.30601@samurai.com
Whole thread Raw
In response to Re: avg(int2) and avg(int8) micro-opt  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: avg(int2) and avg(int8) micro-opt
Re: avg(int2) and avg(int8) micro-opt
List pgsql-patches
Tom Lane wrote:
> Why only those two?  Might as well make all the accum functions look alike.

Yeah, there might be some others we could improve. float4_accum() and
float8_accum() look like they could be improved pretty easily, and
do_numeric_accum() should also be fixable with some hackery. I suppose
it's also worth optimizing int2_sum(), int4_sum() and int8_sum(). I'll
send a patch for this later today or tomorrow. Are there any other
transition functions where we can apply this technique?

BTW, int2_avg_accum() and int4_avg_accum() patch applied to HEAD.

-Neil

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: DELETE ... USING
Next
From: Neil Conway
Date:
Subject: Re: DELETE ... USING