RFR: JDK-8318476: Add resource consumption note to BigInteger and BigDecimal

Hans Boehm hboehm at google.com
Mon Oct 23 17:19:19 UTC 2023


Since I think this is about asymptotic complexity, which is determined by
behavior on large inputs, is there a reason to talk about switching to
other algorithms on smaller inputs? We certainly don't want to get into the
habit of listing "easy case" optimizations everywhere.

I'm unclear about the extent to which BigInteger is intended to provide
running times that depend only on the size of the inputs, or whether they
can vary with the actual bits in the input. Though hard to state precisely,
this does seem to matter to cryptographers. And it sometimes seems to
matter to others, since guarantees aimed at cryptographers can slow down
other code. Is it worth stating something more in this area?

On Sat, Oct 21, 2023 at 2:14 AM Alan Bateman <alanb at openjdk.org> wrote:

> On Sat, 21 Oct 2023 00:56:21 GMT, Joe Darcy <darcy at openjdk.org> wrote:
>
> > Add informative notes to BigInteger and BigDecimal about possible
> running times, etc.
>
> The wording looks okay to me and I expect it will appear as an API note in
> BigInteger.
>
> However, for BigDecimal I suspect the h2 headings (for the next heading
> and the existing heading for IEEE 754 Decimal Arithmetic) means they won't
> look like they are part of the API note, instead they will look like new
> sections after the API note. Do you see what I mean in the generated
> javadoc?
>
> -------------
>
> Marked as reviewed by alanb (Reviewer).
>
> PR Review:
> https://git.openjdk.org/jdk/pull/16298#pullrequestreview-1691219200
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20231023/2553a5f5/attachment.htm>


More information about the core-libs-dev mailing list