Speed test loading the different formats cbor, msgpack, bson, json #2581
Replies: 4 comments 2 replies
-
Just to make sure:
|
Beta Was this translation helpful? Give feedback.
-
Hi, I ran the benchmark, and got the following results: json size:9237533 ubjson size:8254249 msgpack size:6262275 cbor size:6256853 bson size:16846041 which confirm @phforesteot 's report. |
Beta Was this translation helpful? Give feedback.
-
Here are my results using Google Benchmark:
I am also surprised by the results, but I have not yet found the time to look into the code to understand the reason why the binary formats are slower. |
Beta Was this translation helpful? Give feedback.
-
Very interesting discussion. Did anyone test the latest versions? I wonder if the slowness of binary formatting has been addressed |
Beta Was this translation helpful? Give feedback.
-
Hi,
I was trying to figure out which format to use to gain speed and size. I was assuming that one of the binary format would be faster and smaller, but much to my surprise.
json: using parse(...)
msgpack: using from_msgpack( ... )
cbor: using from_cbor( ... )
bson: using from_bson( ... )
-size: 16846041
My conclusion was:
json is still way much faster that any binary format's (which i do not understand way) we are talking something 50%.
msgpack, cbor have the best sizes.
According to the msgpack and cbor they should also be faster !
My test environment to test this.
https://github.com/phforesteot/json_speed_test
Any help is welcome.
Thanks.
Great library by the way.
Beta Was this translation helpful? Give feedback.
All reactions