Runtime performance
Label | Library type | Compiler | OS |
---|---|---|---|
VS/ho |
header-only |
Visual Studio 17 2022 |
Windows 10 |
VS/s |
static |
||
GCC/ho |
header-only |
GCC 13.1.0 |
Ubuntu 20.04 |
GCC/s |
static |
||
Clang/ho |
header-only |
Clang 17.0.3 |
|
Clang/s |
static |
The benchmarks programs were all run in the same computer and compiled in C++20. The {fmt} version is 10.2.1
You can replicate them in your environment by executing the following commands:
git clone https://github.com/robhz786/strf-benchmarks cd strf-benchmarks git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 .. # ( CMAKE_CXX_STANDARD must be 17 or higher ) cmake --build . --target to_char_ptr-static-lib cmake --build . --target to_char_ptr-header-only cmake --build . --target to_string-static-lib cmake --build . --target to_string-header-only # ( and/or build other targets ) ./to_char_ptr-static-lib ./to_char_ptr-header-only ./to_string-static-lib ./to_string-header-only # ( and/or run other benchmarks )
Writing to char*
Sample 1
Print a string
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
|
|
|
6. |
|
|
|
|
|
|
7. |
|
|
|
-
strf::to(dest, dest_size)("Blah ", str, "!\n")
-
strf::to(dest, dest_size).tr("Blah {}!\n", str)
-
fmt::format_to(dest, FMT_COMPILE("Blah {}!\n"), str)
-
fmt::format_to_n(dest, dest_size, FMT_COMPILE("Blah {}!\n"), str)
-
fmt::format_to(dest, "Blah {}!\n", str)
-
fmt::format_to_n(dest, dest_size, "Blah {}!\n", str)
-
std::sprintf(dest, "Blah %s!\n", str.c_str())
constexpr std::size_t dest_size = 110;
char dest[dest_size];
std::string str = "blah blah blah blah blah ";
Sample 2
Print a string with alignment formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
|
|
|
6. |
|
|
|
|
|
|
7. |
|
|
|
-
strf::to(dest, dest_size)("Blah ", strf::right(str, 40, '.'), "!\n")
-
strf::to(dest, dest_size).tr("Blah {}!\n", strf::right(str, 40, '.'))
-
fmt::format_to(dest, FMT_COMPILE("Blah {:.>40}!\n"), str)
-
fmt::format_to_n(dest, dest_size, FMT_COMPILE("Blah {:.>40}!\n"), str)
-
fmt::format_to(dest, "Blah {:.>40}!\n", str)
-
fmt::format_to_n(dest, dest_size, "Blah {:.>40}!\n", str)
-
std::sprintf(dest, "Blah %40s!\n", str.c_str())
constexpr std::size_t dest_size = 110;
char dest[dest_size];
std::string str = "blah blah blah blah blah ";
Sample 3
Print integer without formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
|
|
|
6. |
|
|
|
|
|
|
7. |
|
|
|
-
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_n(dest, dest_size, FMT_COMPILE("blah {} blah {} blah"), 123456, 0x123456)
-
fmt::format_to(dest, "blah {} blah {} blah", 123456, 0x123456)
-
fmt::format_to_n(dest, dest_size, "blah {} blah {} blah", 123456, 0x123456)
-
std::sprintf(dest, "blah %d blah %d blah", 123456, 0x123456)
constexpr std::size_t dest_size = 110;
char dest[dest_size];
Sample 4
Print some formatted integers
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
|
|
|
6. |
|
|
|
|
|
|
7. |
|
|
|
-
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_n(dest, dest_size, FMT_COMPILE("blah {:+} blah {:#x} blah"), 123456, 0x123456)
-
fmt::format_to(dest, "blah {:+} blah {:#x} blah", 123456, 0x123456)
-
fmt::format_to_n(dest, dest_size, "blah {:+} blah {:#x} blah", 123456, 0x123456)
-
std::sprintf(dest, "blah %+d blah %#x blah", 123456, 0x123456)
constexpr std::size_t dest_size = 110;
char dest[dest_size];
Sample 5
Print some formatted integers with alignment
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
|
|
|
6. |
|
|
|
|
|
|
7. |
|
|
|
-
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_n(dest, dest_size, FMT_COMPILE("blah {:_>+20} blah {:<#20x} blah"), 123456, 0x123456)
-
fmt::format_to(dest, "blah {:_>+20} blah {:<#20x} blah", 123456, 0x123456)
-
fmt::format_to_n(dest, dest_size, "blah {:_>+20} blah {:<#20x} blah", 123456, 0x123456)
-
std::sprintf(dest, "blah %+20d blah %#-20x blah", 123456, 0x123456)
constexpr std::size_t dest_size = 110;
char dest[dest_size];
Sample 6
Print floating-point values without any formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
|
|
|
6. |
|
|
|
|
|
|
7. |
|
|
|
-
strf::to(dest, dest_size)(1.123e+5, ' ', pi, ' ', 1.11e-222)
-
strf::to(dest, dest_size).tr("{} {} {}", 1.123e+5, pi, 1.11e-222)
-
fmt::format_to(dest, FMT_COMPILE("{} {} {}"), 1.123e+5, pi, 1.11e-222)
-
fmt::format_to_n(dest, dest_size, FMT_COMPILE("{} {} {}"), 1.123e+5, pi, 1.11e-222)
-
fmt::format_to(dest, "{} {} {}", 1.123e+5, pi, 1.11e-222)
-
fmt::format_to_n(dest, dest_size, "{} {} {}", 1.123e+5, pi, 1.11e-222)
-
std::sprintf(dest, "%g %g %g", 1.123e+5, pi, 1.11e-222)
Sample 7
Print floating-point values with some formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
|
|
|
6. |
|
|
|
|
|
|
7. |
|
|
|
-
strf::to(dest, dest_size)(*fixed(1.123e+5), ' ', +fixed(pi, 8), ' ', sci(1.11e-222)>30)
-
strf::to_string.tr("{} {} {}", *fixed(1.123e+5), +fixed(pi, 8), sci(1.11e-222)>30)
-
fmt::format_to(dest, FMT_COMPILE("{:#f} {:+.8f} {:>30e}"), 1.123e+5, pi, 1.11e-222)
-
fmt::format_to_n(dest, dest_size, FMT_COMPILE("{:#f} {:+.8f} {:>30e}"), 1.123e+5, pi, 1.11e-222)
-
fmt::format_to(dest, "{:#f} {:+.8f} {:>30e}", 1.123e+5, pi, 1.11e-222)
-
fmt::format_to_n(dest, dest_size, "{:#f} {:+.8f} {:>30e}", 1.123e+5, pi, 1.11e-222)
-
std::sprintf(dest, "%#f %+.8f %30e", 1.123e+5, pi, 1.11e-222)
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/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
-
strf::to_string (123456)
-
strf::to_string .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/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
5. |
|
|
|
-
strf::to_string (0.123456)
-
strf::to_string .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/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
-
strf::to_string ("Blah ", str, "!\n")
-
strf::to_string .tr("Blah {}!\n", str)
-
fmt::format(FMT_COMPILE("Blah {}!\n"), str)
-
fmt::format("Blah {}!\n", str)
std::string str = "blah blah blah blah blah ";
Sample 4
Print a string with alignment formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
-
strf::to_string ("Blah ", strf::right(str, 40, '.'), "!\n")
-
strf::to_string .tr("Blah {}!\n", strf::right(str, 40, '.')
-
fmt::format(FMT_COMPILE("Blah {:.>40}!\n"), str)
-
fmt::format("Blah {:.>40}!\n", str)
Sample 5
Print integers without formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
-
strf::to_string ("blah ", 123456, " blah ", 0x123456, " blah")
-
strf::to_string .tr("blah {} blah {} blah", 123456, 0x123456)
-
fmt::format(FMT_COMPILE("blah {} blah {} blah"), 123456, 0x123456)
-
fmt::format("blah {} blah {} blah", 123456, 0x123456)
Sample 6
Print integers with some basic formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
-
strf::to_string("blah ", +strf::dec(123456), " blah ", *strf::hex(0x123456), " blah")
-
strf::to_string.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)
Sample 7
Print some formatted integers with alignment
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
-
strf::to_string("blah ", +strf::right(123456, 20, '_'), " blah ", *strf::hex(0x123456)<20, " blah")
-
strf::to_string.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)
Sample 8
Print floating-point values without formatting
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
-
strf::to_string(1.123e+5, ' ', M_PI, ' ', 1.11e-222)
-
strf::to_string.tr("{} {} {}", 1.123e+5, M_PI, 1.11e-222)
-
fmt::format(FMT_COMPILE("{} {} {}"), 1.123e+5, M_PI, 1.11e-222)
-
fmt::format("{} {} {}", 1.123e+5, M_PI, 1.11e-222)
Sample 9
Print floating-point values with some formatting options
VS/ho | VS/s | GCC/ho | GCC/s | Clang/ho | Clang/s | |
---|---|---|---|---|---|---|
1. |
|
|
|
|
|
|
2. |
|
|
|
|
|
|
3. |
|
|
|
|
|
|
4. |
|
|
|
|
|
|
-
strf::to_string(*fixed(1.123e+5), ' ', +fixed(M_PI, 8), ' ', sci(1.11e-222)>30)
-
strf::to_string.tr("{} {} {}", *fixed(1.123e+5), +fixed(M_PI, 8), sci(1.11e-222)>30)
-
fmt::format(FMT_COMPILE("{:#f} {:+.8f} {:>30e}"), 1.123e+5, M_PI, 1.11e-222)
-
fmt::format("{:#f} {:+.8f} {:>30e}", 1.123e+5, M_PI, 1.11e-222)
Compilation performance
You can run these benchmarks in your computer by executing the commands below ( it does not work on Windows ).
git clone https://github.com/robhz786/strf-benchmarks cd strf-benchmarks git submodule update --init cd compilation-benchmarks export CXX=gcc # or some other compiler export CXXFLAGS=--std=c++2a # or some other compile flag ( optional ) ./run_benchmarks.py # this script takes a long time to run
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.
The flag --std=c++2a
was used.
Clang 17.0.3
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 13.1.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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|