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 the WAST library for testing #102

Merged
merged 4 commits into from
Apr 18, 2024
Merged

Conversation

wycst
Copy link
Contributor

@wycst wycst commented Apr 4, 2024

Hello, this open-source performance testing project is fantastic. Can we add 'wast'( https://github.com/wycst/wast )Participate in performance testing, thank you very much!

@fabienrenaud
Copy link
Owner

Yes, on the condition that performance is higher than a few of the lowest performers in the benchmark. Please run ser+deser benchmarks for jackson,wast,gson.

Comment on lines 39 to 40
WAST
;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move semi-colon to the same line as WAST.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, it has been adjusted

@wycst
Copy link
Contributor Author

wycst commented Apr 17, 2024

Yes, on the condition that performance is higher than a few of the lowest performers in the benchmark. Please run ser+deser benchmarks for jackson,wast,gson.

The performance should be faster than most libraries, including the top few libraries, which I only tested on the window platform

@fabienrenaud
Copy link
Owner

fabienrenaud commented Apr 17, 2024 via email

@wycst
Copy link
Contributor Author

wycst commented Apr 17, 2024

Hello, compared to the results of the first two high-performance library tests, the results of the just tested run

fastjson2: 2.0.47
dsl.version 2.0.2
wast: 0.0.12.1

# JMH version: 1.36
# VM version: JDK 17.0.3.1, Java HotSpot(TM) 64-Bit Server VM, 17.0.3.1+2-LTS-6
# VM invoker: D:\Program Files\Java\jdk-17.0.3.1\bin\java.exe
# VM options: --add-opens=java.base/java.time=ALL-UNNAMED --add-modules=jdk.incubator.vector -javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2023.1\lib\idea_rt.jar=62683:D:\Program Files\JetBrains\IntelliJ IDEA 2023.1\bin -Dfile.encoding=UTF-8

Benchmark                                     Mode  Cnt        Score        Error  Units
JavaJsonJmhDeserTest.dsljson_deser_client    thrpt    5   631549.154 ±  11858.434  ops/s
JavaJsonJmhDeserTest.fastjson2_deser_client  thrpt    5   680066.404 ±  36023.151  ops/s
JavaJsonJmhDeserTest.wast_deser_client       thrpt    5   905647.903 ±  25700.604  ops/s

JavaJsonJmhSerTest.dsljson_ser_client        thrpt    5  1109871.104 ± 107896.167  ops/s
JavaJsonJmhSerTest.fastjson2_ser_client      thrpt    5  1414414.026 ±  30514.291  ops/s
JavaJsonJmhSerTest.wast_ser_client           thrpt    5  1441172.972 ±  64336.484  ops/s

The original test data can be found in README_2024_04_17_JSON_JMH_RAW.md

@fabienrenaud
Copy link
Owner

Impressive! I wonder how you got serialization running 50% faster than fastjson. That's huge!

@fabienrenaud
Copy link
Owner

Please also update the README with the new lib name and version.

@wycst
Copy link
Contributor Author

wycst commented Apr 18, 2024

Please also update the README with the new lib name and version.

I just updated the new library and version, and I found that the versions of other libraries are not the latest, such as dsl json and fastjson2

@wycst
Copy link
Contributor Author

wycst commented Apr 18, 2024

Impressive! I wonder how you got serialization running 50% faster than fastjson. That's huge!

Impressive! I wonder how you got serialization running 50% faster than fastjson. That's huge!

It's not that exaggerated, serialization is similar, but deserialization is faster than fastjson2, without using any black technology, only using unsafe and cached reflection. Most of the performance comes from the performance advantages of higher versions of JDK for reading and writing Strings, such as some APIs that add @ IntrinsicCandidate annotations, which cannot be surpassed by any coding techniques.

@fabienrenaud fabienrenaud merged commit 414e760 into fabienrenaud:master Apr 18, 2024
@fabienrenaud
Copy link
Owner

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

2 participants