Thread: Re: [HACKERS] regression bigtest needs very long time

Re: [HACKERS] regression bigtest needs very long time

From
Michael Robinson
Date:
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