Re: [HACKERS] regression bigtest needs very long time - Mailing list pgsql-hackers

From Michael Robinson
Subject Re: [HACKERS] regression bigtest needs very long time
Date
Msg-id 199907030942.RAA02445@netrinsics.com
Whole thread Raw
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
>> The optimizations under discussion will not significantly affect comparison
>> speed one way or the other, so comparison speed is a moot issue.
>
>On what do you base that assertion?  I'd expect comparisons to be sped
>up significantly: no need to unpack the storage format, and the inner
>loop handles four digits per iteration instead of one.

The overwhelming majority of comparisons can be resolved just by looking
at the number of significant digits.  Ninety percent of the remainder can
be resolved after looking at the most significant digit, and so on, except
in the case of distributions that vary only in the least significant digits.

Furthermore, on big-endian architectures, four digits of packed representation
can be compared in one iteration as well.

So, I conclude the optimizations under discussion will not significantly
affect comparison speed one way or the other.
       -Michael Robinson



pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: LIMIT and UNION
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] LIMIT and UNION