Speed test loading the different formats cbor, msgpack, bson, json #2581
phforesteot
started this conversation in
General
Replies: 4 comments 2 replies
|
Just to make sure:
|
1 reply
|
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. |
0 replies
|
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. |
0 replies
|
Very interesting discussion. Did anyone test the latest versions? I wonder if the slowness of binary formatting has been addressed |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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.
All reactions