RFR(S): 8076284: Improve vectorization of parallel streams
Civlin, Jan
jan.civlin at intel.com
Mon Apr 13 10:33:09 UTC 2015
Hi All,
We would like to contribute the improvement of vectorization of parallel streams from Intel.
The contribution Bug ID: 8076284.
Please review this patch:
Bug-id: https://bugs.openjdk.java.net/browse/JDK-8076284
webrev: http://cr.openjdk.java.net/~kvn/8076284/webrev/
Description
Improve vectorization of the unordered parallel streams (by vectorizing forEachRemaining method).
For example, this forEach will be vectorized:
java.util.stream.IntStream iStream = java.util.stream.IntStream.range(0, RANGE - 1).parallel();
iStream.forEach( id -> c[id] = c[id] + c[id+1] );
It also enables on-demand loop vectorization in a given method (by providing more hints to SuperWord optimization).
For example, use -XX:CompileCommand=option,computeCall,Vectorize to vectorize this loop
void computeCall(double [] Call, double puByDf, double pdByDf)
{
for(int i = timeStep; i > 0; i--)
for(int j = 0; j <= i - 1; j++)
Call[j] = puByDf * Call[j + 1] + pdByDf * Call[j];
}
This enhancement is contributed by Intel and sponsored by the hotspot compiler team.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150413/6fe76ebf/attachment.html>
More information about the hotspot-compiler-dev
mailing list