RFR: 8334474: RISC-V: verify perf of ExpandBits/CompressBits (rvv) [v2]

Ludovic Henry luhenry at openjdk.org
Tue Nov 19 15:05:58 UTC 2024


On Thu, 14 Nov 2024 14:05:42 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi, 
>> Can you help to review the patch?
>> It removes the previous added intrinsic for Long/Integer.expand/compress, as on several real hardware, I observe obvious performance regression.
>> 
>> Thanks
>> 
>> ## Performance
>> Tests on bananapi, for other platform, please check jbs issue for test data.
>> 
>> ### Before
>> data
>> <google-sheets-html-origin style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
>> Benchmark - keep intrinsic | (maxNumbits) | (size) | Mode | Cnt | Score | Error | Units
>> -- | -- | -- | -- | -- | -- | -- | --
>> o.o.b.j.lang.Integers.compress | N/A | 500 | avgt | 10 | 11710.439 | 17.936 | ns/op
>> o.o.b.j.lang.Integers.expand | N/A | 500 | avgt | 10 | 14878.742 | 23.472 | ns/op
>> o.o.b.j.lang.Longs.compress | N/A | 500 | avgt | 10 | 24555.06 | 2.632 | ns/op
>> o.o.b.j.lang.Longs.expand | N/A | 500 | avgt | 10 | 35827.714 | 25.022 | ns/op
>> 
>> </google-sheets-html-origin>
>> 
>> 
>> ### After
>> data
>> <google-sheets-html-origin style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
>> Benchmark - remove intrinsic | (maxNumbits) | (size) | Mode | Cnt | Score | Error | Units
>> -- | -- | -- | -- | -- | -- | -- | --
>> o.o.b.j.lang.Integers.compress | N/A | 500 | avgt | 10 | 9294.835 | 1.459 | ns/op
>> o.o.b.j.lang.Integers.expand | N/A | 500 | avgt | 10 | 5749.835 | 0.945 | ns/op
>> o.o.b.j.lang.Longs.compress | N/A | 500 | avgt | 10 | 4735.15 | 1.082 | ns/op
>> o.o.b.j.lang.Longs.expand | N/A | 500 | avgt | 10 | 5668.552 | 2.168 | ns/op
>> 
>> </google-sheets-html-origin>
>
> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix test typo

Instead of removing, can we put it behind a flag that disabled by default? We clearly don't want to keep something that's slower for the current generation of hardware but we could expect that the next generation of hardware to go faster.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22102#issuecomment-2485962930


More information about the hotspot-compiler-dev mailing list