Commit f561a7b0 authored by Victor Zverovich's avatar Victor Zverovich

Update benchmark results.

parent 3e4eded5
...@@ -260,45 +260,45 @@ Performance of format is close to that of printf. ...@@ -260,45 +260,45 @@ Performance of format is close to that of printf.
Compile time and code bloat Compile time and code bloat
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
The script `bloat_test.sh The script `bloat_test.py
<https://github.com/cppformat/format-benchmark/blob/master/bloat_test.sh>`__ <https://github.com/cppformat/format-benchmark/blob/master/bloat-test.py>`__
from `tinyformat <https://github.com/c42f/tinyformat>`__ tests compile time from `format-benchmark <https://github.com/cppformat/format-benchmark>`__
and code bloat for nontrivial projects. It generates 100 translation units tests compile time and code bloat for nontrivial projects.
and uses ``printf()`` or its alternative five times in each to simulate It generates 100 translation units and uses ``printf()`` or its alternative
a medium sized project. The resulting executable size and compile time five times in each to simulate a medium sized project. The resulting
(g++-4.7.2, Ubuntu GNU/Linux 12.10, best of three) is shown in the following executable size and compile time (g++-4.8.1, Ubuntu GNU/Linux 13.10,
tables. best of three) is shown in the following tables.
**Non-optimized build** **Optimized build (-O3)**
====================== ================== ========================== ====================== ================== ==========================
test name total compile time executable size (stripped) test name total compile time executable size (stripped)
====================== ================== ========================== ====================== ================== ==========================
libc printf 2.8s 44K (32K) libc printf 2.5 42K (31K)
std::ostream 12.9s 84K (60K) IOStreams 19.8 86K (64K)
format 16.0s 152K (128K) C++ Format 48.8 103K (84K)
tinyformat 20.6s 240K (200K) tinyformat 65.0 428K (396K)
boost::format 76.0s 888K (780K) Boost Format 212.0 1014K (945K)
====================== ================== ========================== ====================== ================== ==========================
**Optimized build (-O3)** **Non-optimized build**
====================== ================== ========================== ====================== ================== ==========================
test name total compile time executable size (stripped) test name total compile time executable size (stripped)
====================== ================== ========================== ====================== ================== ==========================
libc printf 3.5s 40K (28K) libc printf 2.1s 42K (31K)
std::ostream 14.1s 88K (64K) IOStreams 17.3s 84K (60K)
format 25.1s 552K (536K) C++ Format 42.7s 167K (138K)
tinyformat 56.3s 200K (164K) tinyformat 25.1s 239K (195K)
boost::format 169.4s 1.7M (1.6M) Boost Format 110.2s 905K (781K)
====================== ================== ========================== ====================== ================== ==========================
Printf and std::ostream win here which is not surprising considering IOStreams and printf win here which is not surprising considering that
that they are included in the standard library. Tinyformat has somewhat they are included in the standard library. Tinyformat produces somewhat
slower compilation times compared to format. Interestingly optimized larger executable sizes compared to C++ Format. Interestingly optimized
executable size is smaller with tinyformat then with format and for compile time is smaller for C++ Format than for tinyformat and its the
non-optimized build its the other way around. Boost::format has by far other way around with non-optimized build. Boost Format has by far the
the largest overheads. largest overheads.
Running the tests Running the tests
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment