Update benchmark results.

This commit is contained in:
Victor Zverovich 2014-05-23 08:58:28 -07:00
parent 23eb9b4f4c
commit 60cd838f1c

View File

@ -271,34 +271,31 @@ best of three) is shown in the following tables.
**Optimized build (-O3)** **Optimized build (-O3)**
====================== ================== ========================== ============ =============== ==================== ==================
test name total compile time executable size (stripped) Method Compile Time, s Executable size, KiB Stripped size, KiB
====================== ================== ========================== ============ =============== ==================== ==================
libc printf 2.5s 42K (31K) printf 2.6 41 30
IOStreams 19.8s 86K (64K) IOStreams 19.4 92 70
C++ Format 48.8s 103K (84K) C++ Format 46.8 46 34
tinyformat 65.0s 428K (396K) tinyformat 64.6 418 386
Boost Format 212.0s 1014K (945K) Boost Format 222.8 990 923
====================== ================== ========================== ============ =============== ==================== ==================
As you can see, C++ Format has 80% less overhead in terms of resulting
code size compared to IOStreams and comes pretty close to ``printf``.
Boost Format has by far the largest overheads.
**Non-optimized build** **Non-optimized build**
====================== ================== ========================== ============ =============== ==================== ==================
test name total compile time executable size (stripped) Method Compile Time, s Executable size, KiB Stripped size, KiB
====================== ================== ========================== ============ =============== ==================== ==================
libc printf 2.1s 42K (31K) printf 2.1 41 30
IOStreams 17.3s 84K (60K) IOStreams 19.7 86 62
C++ Format 42.7s 167K (138K) C++ Format 47.9 108 86
tinyformat 25.1s 239K (195K) tinyformat 27.7 234 190
Boost Format 110.2s 905K (781K) Boost Format 122.6 884 763
====================== ================== ========================== ============ =============== ==================== ==================
IOStreams and printf win here which is not surprising considering that
they are included in the standard library. Tinyformat produces somewhat
larger executable sizes compared to C++ Format. Interestingly optimized
compile time is smaller for C++ Format than for tinyformat and its the
other way around with non-optimized build. Boost Format has by far the
largest overheads.
``libc``, ``libstdc++`` and ``libformat`` are all linked as shared ``libc``, ``libstdc++`` and ``libformat`` are all linked as shared
libraries to compare formatting function overhead only. Boost Format libraries to compare formatting function overhead only. Boost Format