Re: Performance optimization of btree binary search - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Performance optimization of btree binary search
Date
Msg-id 15883.1386257656@sss.pgh.pa.us
Whole thread Raw
In response to Re: Performance optimization of btree binary search  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Performance optimization of btree binary search
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> I was actually thinking about making Datum (and some other types we
> have) structs or unions. Currently it's far, far to easy to mix them. We throw
> away pretty much all of the little typesafety C has by typedef'ing them
> to integral types with lots of autocasting behaviour.

That's intentional; on many ABIs, making Datum a struct would be
catastrophic performance-wise because it would not be eligible for simple
register pass or return conventions.  In any case, the number of bugs
I can remember that such a thing would've prevented is negligible.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Kohei KaiGai
Date:
Subject: Re: shared memory message queues
Next
From: Tom Lane
Date:
Subject: Re: Proposal: variant of regclass