From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: appendStringInfoString() micro-opt |
Date: | 2004-01-26 19:56:40 |
Message-ID: | 200401261956.i0QJueB26959@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
> > This patch replaces a bunch of call sites of appendStringInfo() with
> > appendStringInfoString().
>
> I doubt this saves enough cycles to be worth doing, but if it floats
> your boat ...
>
> When I'm tempted to make a dubious micro-optimization, I always ask
> myself "is it likely that the sum of all machine time saved by this
> change will exceed the amount of person-time I am about to put into
> making it?" Given the number of places you're talking about touching,
> and the fact that I've never seen appendStringInfo placing high on a
> profile, I suspect this doesn't pass that test.
>
> I'm not objecting to your doing it, exactly, just suggesting that there
> are better things to spend your time on.
Of course, if it makes the code clearer, that is a win in itself.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-01-26 20:28:31 | Re: appendStringInfoString() micro-opt |
Previous Message | Peter Eisentraut | 2004-01-26 18:02:59 | Re: Clarify libpq docs |