cpplib: some size reductions
Richard Henderson
rth@cygnus.com
Thu Oct 28 15:02:00 GMT 1999
On Thu, Oct 28, 1999 at 01:11:46PM -0700, Zack Weinberg wrote:
> I believe gcc only cares about the absolute number of entries in the
> switch, not the sparseness. However, it would be easier to read with
> a switch, and it ought to be relatively easy to teach the compiler to
> consider table sparseness too...
No, there's code in there for sparseness. It's just hard to trigger.
else if (TREE_INT_CST_HIGH (range) != 0
|| count < (unsigned int) CASE_VALUES_THRESHOLD
|| ((unsigned HOST_WIDE_INT) (TREE_INT_CST_LOW (range))
> 10 * count)
Gcc wants 10% occupancy before it resorts to binary search.
r~
More information about the Gcc-patches
mailing list