Re: timsort

2009-07-07 Thread Martin Buchholz
On Tue, Jul 7, 2009 at 13:28, Christopher Hegarty -Sun Microsystems Ireland wrote: > Hi Martin, Josh, > > Thank you both for making these changes. > > Once we have the Blenderev I'll file a CCC request and keep you informed of > its status. > > Martin: > I'm signing off for tonight. I can create

Re: timsort

2009-07-07 Thread Christopher Hegarty -Sun Microsystems Ireland
Hi Martin, Josh, Thank you both for making these changes. Once we have the Blenderev I'll file a CCC request and keep you informed of its status. Martin: I'm signing off for tonight. I can create the Blenderrev tomorrow if you don't get a chance. Also, I think you need an additional 'option

Re: timsort

2009-07-07 Thread Martin Buchholz
Josh, thanks for the implementation notes. I modified them by - Peters's => Peters' - added a space after a comma - added a - refilled to fit into 80 cols. I also did a bit of modernization of the javadoc for the 6 related public sort methods. I addressed the issue of insufficient clarity for

Re: timsort

2009-07-07 Thread Joshua Bloch
Chris, >> >> 1) Should we update the Arrays class description and appropriate sort >> methods to now refer to timsort instead of saying: "The sorting >> algorithm is a modified mergesort...". I know this is not strictly >> necessary, but you must have considered it already, right? > > > No

Re: timsort

2009-07-07 Thread Joshua Bloch
Chris, On Tue, Jul 7, 2009 at 2:51 AM, Christopher Hegarty -Sun Microsystems Ireland wrote: > Hi Martin, > > Sorry for joining the party late... > > I think adding the system property should take care of the compatibility > issues, at least giving the user the ability to revert to the old behavi

Re: timsort

2009-07-07 Thread Joshua Bloch
2009 12:34 PM > To: Christopher Hegarty -Sun Microsystems Ireland > Cc: core-libs-dev > Subject: Re: timsort > > On Tue, Jul 7, 2009 at 08:57, Christopher Hegarty -Sun Microsystems > Ireland wrote: > > Martin Buchholz wrote: > >> > >> > >> On Tue

RE: timsort

2009-07-07 Thread Joel Kamentz
Behalf Of Martin Buchholz Sent: Tuesday, July 07, 2009 12:34 PM To: Christopher Hegarty -Sun Microsystems Ireland Cc: core-libs-dev Subject: Re: timsort On Tue, Jul 7, 2009 at 08:57, Christopher Hegarty -Sun Microsystems Ireland wrote: > Martin Buchholz wrote: >> >> >&g

Re: timsort

2009-07-07 Thread David Holmes - Sun Microsystems
Martin Buchholz said the following on 07/08/09 02:33: + * @throws IllegalArgumentException if the natural order of the array + * elements is found to violate the {...@link Comparable} contract So the proposed spec does not and cannot require any exception to be thrown. What is pr

Re: timsort

2009-07-07 Thread Martin Buchholz
On Tue, Jul 7, 2009 at 08:57, Christopher Hegarty -Sun Microsystems Ireland wrote: > Martin Buchholz wrote: >> >> >> On Tue, Jul 7, 2009 at 07:35, Christopher Hegarty -Sun Microsystems >> Ireland >> >> >> >>           2) With the addition of @throws IllegalArgumentException, this >>             con

Re: timsort

2009-07-07 Thread Christopher Hegarty -Sun Microsystems Ireland
Martin Buchholz wrote: On Tue, Jul 7, 2009 at 07:35, Christopher Hegarty -Sun Microsystems Ireland 2) With the addition of @throws IllegalArgumentException, this condition cannot be met with the old merge sort right, i.e. running with -Djava.util.

Re: timsort

2009-07-07 Thread Martin Buchholz
On Tue, Jul 7, 2009 at 07:35, Christopher Hegarty -Sun Microsystems Ireland > > >> >>2) With the addition of @throws IllegalArgumentException, this >> condition cannot be met with the old merge sort right, i.e. running >> with -Djava.util.Arrays.useLegacyMergeSort=true. So we're sayin

Re: timsort

2009-07-07 Thread Christopher Hegarty -Sun Microsystems Ireland
comments inline... Martin Buchholz wrote: [+jjb] (Please keep Josh in this thread - he is the primary author) On Tue, Jul 7, 2009 at 02:51, Christopher Hegarty -Sun Microsystems Ireland > wrote: Hi Martin, Sorry for joining the party late...

Re: timsort

2009-07-07 Thread Andrew John Hughes
2009/7/7 Christopher Hegarty -Sun Microsystems Ireland : > > > Andrew John Hughes wrote: >> >> [snip] >> >> Forgive the naivety, but what is a 'CCC request'?  Is this process of >> requesting and approving specification changes public?  I'm sure I'm >> not alone among those contributing to the JDK

Re: timsort

2009-07-07 Thread Martin Buchholz
[+jjb] (Please keep Josh in this thread - he is the primary author) On Tue, Jul 7, 2009 at 02:51, Christopher Hegarty -Sun Microsystems Ireland wrote: > Hi Martin, > > Sorry for joining the party late... > > I think adding the system property should take care of the compatibility > issues, at

Re: timsort

