Re: avg(int2) and avg(int8) micro-opt

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: avg(int2) and avg(int8) micro-opt
Date: 2005-04-05 00:09:42
Message-ID: 4251D746.30601@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-04-05 01:07:58 Re: DELETE ... USING
Previous Message Niels Breet 2005-04-04 20:21:41 tools/entab/halt.c compile fix