Timing test shows yyjson vs glaze at 14ms vs 700ms #1624
Unanswered
Please-just-dont
asked this question in
Q&A
Replies: 1 comment
-
You should put your data into C++ structs, this makes the keys known at compile time, and reduces dynamic allocations to dynamic arrays. Glaze will likely outperform yyjson in this scenario. Though, there are additional considerations for peak performance, such as using a mutable |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried parsing this file with with the yyjson C library. I did yyjson_read vs glz::read_json and I got 14 milliseconds for yyjson and 700 milliseconds for glaze. Does that sound right?
Edit: OK, so I thought maybe glaze is actually parsing the json into its own structures whereas yyjson is just doing like a prepass or something, so I tested by reading into my own structures with glz::json_t* and ->get functions, and the results turned out:
yyjson: 3.5ms
glaze 15ms
So still. In favour of yyjson by a big margin.
Beta Was this translation helpful? Give feedback.
All reactions