On Jun 4, 2015, at 12:54 PM, Chris Hegarty <chris.hega...@oracle.com> wrote:

> This is a review request to add better test failure output to 
> jdk/test/java/util/Arrays/ParallelPrefix.java
> 

Looks ok. 

Printing the content should give some clues, but i expect it's only with some 
focused repeated execution on an appropriate machine that one is really gonna 
find out what is going on.


Some additional things to consider, if you so desire.

If you wanna go the extra mile it's useful for the data provider to supply a 
string description argument summarizing the test data.

You might want to size the arrays in proportion to the parallelism since the 
threshold is calculated as:

this.threshold =
        (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
        <= MIN_PARTITION ? MIN_PARTITION : p;

So for a large machine with say a parallelism of 2^5 an array size of 2^12 is 
not sufficient to go above MIN_PARTITION.

Paul.

Reply via email to