Re: CopyReadLineText optimization

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CopyReadLineText optimization
Date: 2008-03-08 09:35:26
Message-ID: 47D25DDE.7000405@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
>
>
> Heikki Linnakangas wrote:
>> Andrew Dunstan wrote:
>>> I'm still a bit worried about applying it unless it gets some
>>> adaptive behaviour or something so that we don't cause any serious
>>> performance regressions in some cases.
>>
>> I'll try to come up with something. At the most conservative end, we
>> could fall back to the current method on the first escape, quote or
>> backslash character.
>>
>>> Also, could we perhaps benefit from inlining some calls, or is your
>>> compiler doing that anyway?
>>
>> gcc does inline all static functions that are only called from one
>> site, and small functions, using some heuristic. I don't think more
>> aggressive inlining would help.
>>
>
> Another question that occurred to me - did you try using strpbrk() to
> look for the next interesting character rather than your homegrown
> searcher gadget? If so, how did that perform?

I haven't tried that. There's a small difference: strpbrk stops at '\0'.
But come to think of it, I guess it doesn't matter. Will test...

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Suresh 2008-03-08 16:06:18 Doubt in index scan code
Previous Message Heikki Linnakangas 2008-03-08 08:40:41 Re: Commitfest process

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2008-03-08 18:17:26 Re: CopyReadAttributesCSV optimization
Previous Message Tom Lane 2008-03-08 01:13:11 Re: Remove FATAL from pg_lzdecompress