RFR: 8282365: Optimize divideUnsigned and remainderUnsigned for constants [v30]

Emanuel Peter epeter at openjdk.org
Mon Oct 23 06:02:54 UTC 2023


On Sat, 21 Oct 2023 15:23:15 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> @merykitty Can you show performance numbers with latest changes?
>
> @vnkozlov Can you verify if the error has been resolved? I have added 2 cases when the dividends are provably bounded, and here is the result of the latest patch on my AMD Ryzen 7 7700.
> 
>                                                                                       Before              After
>     Benchmark                                        (BUFFER_SIZE)  Mode  Cnt     Score     Error     Score    Error  Units   Change
>     IntegerDivMod.testDivideConstant                          1024  avgt    5   102.296 ±   0.509    89.752 ±  0.934  ns/op  -12.26%
>     IntegerDivMod.testDivideConstantBounded                   1024  avgt    5   119.249 ±   1.479    49.908 ±  0.363  ns/op  -58.15%
>     IntegerDivMod.testDivideUnsignedConstant                  1024  avgt    5  1158.261 ±   3.751    92.269 ±  0.980  ns/op  -92.03%
>     IntegerDivMod.testDivideUnsignedConstantBounded           1024  avgt    5  1160.531 ±   6.941    28.073 ±  0.144  ns/op  -97.58%
>     IntegerDivMod.testRemainderUnsignedConstant               1024  avgt    5  1180.825 ±  35.549   127.642 ±  1.561  ns/op  -89.19%
>     LongDivMod.testDivideConstantBounded                      1024  avgt    5   591.165 ±  22.569   104.507 ±  0.606  ns/op  -82.32%
>     LongDivMod.testDivideUnsignedConstant                     1024  avgt    5  1768.345 ±  15.068   532.097 ±  9.144  ns/op  -69.91%
>     LongDivMod.testDivideUnsignedConstantBounded              1024  avgt    5  1354.547 ±  11.357    83.710 ±  0.780  ns/op  -93.82%
>     LongDivMod.testRemainderUnsignedConstant                  1024  avgt    5  1742.673 ±  29.557   736.080 ± 22.306  ns/op  -57.76%

@merykitty I think you should get some more reviews than 2. This is quite a difficult PR to review from the math side.

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

PR Comment: https://git.openjdk.org/jdk/pull/9947#issuecomment-1774486216


More information about the hotspot-compiler-dev mailing list