RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

fabioromano1 duke at openjdk.org
Fri Aug 2 06:41:40 UTC 2024


On Fri, 2 Aug 2024 06:31:05 GMT, fabioromano1 <duke at openjdk.org> wrote:

> Mmh, benchmarks show a slight slowdown with the iterative variant (except for the XS case). I tried several times, this one is the most favorable run:
> 
> ```
> Benchmark                        Mode  Cnt      Score     Error  Units
> BigIntegerSquareRoot.testSqrtL   avgt   15   2862.103 ?  14.482  ns/op
> BigIntegerSquareRoot.testSqrtM   avgt   15    767.569 ?  22.197  ns/op
> BigIntegerSquareRoot.testSqrtS   avgt   15    249.484 ?  48.970  ns/op
> BigIntegerSquareRoot.testSqrtXL  avgt   15  22324.068 ? 147.290  ns/op
> BigIntegerSquareRoot.testSqrtXS  avgt   15      4.815 ?   0.108  ns/op
> ```

Probably it's due to the different splitting of the input array.

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

PR Comment: https://git.openjdk.org/jdk/pull/19710#issuecomment-2264670506


More information about the core-libs-dev mailing list