Re: RFR: 8267969: Add vectorized implementation for VectorMask.eq() [v2]

2021-06-02 Thread Xiaohong Gong
On Wed, 2 Jun 2021 07:48:47 GMT, Nils Eliasson wrote: > Please wait until you have two reviewers before integrating. Sure! Thanks so much for looking at this PR! - PR: https://git.openjdk.java.net/jdk/pull/4272

Re: RFR: 8267969: Add vectorized implementation for VectorMask.eq() [v2]

2021-06-02 Thread Nils Eliasson
On Wed, 2 Jun 2021 01:56:00 GMT, Xiaohong Gong wrote: >> Currently `"VectorMask.eq()" `is not vectorized: >> >> public VectorMask eq(VectorMask m) { >> // FIXME: Generate good code here. >> return bOp(m, (i, a, b) -> a == b); >> } >> >> This can be implemented by calling

Re: RFR: 8267969: Add vectorized implementation for VectorMask.eq() [v2]

2021-06-01 Thread Xiaohong Gong
> Currently `"VectorMask.eq()" `is not vectorized: > > public VectorMask eq(VectorMask m) { > // FIXME: Generate good code here. > return bOp(m, (i, a, b) -> a == b); > } > > This can be implemented by calling `"xor(m.not())"` directly. > > The performance improved about

Re: RFR: 8267969: Add vectorized implementation for VectorMask.eq()

2021-06-01 Thread Xiaohong Gong
On Tue, 1 Jun 2021 16:29:58 GMT, Paul Sandoz wrote: > Looks. Later we may want to consider pushing this down as an intrinsic, > perhaps reusing `VectorSupport.compare`. Thanks for your review @PaulSandoz ! Yes, reusing `VectorSupport.compare` is an alternative way to do the vectorization. ---

Re: RFR: 8267969: Add vectorized implementation for VectorMask.eq()

2021-06-01 Thread Paul Sandoz
On Mon, 31 May 2021 10:25:26 GMT, Xiaohong Gong wrote: > Currently `"VectorMask.eq()" `is not vectorized: > > public VectorMask eq(VectorMask m) { > // FIXME: Generate good code here. > return bOp(m, (i, a, b) -> a == b); > } > > This can be implemented by calling `"xor(

RFR: 8267969: Add vectorized implementation for VectorMask.eq()

2021-05-31 Thread Xiaohong Gong
Currently `"VectorMask.eq()" `is not vectorized: public VectorMask eq(VectorMask m) { // FIXME: Generate good code here. return bOp(m, (i, a, b) -> a == b); } This can be implemented by calling `"xor(m.not())"` directly. The performance improved about 1.4x ~ 1.9x for the