Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
f561a7b0
Commit
f561a7b0
authored
May 22, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update benchmark results.
parent
3e4eded5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
README.rst
README.rst
+26
-26
No files found.
README.rst
View file @
f561a7b0
...
@@ -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 simulat
e
It generates 100 translation units and uses ``printf()`` or its alternativ
e
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 (32
K)
libc printf
2.5 42K (31
K)
std::ostream 12.9s 84K (60
K)
IOStreams 19.8 86K (64
K)
format 16.0s 152K (128
K)
C++ Format 48.8 103K (84
K)
tinyformat
20.6s 240K (200
K)
tinyformat
65.0 428K (396
K)
boost::format 76.0s 888K (780
K)
Boost Format 212.0 1014K (945
K)
====================== ================== ==========================
====================== ================== ==========================
**
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 (28
K)
libc printf
2.1s 42K (31
K)
std::ostream 14.1s 88K (64
K)
IOStreams 17.3s 84K (60
K)
format 25.1s 552K (536
K)
C++ Format 42.7s 167K (138
K)
tinyformat
56.3s 200K (164
K)
tinyformat
25.1s 239K (195
K)
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
th
at they are included in the standard library. Tinyformat ha
s somewhat
th
ey are included in the standard library. Tinyformat produce
s somewhat
slower compilation times compared to f
ormat. Interestingly optimized
larger executable sizes compared to C++ F
ormat. 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
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment