Re: RFR: 8294073: Performance improvement for message digest implementations

2022-11-20 Thread John Jiang
On Tue, 20 Sep 2022 22:12:04 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > In the message digest implementation, for example SHA256, in JDK, two bitwise > operations could be improved with equivalent arithmetic, and then the number > bitwise operations could be reduced accordingly. Specifically >

Re: RFR: 8294073: Performance improvement for message digest implementations

2022-11-13 Thread Xue-Lei Andrew Fan
On Wed, 21 Sep 2022 18:29:08 GMT, Aleksey Shipilev wrote: >> @shipilev Good points and I agree with them. >> >>> Are you getting +0.8% throughput on microbenchmarks? >> >> Yes, I got it a few times. I tested on MacOS/M1 and Linux/AMD for >> 64/512/2048/16384 bytes. As the improvement is not s

Re: RFR: 8294073: Performance improvement for message digest implementations

2022-09-28 Thread Xue-Lei Andrew Fan
On Wed, 28 Sep 2022 08:12:09 GMT, Ferenc Rakoczi wrote: >> Hi, >> >> In the message digest implementation, for example SHA256, in JDK, two >> bitwise operations could be improved with equivalent arithmetic, and then >> the number bitwise operations could be reduced accordingly. Specifically >

Re: RFR: 8294073: Performance improvement for message digest implementations

2022-09-28 Thread Ferenc Rakoczi
On Tue, 20 Sep 2022 22:12:04 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > In the message digest implementation, for example SHA256, in JDK, two bitwise > operations could be improved with equivalent arithmetic, and then the number > bitwise operations could be reduced accordingly. Specifically >

Re: RFR: 8294073: Performance improvement for message digest implementations

2022-09-21 Thread Xue-Lei Andrew Fan
On Wed, 21 Sep 2022 18:29:08 GMT, Aleksey Shipilev wrote: > Maybe older X86 and AArch64 are our targets, since it is not guaranteed to > have SHA hardware intrinsics? Yes, the platforms that do not support SHA intrinsics are the targets. If I read the OpenJDK CPU code correctly, RISC-V and AR

Re: RFR: 8294073: Performance improvement for message digest implementations

2022-09-21 Thread Aleksey Shipilev
On Wed, 21 Sep 2022 15:14:22 GMT, Xue-Lei Andrew Fan wrote: > But you let me convinced that this may not be worthy of the effort. Let's think about it and not discount it right away. 1% improvement on OpenJDK scale is still quite significant, if we can show the non-interpreter modes benefit fr

Re: RFR: 8294073: Performance improvement for message digest implementations

2022-09-21 Thread Xue-Lei Andrew Fan
On Wed, 21 Sep 2022 12:06:31 GMT, Aleksey Shipilev wrote: >> Hi, >> >> In the message digest implementation, for example SHA256, in JDK, two >> bitwise operations could be improved with equivalent arithmetic, and then >> the number bitwise operations could be reduced accordingly. Specifically

Re: RFR: 8294073: Performance improvement for message digest implementations

2022-09-21 Thread Aleksey Shipilev
On Tue, 20 Sep 2022 22:12:04 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > In the message digest implementation, for example SHA256, in JDK, two bitwise > operations could be improved with equivalent arithmetic, and then the number > bitwise operations could be reduced accordingly. Specifically >

RFR: 8294073: Performance improvement for message digest implementations

2022-09-20 Thread Xue-Lei Andrew Fan
Hi, In the message digest implementation, for example SHA256, in JDK, two bitwise operations could be improved with equivalent arithmetic, and then the number bitwise operations could be reduced accordingly. Specifically "(x and y) xor ((complement x) and z)" could be replaced with the equivale