From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jeremy Kerr <jk(at)ozlabs(dot)org>, "<pgsql-hackers(at)postgresql(dot)org>" <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
Subject: | Re: [PATCH] backend: compare word-at-a-time in bcTruelen |
Date: | 2009-06-16 12:47:08 |
Message-ID: | 407d949e0906160547w28578245m8e937ce791ad2b83@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 16, 2009 at 1:41 PM, Stephen Frost<sfrost(at)snowman(dot)net> wrote:
>
> Ah, you may be half right there (see below). It does appear to be
> assuming that char *s (or s[i == 0]) is aligned, which isn't a
> guarentee (in fact, it might never be right..). If having it actually
> aligned is an important bit (as opposed to just doing the comparisons in
> larger but possibly unaligned blocks) then that'd make a difference.
On some architectures like intel accessing unaligned ints is just
slow. On others (Alpha and PPC iirc?) it is an immediate bus error.
I would actually be more curious whether we can do th e comparison
without having to pre-scan for the spaces at the end than trying to
opimize that prescan.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2009-06-16 12:53:28 | Re: machine-readable explain output |
Previous Message | Stephen Frost | 2009-06-16 12:46:30 | Re: [PATCH] backend: compare word-at-a-time in bcTruelen |