Re: [PATCH] backend: compare word-at-a-time in bcTruelen

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Jeremy Kerr <jk(at)ozlabs(dot)org>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Subject: Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Date: 2009-06-26 15:03:11
Message-ID: 80F3A08D-54AC-4E6B-AAF9-D64F14FD324C@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le 26 juin 09 à 14:47, Jeremy Kerr a écrit :
> For the new function to be faster, we need to know that there are more
> than 6 (on average, depending on alignment) trailing spaces.

It's becoming somewhat tricky, but maybe the test to do for the
optimisation to get used is n >= threshold && str[n-6] == 0x20, àla
Boyer/Moore?

I call it tricky because you could have a space here which isn't
followed by spaces, but still, if it's not a space here, you're saying
we should not even try the optimisation.

--
dim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tomas 2009-06-26 15:29:06 Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Previous Message Tom Lane 2009-06-26 14:23:41 Re: gettext version problem exposed by buildfarm failures on "canary"