Re: PQunescapeBytea tweak

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adam Kavan <akavan(at)cox(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: PQunescapeBytea tweak
Date: 2003-10-31 02:57:31
Message-ID: 5593.1067569051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Adam Kavan <akavan(at)cox(dot)net> writes:
> This patch converts PQunescapeBytea from using arrays to the text string
> and to the output binary string to using pointers. This makes it much
> faster than the older version for large Bytea's.

What compiler and optimization settings are you using, and what is the
hardware platform? It seems strange to me that you would get any
noticeable speedup from this change. Most C compilers are supposed to
be reasonably smart about optimizing subscripted pointers.

Also, how about using tmpbuf as the moving pointer, instead of
interchanging the roles of tmpbuf and buffer as you did? That
seems a bit confusing.

Finally, as Bruce noted, we prefer diff -c output for patches.
It's safer to apply that way --- the plain diff format fails
too easily if there have been any nearby changes.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Larry Rosenman 2003-10-31 15:38:25 UnixWare UP3 compiler detection patch
Previous Message Bruce Momjian 2003-10-31 01:55:46 Re: PQunescapeBytea tweak