On Sun, 10 Mar 2024 20:27:56 GMT, Chen Liang wrote:
> Good idea! Since we are now maintaining two code paths, when we update one,
> we might forget about the other; is it possible to create another interal
> constructor that takes a `CharSequence`, so we can pass the string in
> directly, and
On Sun, 10 Mar 2024 16:11:12 GMT, Shaojin Wen wrote:
> The current BigDecimal(String) constructor calls String#toCharArray, which
> has a memory allocation.
>
>
> public BigDecimal(String val) {
> this(val.toCharArray(), 0, val.length()); // allocate char[]
> }
>
>
> When the length is g
On Sun, 10 Mar 2024 16:11:12 GMT, Shaojin Wen wrote:
> The current BigDecimal(String) constructor calls String#toCharArray, which
> has a memory allocation.
>
>
> public BigDecimal(String val) {
> this(val.toCharArray(), 0, val.length()); // allocate char[]
> }
>
>
> When the length is g