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

From Heikki Linnakangas
Subject Re: [PATCHES] TODO item: Implement Boyer-Moore searching (First time hacker)
Date
Msg-id 48C8C6D2.2010809@enterprisedb.com
Whole thread Raw
In response to Re: [PATCHES] TODO item: Implement Boyer-Moore searching (First time hacker)  ("David Rowley" <dgrowley@gmail.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Transaction Snapshots and Hot Standby
Next
From: Hannu Krosing
Date:
Subject: Re: Transaction Snapshots and Hot Standby