RFR 8012647: Add Arrays.parallelPrefix (prefix sum, scan, cumulative sum)

Paul Sandoz paul.sandoz at oracle.com
Wed Jun 12 15:38:49 UTC 2013

On Jun 12, 2013, at 4:50 PM, Chris Hegarty <chris.hegarty at oracle.com> wrote:

> Add implementations of parallelPrefix() in Arrays for Object, int, long, and double arrays.
> Specdiff:
> http://cr.openjdk.java.net/~chegar/8012647/ver.00/specdiff/java/util/Arrays.html
> Webrev:
>  http://cr.openjdk.java.net/~chegar/8012647/ver.00/webrev/
> This work was done over in the lambda forest mainly by Doug Lea, with some small spec updates by myself.

The API looks fine to me.

The example text could be moved to an @apiNote.

> Note: Some work still need to be done to clean up the test, but I would like to focus mainly on the API and try to get it finalized first.

OK, i will still note some comments on the test:

1) it could be better named;

2) uses random data, and if a test fails there is no way to reproduce from that data; and

3) Could use a sprinkling of @DataProvider for various sizes, taking into account the threshold, minimum partition size and ForkJoinPool.getCommonPoolParallelism().


More information about the core-libs-dev mailing list