Re: [PATCH] backend: compare word-at-a-time in bcTruelen - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Date
Msg-id 13985.1245162236@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Greg Stark <gsstark@mit.edu>)
Responses Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Jeremy Kerr <jk@ozlabs.org>)
Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Jeremy Kerr <jk@ozlabs.org>)
Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> On some architectures like intel accessing unaligned ints is just
> slow. On others (Alpha and PPC iirc?) it is an immediate bus error.

To a first approximation, Intel is the *only* popular architecture that
doesn't bus-error on unaligned accesses.  (And I'm sure their chip
designers rue the day that their predecessors chose to allow that.)

There are some systems where the kernel trap handler then proceeds to
emulate the unaligned access for you, but that gives new meaning to the
word "slow".  You definitely don't want to be doing it in a patch that's
alleged to give a performance improvement.

Speaking of which, what about some performance numbers?  Like Heikki,
I'm quite suspicious of whether there is any real-world gain to be had
from this approach.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: machine-readable explain output
Next
From: Andres Freund
Date:
Subject: Re: machine-readable explain output