RFR: 8205592: BigDecimal.doubleValue() is depressingly slow

Andriy Plokhotnyuk duke at openjdk.org
Tue Feb 14 08:04:47 UTC 2023


On Thu, 7 Jul 2022 15:20:32 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

> A reimplementation of `BigDecimal.[double|float]Value()` to enhance performance, avoiding an intermediate string and its subsequent parsing on the slow path.

Sorry, I failed to recognize those checks two times :)

How about adding [this moderate path](https://github.com/plokhotnyuk/jsoniter-scala/blob/6f702ce5cae05df91b5aa6e4bd61acdf43bf18f6/jsoniter-scala-core/jvm/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonReader.scala#L1467-L1498)?

Also, I think it worth do be reused for regular parsing of double and float values from string.

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

PR: https://git.openjdk.org/jdk/pull/9410


More information about the core-libs-dev mailing list