Re: [PATCHES] TODO item: Implement Boyer-Moore searching (First time hacker)

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: David Rowley <dgrowley(at)gmail(dot)com>
Cc: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 'Peter Eisentraut' <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] TODO item: Implement Boyer-Moore searching (First time hacker)
Date: 2008-09-11 07:20:50
Message-ID: 48C8C6D2.2010809@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

David Rowley wrote:
> The thing that surprised me was that string_to_array didn't perform as well.
> I expected single character searches to perform a little better. I can't
> think why it would be slower now.

Yes, that's strange. I tried to reproduce that here, with a CVS snapshot
before the patch, and after. With quick testing with psql and \timing
and the same query you had in that spreadsheet, I couldn't see that kind
of performance degradation. Oprofile suggests that, on the contrary,
slightly less time is spent in text_position_next() after the patch, and
slightly more in text_position_setup(). Together they account for ~10%
of CPU time in both tests, so a small difference there would be
insignificant anyway in that test case.

I think we're fine.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2008-09-11 08:38:21 Re: Transaction Snapshots and Hot Standby
Previous Message Heikki Linnakangas 2008-09-11 06:24:57 Re: Transaction Snapshots and Hot Standby

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2008-09-11 12:39:01 Re: still alive?
Previous Message Alex Hunsaker 2008-09-11 04:17:31 Re: hash index improving v3