2009-07-07 Thread Christopher Hegarty -Sun Microsystems Ireland
Andrew John Hughes wrote: [snip] Forgive the naivety, but what is a 'CCC request'? Is this process of requesting and approving specification changes public? I'm sure I'm not alone among those contributing to the JDK only since its inception as OpenJDK and thus unaware of such procedures, so

Re: timsort

2009-07-07 Thread Andrew John Hughes
2009/7/7 Christopher Hegarty -Sun Microsystems Ireland : > Hi Martin, > > Sorry for joining the party late... > > I think adding the system property should take care of the compatibility > issues, at least giving the user the ability to revert to the old behavior > if they so choose. > > I have a f

Re: timsort

2009-07-07 Thread Christopher Hegarty -Sun Microsystems Ireland
Hi Martin, Sorry for joining the party late... I think adding the system property should take care of the compatibility issues, at least giving the user the ability to revert to the old behavior if they so choose. I have a few minor comments ( if these issue have been discussed already I ap

Re: timsort

2009-07-06 Thread Martin Buchholz
No one actually said NO, but both Alan and Andrew strongly hinted that a backward compatibility mode would be good. So I kept the old implementation and allow it to be selectable via a system property. There's nothing more compatible than the legacy implementation. /** * Old merge sort i

Re: timsort

2009-06-30 Thread Andrew John Hughes
2009/6/30 Martin Buchholz : > > > On Tue, Jun 30, 2009 at 09:24, Andrew John Hughes > wrote: >> >> 2009/6/30 Martin Buchholz : >> >> > (There is the deeper governance issue of who gets to make >> > such decisions.  I would like most of such decisions to be made >> > by the "group" of engineers who

Re: timsort

2009-06-30 Thread Martin Buchholz
On Tue, Jun 30, 2009 at 11:32, Andrew Haley wrote: > Martin Buchholz wrote: > > > Right. There is a problem when different sets of contributors have > > different objectives for things like compatibility, portability, > > stability, benchmark performance > > > It might be that a significant

Re: timsort

2009-06-30 Thread Andrew Haley
Martin Buchholz wrote: > > > On Tue, Jun 30, 2009 at 09:24, Andrew John Hughes > mailto:gnu_and...@member.fsf.org>> wrote: > > 2009/6/30 Martin Buchholz >: > > > (There is the deeper governance issue of who gets to make > > such decisions. I would l

Re: timsort

2009-06-30 Thread Alan Bateman
Martin Buchholz wrote: : As you suggested, I added the Classpath exception wording to TimSort.java and ComparableTimSort.java. I excised the old mergesort code from Arrays.java. webrev regenerated. Thanks for doing this. Adding all-or-nothing wording would be good to add, perhaps to the cla

Re: timsort

2009-06-30 Thread Martin Buchholz
On Tue, Jun 30, 2009 at 10:03, Jason Mehrens wrote: > Martin, > > Regarding this IAE issue, another approach might be given non > null Comparator 'c': > > if(c.getClass().desiredAssertionStatus()) { > throw new AssertionError("."); > } > > Then there is no compatibility problem,no need to a

Re: timsort

2009-06-30 Thread Martin Buchholz
On Tue, Jun 30, 2009 at 09:24, Andrew John Hughes wrote: > 2009/6/30 Martin Buchholz : > > > (There is the deeper governance issue of who gets to make > > such decisions. I would like most of such decisions to be made > > by the "group" of engineers who do the work. For > collections/concurrenc

RE: timsort

2009-06-30 Thread Jason Mehrens
Martin, Regarding this IAE issue, another approach might be given non null Comparator 'c': if(c.getClass().desiredAssertionStatus()) { throw new AssertionError("."); } Then there is no compatibility problem,no need to add a new switch to the JDK, and the coder gets smacked wi

Re: timsort

2009-06-30 Thread Andrew John Hughes
2009/6/30 Andrew Haley : > Martin Buchholz wrote: >> Thanks, Alan.  You're a good reviewer. >> >> As you suggested, I added the Classpath exception wording >> to TimSort.java and ComparableTimSort.java. >> >> I excised the old mergesort code from Arrays.java. >> >> webrev regenerated. >> >> Adding

Re: timsort

2009-06-30 Thread Andrew Haley
Martin Buchholz wrote: > Thanks, Alan. You're a good reviewer. > > As you suggested, I added the Classpath exception wording > to TimSort.java and ComparableTimSort.java. > > I excised the old mergesort code from Arrays.java. > > webrev regenerated. > > Adding all-or-nothing wording would be g

Re: timsort

2009-06-30 Thread Andrew John Hughes
2009/6/30 Martin Buchholz : > Thanks, Alan.  You're a good reviewer. > > As you suggested, I added the Classpath exception wording > to TimSort.java and ComparableTimSort.java. > > I excised the old mergesort code from Arrays.java. > > webrev regenerated. > > Adding all-or-nothing wording would be

Re: timsort

2009-06-30 Thread Martin Buchholz
Thanks, Alan. You're a good reviewer. As you suggested, I added the Classpath exception wording to TimSort.java and ComparableTimSort.java. I excised the old mergesort code from Arrays.java. webrev regenerated. Adding all-or-nothing wording would be good to add, perhaps to the class-level java

Re: timsort

2009-06-30 Thread Alan Bateman
Martin Buchholz wrote: Hi sort team! Google would like to contribute a new implementation for sorting of Object arrays, which has much better performance for input that is already partially sorted, based on Tim Peter's sort used in Python. This sort is already being used in the java.util. th