Skip to content

Add FastBigDecimalParser support #825

Closed
@pjfanning

Description

@pjfanning

Similar to the FastDoubleParser support added in Jackson 2.14. FastBigDecimalParser would be enabled optionally.
I have some code based on https://github.com/plokhotnyuk/jsoniter-scala

https://github.com/pjfanning/jackson-number-parse-bench/blob/main/src/main/java/org/example/jackson/bench/FastBigDecimalParser.java

Maybe something for Jackson 2.15.

Relates to #814 and #815

The current benchmark for FastBigDecimalParser suggests it is better for numbers with lots of digits (and still a little better for numbers with a small number of digits).

For BigInteger parsing, I got:

Benchmark                                 Mode  Cnt       Score       Error  Units
BigIntegerParserBench.bigDec1000         thrpt    5   35195.566 ±  2758.478  ops/s
BigIntegerParserBench.bigDec10000        thrpt    5    1232.178 ±   221.485  ops/s
BigIntegerParserBench.bigDec1000000      thrpt    5       0.396 ±     0.031  ops/s
BigIntegerParserBench.bigInt1000         thrpt    5   48308.680 ±   671.193  ops/s
BigIntegerParserBench.bigInt10000        thrpt    5     617.721 ±    14.032  ops/s
BigIntegerParserBench.bigInt1000000      thrpt    5       0.063 ±     0.002  ops/s
BigIntegerParserBench.fastBigDec1000     thrpt    5  138409.766 ± 10781.948  ops/s
BigIntegerParserBench.fastBigDec1000000  thrpt    5       2.342 ±     0.019  ops/s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions