List:Commits« Previous MessageNext Message »
From:Roy Lyseng Date:April 26 2010 7:44am
Subject:Re: patches for BUG#50595 (diff -u format)
View as plain text  

Guilhem Bichot wrote:

>> Patch "remove_floor"
>> =============
>>
>> * I agree that to remove the floor() call should be fine since this is 
>> anyway just a cost estimate. Still, the crash that this introduced 
>> needs to be investigated.
>>
>> * An alternative to your proposal that both would preserve the "round 
>> down" effect and possibly also could save a cycle or two could be to 
>> change the expression to use integer arithmetic. Something like this:
>>
>>     tmp*= (1.0 + (cache_record_length(join,idx) *
>>                           static_cast<uint64_t>(record_count) /
>>                             thd->variables.join_buff_size));
>>
>>   An added benefit is that the subselect3 test passes :-)
> 
> I had tried this too, but later abandoned it. I feared that uint64's 
> range (1E10) is so much smaller than double's range (1E308) that there 
> would be overflow in some calculations. And also it was slower than just 
> removing floor().
> 
Value range of uint64 will definitely be large enough here. The multiplication 
is calculating the cache size, and that will always be contained in a 64-bit 
integer. What is worse is the poor performance...

Roy
Thread
patches for BUG#50595 (diff -u format)Guilhem Bichot18 Apr
  • Re: patches for BUG#50595 (diff -u format)Olav Sandstaa20 Apr
    • Re: patches for BUG#50595 (diff -u format)Guilhem Bichot23 Apr
      • Re: patches for BUG#50595 (diff -u format)Olav Sandstaa23 Apr
        • Re: patches for BUG#50595 (diff -u format)Tor Didriksen23 Apr
      • Re: patches for BUG#50595 (diff -u format)Roy Lyseng26 Apr
  • Re: patches for BUG#50595 (diff -u format)Roy Lyseng21 Apr
    • Re: patches for BUG#50595 (diff -u format)Guilhem Bichot26 Apr
    • Re: patches for BUG#50595 (diff -u format)Guilhem Bichot26 Apr
    • new review needed Re: patches for BUG#50595 (diff -u format)Guilhem Bichot27 Apr
      • Re: new review needed Re: patches for BUG#50595 (diff -u format)Olav Sandstaa27 Apr
        • Re: new review needed Re: patches for BUG#50595 (diff -u format)Guilhem Bichot27 Apr