On Tue, Dec 21, 2010 at 10:15:41PM -0500, Robert Haas wrote:
> A little benchmarking reveals that on my system (MacOS X 10.6.5) it
> appears that strncmp() is faster for a 4 character string, but
> memcmp() is faster for a 5+ character string.
Good call; I hadn't considered that possibility.
> So
Robert Haas writes:
> On Tue, Dec 21, 2010 at 10:24 PM, Tom Lane wrote:
>> I'm fairly uncomfortable about the broad swath and low return of this
>> patch. Noah is assuming that none of these places are relying on
>> strncmp to stop short upon finding a null, and I don't believe that
>> that's a
On Tue, Dec 21, 2010 at 10:24 PM, Tom Lane wrote:
> Robert Haas writes:
>> If it's done properly, I don't see how this would be a risk.
>
> I'm fairly uncomfortable about the broad swath and low return of this
> patch. Noah is assuming that none of these places are relying on
> strncmp to stop s
Robert Haas writes:
> If it's done properly, I don't see how this would be a risk.
I'm fairly uncomfortable about the broad swath and low return of this
patch. Noah is assuming that none of these places are relying on
strncmp to stop short upon finding a null, and I don't believe that
that's a s
On Tue, Dec 21, 2010 at 6:24 PM, Robert Haas wrote:
> On Mon, Dec 20, 2010 at 1:10 PM, Noah Misch wrote:
>> When the caller knows the smaller string length, memcmp and strncmp are
>> functionally equivalent. Since memcmp need not watch each byte for a NULL
>> terminator, it often compares a CPU
On Tue, Dec 21, 2010 at 9:01 PM, Robert Haas wrote:
> On Tue, Dec 21, 2010 at 8:29 PM, Gurjeet Singh
> wrote:
> > On Tue, Dec 21, 2010 at 6:24 PM, Robert Haas
> wrote:
> >>
> >> On Mon, Dec 20, 2010 at 1:10 PM, Noah Misch wrote:
> >> > When the caller knows the smaller string length, memcmp an
On Tue, Dec 21, 2010 at 8:29 PM, Gurjeet Singh wrote:
> On Tue, Dec 21, 2010 at 6:24 PM, Robert Haas wrote:
>>
>> On Mon, Dec 20, 2010 at 1:10 PM, Noah Misch wrote:
>> > When the caller knows the smaller string length, memcmp and strncmp are
>> > functionally equivalent. Since memcmp need not w
On Tue, Dec 21, 2010 at 6:24 PM, Robert Haas wrote:
> On Mon, Dec 20, 2010 at 1:10 PM, Noah Misch wrote:
> > When the caller knows the smaller string length, memcmp and strncmp are
> > functionally equivalent. Since memcmp need not watch each byte for a
> NULL
> > terminator, it often compares
On Mon, Dec 20, 2010 at 1:10 PM, Noah Misch wrote:
> When the caller knows the smaller string length, memcmp and strncmp are
> functionally equivalent. Since memcmp need not watch each byte for a NULL
> terminator, it often compares a CPU word at a time for better performance.
> The
> attached
When the caller knows the smaller string length, memcmp and strncmp are
functionally equivalent. Since memcmp need not watch each byte for a NULL
terminator, it often compares a CPU word at a time for better performance. The
attached patch changes use of strncmp to memcmp where we have the length
10 matches
Mail list logo