Re: Extending Java Arrays/Collection Sort API

2018-12-05 Thread Laurent Bourgès
John, Any feedback ? We could discuss that during next OpenJDK workshop, but I would prefer going slowly but surely. Laurent Le jeu. 29 nov. 2018 à 17:52, Laurent Bourgès a écrit : > Hi John & Brian, > > Thanks for the proposed approach, I agree we are in the design discussion; > adding such

Re: Extending Java Arrays/Collection Sort API

2018-11-29 Thread Laurent Bourgès
Hi John & Brian, Thanks for the proposed approach, I agree we are in the design discussion; adding such API enhancements will take time, I said 13 to not hurry for 12 (CSR...). John, you wrote me a very detailed letter, I will try to be more concise and focus on Array.sort() API. Le jeu. 29

Re: Extending Java Arrays/Collection Sort API

2018-11-28 Thread John Rose
As you noticed, I jumped into the discussion mid-stream. I've been itching to get index-based sorting into JDK ever since I tried to code Burrows-Wheeler on the JDK and saw a huge footprint overhead due to the need for a proxy object for each byte position in the file to be compressed. Here are

Re: Extending Java Arrays/Collection Sort API

2018-11-28 Thread Brian Goetz
The way we like to approach this is: first explore whether the problem is one we should solve (that's this discussion, it's going well), then design discussions (you probably have one in your back pocket already), then implementation/testing/review, and then we can think about which version to

Re: Extending Java Arrays/Collection Sort API

2018-11-28 Thread Laurent Bourgès
Hi John & Brian, Thank you for your feedback finally, we almost agree Java Sort API could be improved, in jdk13 possibly. > > Doug is right that there is an enormous potential list of sort methods, > and we can't include them all. But I do miss the ability to extract > indexes instead of

Re: Extending Java Arrays/Collection Sort API

2018-11-27 Thread John Rose
On Nov 27, 2018, at 9:49 AM, Brian Goetz wrote: > > Doug is right that there is an enormous potential list of sort methods, and > we can't include them all. But I do miss the ability to extract indexes > instead of sorting the array itself. Or, slightly more generally, sorting an int[] or

Re: Extending Java Arrays/Collection Sort API

2018-11-27 Thread Brian Goetz
Doug is right that there is an enormous potential list of sort methods, and we can't include them all.  But I do miss the ability to extract indexes instead of sorting the array itself. On 11/14/2018 3:01 AM, Laurent Bourgès wrote: Hi, I am a scientist and the author of the Marlin renderer,

Re: Extending Java Arrays/Collection Sort API

2018-11-23 Thread Laurent Bourgès
Hi, I am happy to announce that I succeeded in writing my own BentleyBasher working like a swiss clock: - auto-tune benchmark passes & hot loop to obtain high accuracy on measurements ~ 2% (guaranteed), with proper variance estimators - test > 10 sorters with small, large & very large int[]

Re: Extending Java Arrays/Collection Sort API

2018-11-20 Thread Laurent Bourgès
Hi Doug, That's a pleasure to read you. Le mar. 20 nov. 2018 à 13:17, Doug Lea a écrit : > On 11/20/18 2:50 AM, Laurent Bourgès wrote: > > Hi, > > Any feedback on improving Java Sort API ? > > I think most considerations await progress on value types. I posted some > ideas and links to code

Re: Extending Java Arrays/Collection Sort API

2018-11-20 Thread Doug Lea
On 11/20/18 2:50 AM, Laurent Bourgès wrote: > Hi, > Any feedback on improving Java Sort API ? I think most considerations await progress on value types. I posted some ideas and links to code last summer on Valhalla list: http://mail.openjdk.java.net/pipermail/valhalla-dev/2018-August/thread.html

Re: Extending Java Arrays/Collection Sort API

2018-11-19 Thread Laurent Bourgès
Hi, Any feedback on improving Java Sort API ? PS: I improved a lot the Array benchmark accuracy (confidence interval ~ 5%). Here are EA results: https://github.com/bourgesl/nearly-optimal-mergesort-code/blob/master/results/basher-results-partial.out Does anybody want to help me on this topic ?

Extending Java Arrays/Collection Sort API

2018-11-14 Thread Laurent Bourgès
Hi, I am a scientist and the author of the Marlin renderer, integrated in OpenJDK. In this renderer, I needed a fast sort algorithm on small almost sorted arrays, but more important, to deal with 2 arrays: x values and their corresponding edge indices (pointer like). I derived my MergeSort class