Skip to content

Commit

Permalink
Updated benchmark. Use -O2 instead of -O3 as it's probably a more com…
Browse files Browse the repository at this point in the history
…mon use case.
  • Loading branch information
eerimoq committed Jan 16, 2020
1 parent b2770c5 commit 6000b5f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 46 deletions.
66 changes: 33 additions & 33 deletions benchmark/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ library and optimization combination.
+-------------+--------------+--------------------+
| Library | Optimization | Exexution time [s] |
+=============+==============+====================+
| pbtools | -O3 -flto | 0.658 |
| pbtools | -O2 -flto | 1.319 |
+-------------+--------------+--------------------+
| pbtools | -O3 | 1.118 |
| pbtools | -O2 | 1.457 |
+-------------+--------------+--------------------+
| protobuf-c | -O3 -flto | 1.883 |
+-------------+--------------+--------------------+
Expand All @@ -107,19 +107,19 @@ library and optimization combination.
+-------------+--------------+--------------------+
| google | -O3 | 2.231 |
+-------------+--------------+--------------------+
| flatbuffers | -O3 | 2.554 |
| flatbuffers | -O2 | 2.506 |
+-------------+--------------+--------------------+
| pbtools | -Os -flto | 3.421 |
| pbtools | -Os -flto | 3.275 |
+-------------+--------------+--------------------+
| pbtools | -Os | 3.470 |
| pbtools | -Os | 3.398 |
+-------------+--------------+--------------------+
| google | -Os | 3.713 |
+-------------+--------------+--------------------+
| flatbuffers | -Os | 5.638 |
| flatbuffers | -Os | 5.553 |
+-------------+--------------+--------------------+
| nanopb | -O3 -flto | 7.453 |
| nanopb | -O2 -flto | 9.453 |
+-------------+--------------+--------------------+
| nanopb | -O3 | 8.480 |
| nanopb | -O2 | 9.580 |
+-------------+--------------+--------------------+
| nanopb | -Os | 12.958 |
+-------------+--------------+--------------------+
Expand All @@ -135,17 +135,17 @@ library and optimization combination.
+-------------+--------------+--------------------+
| Library | Optimization | Exexution time [s] |
+=============+==============+====================+
| flatbuffers | -O3 | 0.103 |
| flatbuffers | -O2 | 0.100 |
+-------------+--------------+--------------------+
| flatbuffers | -Os | 0.553 |
| flatbuffers | -Os | 0.549 |
+-------------+--------------+--------------------+
| pbtools | -O3 -flto | 0.681 |
| pbtools | -O2 -flto | 1.239 |
+-------------+--------------+--------------------+
| pbtools | -O3 | 1.069 |
| pbtools | -Os -flto | 1.416 |
+-------------+--------------+--------------------+
| pbtools | -Os -flto | 1.270 |
| pbtools | -O2 | 1.594 |
+-------------+--------------+--------------------+
| pbtools | -Os | 1.576 |
| pbtools | -Os | 1.749 |
+-------------+--------------+--------------------+
| google | -O3 | 1.997 |
+-------------+--------------+--------------------+
Expand All @@ -159,9 +159,9 @@ library and optimization combination.
+-------------+--------------+--------------------+
| protobuf-c | -Os | 2.609 |
+-------------+--------------+--------------------+
| nanopb | -O3 -flto | 5.767 |
| nanopb | -O2 -flto | 6.367 |
+-------------+--------------+--------------------+
| nanopb | -O3 | 6.133 |
| nanopb | -O2 | 6.433 |
+-------------+--------------+--------------------+
| nanopb | -Os | 9.685 |
+-------------+--------------+--------------------+
Expand All @@ -176,36 +176,36 @@ pbtools

.. code-block::
$ size main-size
size main-size
text data bss dec hex filename
13972 632 8 14612 3914 main-size
$ size main-size-lto
14188 632 8 14828 39ec main-size
size main-size-lto
text data bss dec hex filename
11596 632 8 12236 2fcc main-size-lto
$ size main-speed
11732 632 8 12372 3054 main-size-lto
size main-speed
text data bss dec hex filename
32148 656 8 32812 802c main-speed
$ size main-speed-lto
17484 656 8 18148 46e4 main-speed
size main-speed-lto
text data bss dec hex filename
66636 656 8 67300 106e4 main-speed-lto
15308 656 8 15972 3e64 main-speed-lto
nanopb
^^^^^^

.. code-block::
$ size main-size
size main-size
text data bss dec hex filename
18036 1066 32 19134 4abe main-size
$ size main-size-lto
size main-size-lto
text data bss dec hex filename
17002 1050 32 18084 46a4 main-size-lto
$ size main-speed
size main-speed
text data bss dec hex filename
26928 1082 32 28042 6d8a main-speed
$ size main-speed-lto
21256 1082 32 22370 5762 main-speed
size main-speed-lto
text data bss dec hex filename
36574 1088 32 37694 933e main-speed-lto
20566 1066 32 21664 54a0 main-speed-lto
google (C++ with libprotoc 3.6.1 as shared library)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -242,12 +242,12 @@ flatbuffers

.. code-block::
$ size main-size
size main-size
text data bss dec hex filename
19838 816 8 20662 50b6 main-size
$ size main-speed
size main-speed
text data bss dec hex filename
41042 728 8 41778 a332 main-speed
40017 728 8 40753 9f31 main-speed
.. _FlatBuffers: https://google.github.io/flatbuffers/

Expand Down
2 changes: 1 addition & 1 deletion benchmark/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ CFLAGS = \
-Wl,--gc-sections

OPT_SIZE = -Os
OPT_SPEED = -O3
OPT_SPEED = -O2

ITERATIONS = 2000000
8 changes: 4 additions & 4 deletions benchmark/termgraph/decoding-time-speed.dat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Decoding time -O3 [ms]
# Decoding time -O2/-O3 [ms]

pbtools 1002
pbtools 1594
google 1997
protobuf-c 2508
nanopb 6133
flatbuffers 103
nanopb 6433
flatbuffers 100
8 changes: 4 additions & 4 deletions benchmark/termgraph/encoding-time-speed.dat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Encoding time -O3 [ms]
# Encoding time -O2/-O3 [ms]

pbtools 1097
pbtools 1457
protobuf-c 1892
google 2231
nanopb 8480
flatbuffers 2554
nanopb 9580
flatbuffers 2506
8 changes: 4 additions & 4 deletions benchmark/termgraph/executable-size-text-speed.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Text segment size -O3 [bytes]
# Text segment size -O2/-O3 [bytes]

pbtools 32132
nanopb 26928
flatbuffers 41042
pbtools 17484
nanopb 21256
flatbuffers 40017

0 comments on commit 6000b5f

Please sign in to comment.