On Sat, 21 Oct 2023 00:56:21 GMT, Joe Darcy <da...@openjdk.org> wrote:
> Add informative notes to BigInteger and BigDecimal about possible running > times, etc. src/java.base/share/classes/java/math/BigDecimal.java line 310: > 308: * time of operations can screen out {@code BigDecimal} values with > 309: * unscaled values or scales above a chosen magnitude. > 310: * A paragraph about memory consumption is perhaps worthwhile as well. src/java.base/share/classes/java/math/BigInteger.java line 127: > 125: * the input. For example, a method like {@link intValue()} would be > 126: * expected to run in <i>O</i>(1), that is constant time, since with > 127: * the current internal presentation only a fixed-size component of Suggestion: * the current internal representation only a fixed-size component of src/java.base/share/classes/java/math/BigInteger.java line 152: > 150: * time of operations can screen out {@code BigInteger} values above a > 151: * chosen magnitude. > 152: * This explains the execution time characteristics but not the memory consumption aspects of the class. I think that a couple of sentences about them would make this note more complete. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16298#discussion_r1367887343 PR Review Comment: https://git.openjdk.org/jdk/pull/16298#discussion_r1367886201 PR Review Comment: https://git.openjdk.org/jdk/pull/16298#discussion_r1367886932