Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex
Date
Msg-id 29065.1248131260@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex  (Greg Stark <gsstark@mit.edu>)
Responses Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> I also wonder if this microbenchmark is actually ok because it's
> testing the same value over and over so any branch-prediction will
> shine unrealistically well.

Yeah, that is a good point --- and it would benefit the unrolled loop
more than the other versions.  We should probably revise the test
harness so it mixes the size requests a bit.  I'm not sure of a suitably
simple way to do that, though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex
Next
From: Josh Berkus
Date:
Subject: Re: COPY WITH CSV FORCE QUOTE *