hash policy patch

Paolo Carlini pcarlini@gmail.com
Thu Jul 28 21:00:00 GMT 2011


Hi,

>    I forget to talk about this modification. Yes with this refactoring the float value is casted to size_t before the call to lower_bound. There is no modification here because when the float value is casted to size_t we lose only the decimal part but not the integer part. As the research is done on integer values only the integer part of __min_bkts is important. Even if __min_bkts is greater than size_t max value then the cast will always give this size_t mas value and the call to lower_bound will always give the larger prime number from the list of prime numbers.
> 
>    This is in fact even a good side effect of this patch, lower_bound will only be instantiated once with the size_t value.

Ok, thanks for the analysis. Then let's commit these bits for now.

Paolo



More information about the Libstdc++ mailing list