RFR: jsr166 integration 2018-06

Paul Sandoz paul.sandoz at oracle.com
Mon Jun 25 16:09:00 UTC 2018



> On Jun 24, 2018, at 1:29 PM, Doug Lea <dl at cs.oswego.edu> wrote:
> 
> On 06/22/2018 01:28 PM, Paul Sandoz wrote:
> 
>>> 8203864: Execution error in Java's Timsort
>>> http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integration/TimSort/index.html
>>> https://bugs.openjdk.java.net/browse/JDK-8203864
>>> 
>> 
>> 406             if (n > 0 && runLen[n-1] <= runLen[n] + runLen[n+1] ||
>> 407                 n > 1 && runLen[n-2] <= runLen[n] + runLen[n-1]) {
>> 408                 if (runLen[n - 1] < runLen[n + 1])
>> 409                     n--;
>> 
>> Minor comment, would be good if consistent style is used for the index expressions. I have a marginal preference to retaining ordering from a “picture this in my head" kind of thing, specifically:
>> 
>>  runLen[n - 2] <= runLen[n - 1] + runLen[n]
> 
> I marginally agree, but I'm keeping it this way just for boring
> consistency with published versions.
> 

Ok, consistency overrules!

Paul.



More information about the core-libs-dev mailing list