Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FastBigDecimalParser support #825

Closed
pjfanning opened this issue Oct 21, 2022 · 1 comment
Closed

Add FastBigDecimalParser support #825

pjfanning opened this issue Oct 21, 2022 · 1 comment

Comments

@pjfanning
Copy link
Member

pjfanning commented Oct 21, 2022

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
@pjfanning
Copy link
Member Author

A duplicate of #813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant