RFR: 8268231: Aarch64: Use ldp in intrinsics for String.compareTo [v5]
Wu Yan
wuyan at openjdk.java.net
Wed Aug 4 09:40:36 UTC 2021
On Wed, 4 Aug 2021 03:29:40 GMT, Nick Gasson <ngasson at openjdk.org> wrote:
> Please provide the updated benchmark results for this version. Are you able to test it on several different machines?
We tested this version on Raspberry Pi 4B.
base:
Benchmark (diff_pos) (size) Mode Cnt Score Error Units
StringCompare.compareLLDiffStrings 7 256 avgt 5 14.882 ? 0.157 us/op
StringCompare.compareLLDiffStrings 15 256 avgt 5 15.514 ? 0.094 us/op
StringCompare.compareLLDiffStrings 31 256 avgt 5 16.756 ? 0.050 us/op
StringCompare.compareLLDiffStrings 47 256 avgt 5 18.196 ? 0.727 us/op
StringCompare.compareLLDiffStrings 63 256 avgt 5 20.110 ? 0.075 us/op
StringCompare.compareLLDiffStrings 127 256 avgt 5 31.458 ? 0.032 us/op
StringCompare.compareLLDiffStrings 255 256 avgt 5 53.099 ? 1.212 us/op
StringCompare.compareUUDiffStrings 7 256 avgt 5 15.419 ? 0.012 us/op
StringCompare.compareUUDiffStrings 15 256 avgt 5 16.761 ? 0.078 us/op
StringCompare.compareUUDiffStrings 31 256 avgt 5 20.132 ? 0.112 us/op
StringCompare.compareUUDiffStrings 47 256 avgt 5 27.492 ? 0.104 us/op
StringCompare.compareUUDiffStrings 63 256 avgt 5 32.147 ? 0.028 us/op
StringCompare.compareUUDiffStrings 127 256 avgt 5 56.208 ? 0.016 us/op
StringCompare.compareUUDiffStrings 255 256 avgt 5 100.439 ? 0.782 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 7 256 avgt 5 15.441 ? 0.071 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 15 256 avgt 5 16.781 ? 0.192 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 31 256 avgt 5 20.109 ? 0.010 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 47 256 avgt 5 27.463 ? 0.068 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 63 256 avgt 5 32.168 ? 0.064 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 127 256 avgt 5 56.283 ? 0.551 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 255 256 avgt 5 100.419 ? 0.914 us/op
opt:
Benchmark (diff_pos) (size) Mode Cnt Score Error Units
StringCompare.compareLLDiffStrings 7 256 avgt 5 14.064 ? 0.048 us/op
StringCompare.compareLLDiffStrings 15 256 avgt 5 16.079 ? 0.041 us/op
StringCompare.compareLLDiffStrings 31 256 avgt 5 17.413 ? 0.033 us/op
StringCompare.compareLLDiffStrings 47 256 avgt 5 18.750 ? 0.012 us/op
StringCompare.compareLLDiffStrings 63 256 avgt 5 20.093 ? 0.052 us/op
StringCompare.compareLLDiffStrings 127 256 avgt 5 27.432 ? 0.009 us/op
StringCompare.compareLLDiffStrings 255 256 avgt 5 44.832 ? 0.173 us/op
StringCompare.compareUUDiffStrings 7 256 avgt 5 16.071 ? 0.028 us/op
StringCompare.compareUUDiffStrings 15 256 avgt 5 18.082 ? 0.015 us/op
StringCompare.compareUUDiffStrings 31 256 avgt 5 20.753 ? 0.006 us/op
StringCompare.compareUUDiffStrings 47 256 avgt 5 25.427 ? 0.051 us/op
StringCompare.compareUUDiffStrings 63 256 avgt 5 28.170 ? 0.091 us/op
StringCompare.compareUUDiffStrings 127 256 avgt 5 42.809 ? 0.143 us/op
StringCompare.compareUUDiffStrings 255 256 avgt 5 75.056 ? 0.741 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 7 256 avgt 5 16.132 ? 0.195 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 15 256 avgt 5 17.423 ? 0.023 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 31 256 avgt 5 20.102 ? 0.112 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 47 256 avgt 5 25.529 ? 0.367 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 63 256 avgt 5 26.804 ? 0.051 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 127 256 avgt 5 40.988 ? 0.425 us/op
StringCompare.compareUUDiffStringsTurnOffCCP 255 256 avgt 5 77.157 ? 0.187 us/op
On the Raspberry Pi, the improvement is more obvious when the diff_pos is above 127.
> I meant the earlier String.compareTo that this is partially replacing. This one might be fine but I just wanted to check it had be thoroughly tested. For reference they were:
>
> https://bugs.openjdk.java.net/browse/JDK-8215100
> https://bugs.openjdk.java.net/browse/JDK-8237524
> https://bugs.openjdk.java.net/browse/JDK-8218966
Thank you for your reminder. This version can pass these three test cases. In addition, we tested tier1-tier3 and no new test cases fail.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4722
More information about the hotspot-compiler-dev
mailing list