Skip to content

Benchmark differences #195

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

Open
re-thc opened this issue Jul 4, 2018 · 3 comments
Open

Benchmark differences #195

re-thc opened this issue Jul 4, 2018 · 3 comments

Comments

@re-thc
Copy link

re-thc commented Jul 4, 2018

Hi, the jsoniter websites claims it's quite a lot faster compared to Jackson. However as per https://github.com/fabienrenaud/java-json-benchmark -- Jackson seems to be faster in all the test cases. Are there any issues with the benchmark code or settings that need to be applied? Curious to know why there are such differences and which Json library we're currently considering to use.

Thanks.

@Kyson
Copy link

Kyson commented Oct 9, 2018

watching...

@plokhotnyuk
Copy link
Contributor

plokhotnyuk commented Oct 9, 2018

@Kyson you can use async-profiler to get interactive flame graphs that will help to spot weak places easily.

Also, please look into the core module of jsoniter-scala.

It started from Scala macro that reused reader and writer from Jsoniter Java and generated codecs for them but then evolved to have own core module. Now it has lot of goodies that can be ported back to this library easily:

  • parsing and serialization of UUIDs at speed ~70 CPU cycles per value
  • serialization of floats and doubles into the most optimal representation using adopted Ryu routines at speed ~120 and ~280 CPU cycles per value accordingly
  • parsing and serialization of java.time.* classes from/to the ISO-8601 representation without redundant allocation of strings and even without / and % operators

@plokhotnyuk
Copy link
Contributor

plokhotnyuk commented Dec 7, 2018

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

3 participants