Runtime performance
Label | Library type | Compiler | OS |
---|---|---|---|
VS ho |
header-only |
Visual Studio 2019 (16.5.4) |
Windows 10 |
VS static |
static |
||
GCC ho |
header-only |
GCC 10.2.0 |
Ubuntu 18.04.4 |
GCC static |
static |
||
Clang ho |
header-only |
Clang 10.0.0 |
|
Clang static |
static |
If you want to run the benchmarks in your own environment,
the CMake option STRF_BUILD_BENCHMARKS
enables the build of the
the programs that generated the output presented in the tables that follow.
It is also necessary run git submodule update --init
to fetch the
necessary externals repository
All the benchmarks below were run in the same computer and compiled in C++20.
The {fmt} version is 7.0.3
git clone https://github.com/robhz786/strf cd strf git submodule update --init mkdir build cd build cmake -DSTRF_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=Release .. cmake --build . --target bench-to_char_ptr-static-lib cmake --build . --target bench-to_char_ptr-header-only cmake --build . --target bench-to_string-static-lib cmake --build . --target bench-to_string-header-only
Writing to char*
Sample 1
Print a string
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf |
|
|
|
|
|
|
2. strf ( tr-string ) |
|
|
|
|
|
|
3. {fmt} ( |
|
|
|
|
|
|
4. {fmt} |
|
|
|
|
|
|
5. sprintf |
|
|
|
-
strf::to(dest)("Blah ", str, "!\n")
-
strf::to(dest).tr("Blah {}!\n", str)
-
fmt::format_to(dest, FMT_COMPILE("Blah {}!\n"), str)
-
fmt::format_to(dest, "Blah {}!\n", str)
-
std::sprintf(dest, "Blah %s!\n", str.c_str())
char dest[110];
std::string str = "blah blah blah blah blah blah blah";
Sample 2
Print integer without formatting
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf |
|
|
|
|
|
|
2. strf ( tr-string ) |
|
|
|
|
|
|
3. {fmt} ( |
|
|
|
|
|
|
4. {fmt} |
|
|
|
|
|
|
5. sprintf |
|
|
|
-
strf::to(dest)("blah ", 123456, " blah ", 0x123456, " blah")
-
strf::to(dest).tr("blah {} blah {} blah", 123456, 0x123456)
-
fmt::format_to(dest, FMT_COMPILE("blah {} blah {} blah"), 123456, 0x123456)
-
fmt::format_to(dest, "blah {} blah {} blah", 123456, 0x123456)
-
std::sprintf(dest, "blah %d blah %d blah", 123456, 0x123456)
char dest[110];
Sample 3
Print some formatted integers
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf |
|
|
|
|
|
|
2. strf ( tr-string ) |
|
|
|
|
|
|
3. {fmt} ( |
|
|
|
|
|
|
4. {fmt} |
|
|
|
|
|
|
5. sprintf |
|
|
|
-
strf::to(dest)("blah ", +strf::dec(123456), " blah ", *strf::hex(0x123456), " blah")
-
strf::to(dest).tr("blah {} blah {} blah", +strf::dec(123456), *strf::hex(0x123456))
-
fmt::format_to(dest, FMT_COMPILE("blah {:+} blah {:#x} blah"), 123456, 0x123456)
-
fmt::format_to(dest, "blah {:+} blah {:#x} blah", 123456, 0x123456)
-
std::sprintf(dest, "blah %+d blah %#x blah", 123456, 0x123456)
char dest[110];
Sample 4
Print some formatted integers with alignment
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf |
|
|
|
|
|
|
2. strf ( tr-string ) |
|
|
|
|
|
|
3. {fmt} ( |
|
|
|
|
|
|
4. {fmt} |
|
|
|
|
|
|
5. sprintf |
|
|
|
-
strf::to(dest)("blah ", +strf::right(123456, 20, '_'), " blah ", *strf::hex(0x123456)<20, " blah")
-
strf::to(dest).tr("blah {} blah {} blah", +strf::right(123456, 20, '_'), *strf::hex(0x123456)<20)
-
fmt::format_to(dest, FMT_COMPILE("blah {:_>+20} blah {:<#20x} blah"), 123456, 0x123456)
-
fmt::format_to(dest, "blah {:_>+20} blah {:<#20x} blah", 123456, 0x123456)
-
std::sprintf(dest, "blah %+20d blah %#-20x blah", 123456, 0x123456)
char dest[110];
Writing to std::string
std::to_string
versus strf::to_string
versus fmt::format
Sample 1
Print an integer and nothing more.
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf ( |
|
|
|
|
|
|
2. strf ( |
|
|
|
|
|
|
3. strf ( |
|
|
|
|
|
|
4. strf ( |
|
|
|
|
|
|
5. {fmt} ( |
|
|
|
|
|
|
6. {fmt} |
|
|
|
|
|
|
7. std::to_string |
|
|
|
-
to_string .reserve_calc() (123456)
-
to_string .no_reserve() (123456)
-
to_string .reserve_calc() .tr("{}", 123456)
-
to_string .no_reserve() .tr("{}", 123456)
-
fmt::format(FMT_COMPILE("{}"), 123456)
-
fmt::format("{}", 123456)
-
std::to_string(123456)
Sample 2
Print a floting point value and nothing more.
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf ( |
|
|
|
|
|
|
2. strf ( |
|
|
|
|
|
|
3. strf ( |
|
|
|
|
|
|
4. strf ( |
|
|
|
|
|
|
5. {fmt} ( |
|
|
|
|
|
|
6. {fmt} |
|
|
|
|
|
|
7. std::to_string |
|
|
|
-
to_string .reserve_calc() (0.123456)
-
to_string .no_reserve() (0.123456)
-
to_string .reserve_calc() .tr("{}", 0.123456)
-
to_string .no_reserve() .tr("{}", 0.123456)
-
fmt::format(FMT_COMPILE("{}"), 0.123456)
-
fmt::format("{}", 0.123456)
-
std::to_string(0.123456)
Sample 3
Print a string
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf ( |
|
|
|
|
|
|
2. strf ( |
|
|
|
|
|
|
3. strf ( |
|
|
|
|
|
|
4. strf ( |
|
|
|
|
|
|
5. {fmt} ( |
|
|
|
|
|
|
6. {fmt} |
|
|
|
|
|
|
-
to_string .reserve_calc() ("Blah ", str, "!\n")
-
to_string .no_reserve() ("Blah ", str, "!\n")
-
to_string .reserve_calc() .tr("Blah {}!\n", str)
-
to_string .no_reserve() .tr("Blah {}!\n", str)
-
fmt::format(FMT_COMPILE("Blah {}!\n"), str)
-
fmt::format("Blah {}!\n", str)
std::string str = "blah blah blah blah blah blah blah";
Sample 4
Print integers without formatting
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf ( |
|
|
|
|
|
|
2. strf ( |
|
|
|
|
|
|
3. strf ( |
|
|
|
|
|
|
4. strf ( |
|
|
|
|
|
|
5. {fmt} ( |
|
|
|
|
|
|
6. {fmt} |
|
|
|
|
|
|
-
to_string .reserve_calc() ("blah ", 123456, " blah ", 0x123456, " blah")
-
to_string .no_reserve() ("blah ", 123456, " blah ", 0x123456, " blah")
-
to_string .reserve_calc() .tr("blah {} blah {} blah", 123456, 0x123456)
-
to_string .no_reserve() .tr("blah {} blah {} blah", 123456, 0x123456)
-
fmt::format(FMT_COMPILE("blah {} blah {} blah"), 123456, 0x123456)
-
fmt::format("blah {} blah {} blah", 123456, 0x123456)
Sample 5
Print integers with some basic formatting
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf ( |
|
|
|
|
|
|
2. strf ( |
|
|
|
|
|
|
3. strf ( |
|
|
|
|
|
|
4. strf ( |
|
|
|
|
|
|
5. {fmt} ( |
|
|
|
|
|
|
6. {fmt} |
|
|
|
|
|
|
-
to_string_rc("blah ", +strf::dec(123456), " blah ", *strf::hex(0x123456), " blah")
-
to_string_nr("blah ", +strf::dec(123456), " blah ", *strf::hex(0x123456), " blah")
-
to_string_rc.tr("blah {} blah {} blah", +strf::dec(123456), *strf::hex(0x123456))
-
to_string_nr.tr("blah {} blah {} blah", +strf::dec(123456), *strf::hex(0x123456))
-
fmt::format(FMT_COMPILE("blah {:+} blah {:#x} blah"), 123456, 0x123456)
-
fmt::format("blah {:+} blah {:#x} blah", 123456, 0x123456)
constexpr auto to_string_rc = strf::to_string.reserve_calc();
constexpr auto to_string_nr = strf::to_string.no_reserve();
Sample 6
Print some formatted integers with alignment
VS ho | VS static | GCC ho | GCC static | Clang ho | Clang static | |
---|---|---|---|---|---|---|
1. strf ( |
|
|
|
|
|
|
2. strf ( |
|
|
|
|
|
|
3. strf ( |
|
|
|
|
|
|
4. strf ( |
|
|
|
|
|
|
5. {fmt} ( |
|
|
|
|
|
|
6. {fmt} |
|
|
|
|
|
|
-
to_string_rc("blah ", +strf::right(123456, 20, '_'), " blah ", *strf::hex(0x123456)<20, " blah")
-
to_string_nr("blah ", +strf::right(123456, 20, '_'), " blah ", *strf::hex(0x123456)<20, " blah")
-
to_string_rc.tr("blah {} blah {} blah", +strf::right(123456, 20, '_'), *strf::hex(0x123456)<20)
-
to_string_nr.tr("blah {} blah {} blah", +strf::right(123456, 20, '_'), *strf::hex(0x123456)<20)
-
fmt::format(FMT_COMPILE("blah {:_>+20} blah {:<#20x} blah"), 123456, 0x123456)
-
fmt::format("blah {:_>+20} blah {:<#20x} blah", 123456, 0x123456)
constexpr auto to_string_rc = strf::to_string.reserve_calc();
constexpr auto to_string_nr = strf::to_string.no_reserve();
Compilation performance
The tables below are the output of the script
benchmarks/compilation/run_benchmarks.py
. This script does not work on MS-Windows.
It is affected by the CXX
and CXXFLAGS
environment variables. The flag --std=c++2a
was used.
For each row in the tables below, the source file in the leftmost column
is compiled 41 times. In each compilation, a certain macro ( SRC_ID
) is
defined with a different value, resulting in 41 different object files.
The script then links four programs: The first one containing only
one of such object files, the second containing 21, the the third with 31,
and the last program with all the 41 object files.
The rightmost column is the difference between the values in the columns "31 files" and "41 files".
The comlumn "Compilation times" shows the average times to create one object file.
Clang 10.0.0
Static libs, with -Os
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -Os
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static libs, with -O3
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -O3
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static libs, with -g
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -g
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GCC 9.3.0
Static libs, with -Os
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -Os
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static libs, with -O3
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -O3
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static libs, with -g
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -g
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GCC 10.2.0
Static libs, with -Os
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -Os
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static libs, with -O3
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -O3
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Static libs, with -g
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header-only libs, with -g
Source file |
Compilation times (s) |
Programs size (kB) |
||||||
---|---|---|---|---|---|---|---|---|
Wall |
User |
Sys |
1 file |
21 files |
31 files |
41 files |
Difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|