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 simdjson's benchmark tests #3

Open
dan-ryan opened this issue Aug 31, 2022 · 3 comments
Open

Add simdjson's benchmark tests #3

dan-ryan opened this issue Aug 31, 2022 · 3 comments

Comments

@dan-ryan
Copy link

Simdjson's benchmark shows them to be the fastest. I suggest this benchmark project add their benchmark tests so it doesn't look like there is cherry-picking :)
https://github.com/simdjson/simdjson#performance-results

@ibireme
Copy link
Owner

ibireme commented Aug 31, 2022

simdjson has two sets of APIs: DOM and on-demand. The DOM API is like most JSON parsers, the JSON string is parsed into a document, and then the user manipulates this document. The on-demand API is different, it is more like an iterator and doesn't provide a fully-parsed document. So the two cannot be compared directly.

As I said on the homepage of yyjson, the simdjson on-demand API is indeed faster if the user knows the order of keys at compile time. This project only measures the performance of the DOM API (like the previous tests of simdjson), new tests will be added when yyjson has a similar API in the future.

@lano1106
Copy link

lano1106 commented Feb 10, 2024

quick question... you have result for simdjson stringify...

I was wondering what you mean by stringify... I suppose it is to serialize a data structure into a JSON string...
if that is what stringify means, I am confused since AFAIK, simdjson only deserialize....

@ibireme
Copy link
Owner

ibireme commented Feb 10, 2024

quick question... you have result for simdjson stringify...

I was wondering what you mean by stringify... I suppose it is to serialize a data structure into a JSON string... if that is what stringify means, I am confused since AFAIK, simdjson only deserialize....

simdjson can parse json data into immutable DOM, and then this DOM can be serialized into json using minify() function.

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