[aarch64-port-dev ] RFR(S): 8239914: AArch64: Combine add/sub with comparison against zero
Pengfei Li
Pengfei.Li at arm.com
Thu Feb 27 12:35:29 UTC 2020
Hi,
Thanks for your review.
> This looks good, but it's hard to say without JMH tests. We really can't say
> very much about performance enhancements without measurements.
Here's a JMH for this pattern.
http://cr.openjdk.java.net/~pli/rfr/8239914/CmnCmp.java
[Before]
Benchmark Mode Cnt Score Error Units
CmnCmp.testCmnInt avgt 15 136.047 ± 13.069 us/op
CmnCmp.testCmnLong avgt 15 136.046 ± 13.072 us/op
CmnCmp.testCmpInt avgt 15 136.061 ± 13.063 us/op
CmnCmp.testCmpLong avgt 15 136.051 ± 13.067 us/op
[After]
Benchmark Mode Cnt Score Error Units
CmnCmp.testCmnInt avgt 15 117.773 ± 10.327 us/op
CmnCmp.testCmnLong avgt 15 117.766 ± 10.334 us/op
CmnCmp.testCmpInt avgt 15 117.778 ± 10.316 us/op
CmnCmp.testCmpLong avgt 15 117.778 ± 10.315 us/op
I don't expect to see obvious performance enhancements in real workloads.
This just helps to save one instruction. Ok to push?
--
Thanks,
Pengfei
More information about the aarch64-port-dev
mailing list