Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ ExternalProject_Add(
avro
DEPENDS boost
PREFIX ${avro_PREFIX}
URL "http://www.eu.apache.org/dist/avro/avro-1.8.1/avro-src-1.8.1.tar.gz"
URL_MD5 "bc1901bd2a83956dbb9e7f968affc607"
URL "http://www.eu.apache.org/dist/avro/avro-1.8.2/avro-src-1.8.2.tar.gz"
URL_MD5 "cb56b43eb45c3db13a35b56f6df633e2"
CONFIGURE_COMMAND cmake -DBOOST_INCLUDEDIR=${boost_PREFIX}/include -DBOOST_LIBRARYDIR=${boost_PREFIX}/lib -DBoost_NO_SYSTEM_PATHS=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${avro_PREFIX} -DBUILD_SHARED_LIBS=OFF ${avro_PREFIX}/src/avro/lang/c++/
# Due to some issues with using statically built boost libraries AND zlib in avro tests
# build only necessary parts and install them in a very hackish way.
Expand Down Expand Up @@ -196,8 +196,8 @@ set(yas_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yas)
ExternalProject_Add(
yas
PREFIX ${yas_PREFIX}
URL "https://github.com/niXman/yas/archive/4.0.zip"
URL_MD5 "7f9ed59c21020005046297934c196bd8"
URL "https://github.com/niXman/yas/archive/5.0.zip"
URL_MD5 "1acaef7cb8ab4178453dfa67a0112ea8"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND mkdir -p ${yas_PREFIX}/include/ && cp -r ${yas_PREFIX}/src/yas/include/yas ${yas_PREFIX}/include/
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ on a typical desktop computer with Intel Core i5 processor running Ubuntu 14.04.
* boost 1.62.0
* msgpack 2.0.0
* cereal 1.2.1
* avro 1.8.1
* avro 1.8.2
* capnproto 0.5.3
* flatbuffers 1.4.0
* YAS 4.0.0
* YAS 5.0.0

| serializer | object's size | avg. total time |
| -------------- | ------------- | --------------- |
| thrift-binary | 17017 | 13748 |
| thrift-compact | 11597 | 25947 |
| protobuf | 12571 | 24196 |
| boost | 17470 | 21717 |
| msgpack | 11902 | 29597 |
| cereal | 17416 | 11121 |
| avro | 12288 | 31880 |
| yas | 17416 | 5113 |
| yas-compact | 12830 | 21858 |
| thrift-binary | 17017 | 13335 |
| thrift-compact | 13378 | 33205 |
| protobuf | 16116 | 24717 |
| boost | 17470 | 21760 |
| msgpack | 13402 | 33815 |
| cereal | 17416 | 11031 |
| avro | 16384 | 44187 |
| yas | 17416 | 3223 |
| yas-compact | 13553 | 21481 |

###### Size

Expand All @@ -80,8 +80,8 @@ serialize/deserialize cycle of the already built data structure.

| serializer | object's size | avg. total time |
| -------------- | ------------- | --------------- |
| capnproto | 17768 | 4460 |
| flatbuffers | 17632 | 12755 |
| capnproto | 17768 | 4849 |
| flatbuffers | 17632 | 12520 |

![Time](images/time2.png)

Expand Down
434 changes: 334 additions & 100 deletions data.hpp

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions images/graphs.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ names.time2 <- c("capnproto", "flatbuffers")
# for t in thrift-binary thrift-compact protobuf boost msgpack cereal avro yas yas-compact; do echo -n "$t: "; ./benchmark 1 $t | grep size | awk '{print $4}'; done
size <- c(
17017 # thrift-binary
,11597 # thrift-compact
,11574 # protobuf
,13378 # thrift-compact
,16116 # protobuf
,17470 # boost
,11802 # msgpack
,13402 # msgpack
,17416 # cereal
,12288 # avro
,16384 # avro
,17768 # capnproto
,17632 # flatbuffers
,17416 # yas
,12830 # yas-compact
,13553 # yas-compact
)
# for t in thrift-binary thrift-compact protobuf boost msgpack cereal avro yas yas-compact; do rm -f /tmp/$t.time; echo -n "$t: "; for i in `seq 1 50`; do ./benchmark 1000000 $t | grep time | awk '{print $4}' >>/tmp/$t.time; done; awk '{ sum += $1 } END { print sum/50}' /tmp/$t.time; done
time <- c(
13748 # thrift-binary
,25947 # thrift-compact
,24196 # protobuf
,21717 # boost
,29597 # msgpack
,11121 # cereal
,31880 # avro
,5113 # yas
,21858 # yas-compact
13335 # thrift-binary
,33205 # thrift-compact
,24717 # protobuf
,21760 # boost
,33815 # msgpack
,11031 # cereal
,44187 # avro
,3223 # yas
,21481 # yas-compact
)
time2 <- c(
4460 # capnproto
,12755 # flatbuffers
4849 # capnproto
,12520 # flatbuffers
)

data.size <- as.data.frame(list(serializer = names.size, size = size))
Expand Down
Binary file modified images/size.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/time2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.