diff --git a/CMakeLists.txt b/CMakeLists.txt index ba78c1f..64c48c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ include(FetchContent) project( simstr - VERSION 1.6.2 + VERSION 1.6.3 DESCRIPTION "Yet another modern C++ string library" HOMEPAGE_URL "https://github.com/orefkov/simstr" LANGUAGES CXX diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt index c84253e..1b4d444 100644 --- a/bench/CMakeLists.txt +++ b/bench/CMakeLists.txt @@ -6,10 +6,10 @@ cmake_minimum_required (VERSION 3.15) add_executable(benchStr bench_str.cpp bench.h) target_link_libraries(benchStr simstr::simstr benchmark::benchmark) target_compile_features(benchStr PUBLIC cxx_std_23) +target_compile_definitions(benchStr PRIVATE SIMSTR_VERSION="${PROJECT_VERSION}") add_executable(process_result process_result.cpp) target_link_libraries(process_result simstr_simstr) - if (EMSCRIPTEN) #target_link_options(benchStr PRIVATE -sSTACK_SIZE=1048576 -sINITIAL_MEMORY=128MB -sALLOW_MEMORY_GROWTH=0) set_target_properties (benchStr PROPERTIES SUFFIX .html) diff --git a/bench/bench_str.cpp b/bench/bench_str.cpp index 9c20a32..fdda21a 100644 --- a/bench/bench_str.cpp +++ b/bench/bench_str.cpp @@ -155,7 +155,7 @@ void ConcatSimToSimHexS(benchmark::State& state) { for (auto _: state) { for (unsigned i = 1; i <= 100'000; i *= 10) { benchmark::DoNotOptimize(s1); - stringa str = e_subst(S_FRM("{}{} end"), s1, e_hex(i)); + stringa str = e_subst("{}{} end", s1, e_hex(i)); benchmark::DoNotOptimize(str); } } @@ -176,13 +176,58 @@ void ConcatSimToSimHexVS(benchmark::State& state) { BENCHMARK(__)->Name("----- Concatenate string + Hex Number + \"Literal\" ---------")->Repetitions(1); BENCHMARK(ConcatStdToFmtHex) ->Name("Concat std::string and format hex number and literal to std::string"); BENCHMARK(ConcatAllFmtToHex) ->Name("std::format std::string and hex number by literal to std::string"); -BENCHMARK(ConcatStdToCharsHex) ->Name("Concat std::string and std::tochars and string to std::string"); +BENCHMARK(ConcatStdToCharsHex) ->Name("Concat std::string and std::to_chars and string to std::string"); BENCHMARK(ConcatSimToStdHex) ->Name("Concat std::string and hex number and literal by StrExpr to std::string"); BENCHMARK(ConcatSimToSimHex) ->Name("Concat stringa and hex number and literal by StrExpr to simstr::stringa"); BENCHMARK(ConcatSimToSimHexC) ->Name("Concat stringa and hex number and literal by e_concat to simstr::stringa"); BENCHMARK(ConcatSimToSimHexS) ->Name("Subst stringa and hex number by e_subst literal to simstr::stringa"); BENCHMARK(ConcatSimToSimHexVS) ->Name("Subst stringa and hex number by e_vsubst stra to simstr::stringa"); +void SubstSimToSimBin(benchmark::State& state) { + static bool first = true; + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + stringa str = e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i)); + benchmark::DoNotOptimize(str); + } + } +} + +void FormatStdToStdBin(benchmark::State& state) { + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + std::string str = std::format("art {:#010o} end", i); + benchmark::DoNotOptimize(str); + } + } +} + +void VSubstSimToSimBin(benchmark::State& state) { + ssa pattern = "art {} end"; + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + stringa str = e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i)); + benchmark::DoNotOptimize(str); + } + } +} + +void VFormatStdToStdBin(benchmark::State& state) { + std::string_view pattern = "art {:#010o} end"; + static bool first = true; + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + std::string str = std::vformat(pattern, std::make_format_args(i)); + benchmark::DoNotOptimize(str); + } + } +} +BENCHMARK(__)->Name("----- format/vformat and subst/vsubst octal number ---------")->Repetitions(1); +BENCHMARK(SubstSimToSimBin) ->Name("e_subst(\"art {} end\", e_int<8, f::w<10> | f::p | f::z>(i))"); +BENCHMARK(FormatStdToStdBin) ->Name("std::format(\"art {:#010o} end\", i)"); +BENCHMARK(VSubstSimToSimBin) ->Name("e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))"); +BENCHMARK(VFormatStdToStdBin) ->Name("std::vformat(pattern, std::make_format_args(i))"); + void ConcatStdToStdS(benchmark::State& state) { std::string s1 = "start "; for (auto _: state) { @@ -2343,7 +2388,10 @@ BENCHMARK(BuildFuncNameSimStr) ->Name("Build func full name stringa;"); BENCHMARK(BuildFuncNameSimStr1) ->Name("Build func full name stringa 1;"); int main(int argc, char** argv) { - char arg1[] = "--benchmark_repetitions=10", arg2[] = "--benchmark_report_aggregates_only=true"; + std::cout << "Benchmarks of simstr, version " SIMSTR_VERSION << "\n" + << "Sources: https://github.com/orefkov/simstr\n" + << "Results: https://orefkov.github.io/simstr/results.html\n" << std::endl; + char arg1[] = "--benchmark_repetitions=4", arg2[] = "--benchmark_report_aggregates_only=true"; char* my_params[] = {argv[0], arg1, arg2}; if (argc < 2) { argc = 3; diff --git a/bench/header.txt b/bench/header.txt index 11e13f5..272d258 100644 --- a/bench/header.txt +++ b/bench/header.txt @@ -265,6 +265,7 @@ } }); -

SimStr benchmarks results

+

simstr benchmarks results

+
simstr is a powerful and convenient library for productive work with strings in C++.
All times in ns. Source for benchmarks diff --git a/bench/process_result.cpp b/bench/process_result.cpp index 0c82d7d..9ca58b6 100644 --- a/bench/process_result.cpp +++ b/bench/process_result.cpp @@ -117,7 +117,7 @@ void write_platforms_cpu(out_t& out, const results_vector& results) { size_t rp = r.cpu_info_.find('(') + 1, lp = r.cpu_info_.find(')', rp); ssa shortCpuInfo = r.cpu_info_.from_to(rp, lp); ssa cpuInfo = r.cpu_info_(lp + 2); - out.append_formatted(R"--( + out += e_subst(R"--(
  • {}{}{} Include in charts:
  • )--", r.platform_, shortCpuInfo, cpuInfo, counter++); script += "'" + e_repl(r.platform_.to_str(), "'", "\\'") + "'" + e_choice(&r == &results.back(), "]", ","); diff --git a/bench/results.html b/bench/results.html index c583e78..f8702b9 100644 --- a/bench/results.html +++ b/bench/results.html @@ -265,7 +265,8 @@ } }); -

    SimStr benchmarks results

    +

    simstr benchmarks results

    +
    simstr is a powerful and convenient library for productive work with strings in C++.
    All times in ns. Source for benchmarks
    Group tests by platforms in charts:

    Test configurations:

      @@ -274,14 +275,14 @@ L1 Instruction 32 KiB (x16) L2 Unified 256 KiB (x16) L3 Unified 40960 KiB (x1) -Load Average: 0.02, 0.47, 0.66 +Load Average: 0.00, 0.00, 0.00 ***WARNING*** ASLR is enabled, the results may have unreproducible noise in them. Include in charts:
    • Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-1332 X 2494.22 MHz CPU sCPU Caches: L1 Data 32 KiB (x16) L1 Instruction 32 KiB (x16) L2 Unified 256 KiB (x16) L3 Unified 40960 KiB (x1) -Load Average: 0.05, 0.01, 0.00 +Load Average: 0.24, 0.68, 0.48 ***WARNING*** ASLR is enabled, the results may have unreproducible noise in them. Include in charts:
    • Xeon E5-2682 v4, Windows 10, Clang-1932 X 2494 MHz CPU sCPU Caches: L1 Data 32 KiB (x16) @@ -309,7 +310,7 @@ Load Average: 0.05, 0.01, 0.00 benchmark::DoNotOptimize(str); } } -}209199268313902 +}2342112663151022 Concat std::string and number by StrExpr to std::stringvoid ConcatSimToStd(benchmark::State& state) { std::string s1 = "start "; for (auto _: state) { @@ -319,7 +320,7 @@ Load Average: 0.05, 0.01, 0.00 benchmark::DoNotOptimize(str); } } -}10794.7154210401 +}104111159213449 Concat stringa and number by StrExpr to simstr::stringavoid ConcatSimToSim(benchmark::State& state) { stra s1 = "start "; for (auto _: state) { @@ -336,7 +337,7 @@ Load Average: 0.05, 0.01, 0.00 Unlike std::string, stringa holds 23 characters in SSO instead of 15, so at the end of the std::string test, memory has to be allocated, -while in stringa , the entire test is included in SSO.64.571.666.0109228 +while in stringa , the entire test is included in SSO.62.472.667.5121230 Concat stringa and number by e_concat to simstr::stringavoid ConcatSimToSimConcat(benchmark::State& state) { stra s1 = "start "; for (auto _: state) { @@ -346,12 +347,12 @@ while in stringa , the entire test is included in SSO.72.875.776.6123218 +}67.879.075.4119239

    # Concatenate string + Hex Number + "Literal"

    @@ -367,7 +368,7 @@ while in stringa , the entire test is included in SSO.68264374110291396 +}68465373110331423 std::format std::string and hex number by literal to std::stringvoid ConcatAllFmtToHex(benchmark::State& state) { // We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer. std::string s1 = "art "; @@ -379,8 +380,8 @@ while in stringa , the entire test is included in SSO.862926153818621628 -Concat std::string and std::tochars and string to std::stringvoid ConcatStdToCharsHex(benchmark::State& state) { +}872960152418411601 +Concat std::string and std::to_chars and string to std::stringvoid ConcatStdToCharsHex(benchmark::State& state) { // We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer. std::string s1 = "art "; for (auto _: state) { @@ -393,7 +394,7 @@ while in stringa , the entire test is included in SSO.198175195256627 +}203197191251640 Concat std::string and hex number and literal by StrExpr to std::stringvoid ConcatSimToStdHex(benchmark::State& state) { // We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer. std::string s1 = "art "; @@ -405,7 +406,7 @@ while in stringa , the entire test is included in SSO.13212280.1133396 +}14212780.0119422 Concat stringa and hex number and literal by StrExpr to simstr::stringavoid ConcatSimToSimHex(benchmark::State& state) { // stringa SSO buffer is 23, but we use a short string to compare under the same conditions stra s1 = "art "; @@ -417,7 +418,7 @@ while in stringa , the entire test is included in SSO.11612072.4109209 +}12412475.099.3212 Concat stringa and hex number and literal by e_concat to simstr::stringavoid ConcatSimToSimHexC(benchmark::State& state) { // stringa SSO buffer is 23, but we use a short string to compare under the same conditions stra s1 = "art "; @@ -429,18 +430,18 @@ while in stringa , the entire test is included in SSO.11512787.1102221 +}12613480.4104213 Subst stringa and hex number by e_subst literal to simstr::stringavoid ConcatSimToSimHexS(benchmark::State& state) { // stringa SSO buffer is 23, but we use a short string to compare under the same conditions stra s1 = "art "; for (auto _: state) { for (unsigned i = 1; i <= 100'000; i *= 10) { benchmark::DoNotOptimize(s1); - stringa str = e_subst(S_FRM("{}{} end"), s1, e_hex<HexFlags::Short>(i)); + stringa str = e_subst("{}{} end", s1, e_hex<HexFlags::Short>(i)); benchmark::DoNotOptimize(str); } } -}180181149175450 +}216173148175486 Subst stringa and hex number by e_vsubst stra to simstr::stringavoid ConcatSimToSimHexVS(benchmark::State& state) { // stringa SSO buffer is 23, but we use a short string to compare under the same conditions stra s1 = "art "; @@ -451,19 +452,64 @@ while in stringa , the entire test is included in SSO.315279263346740 +}321284295349773
    -

    # Concatenate string + "Literal"

    +

    # format/vformat and subst/vsubst octal number

    + + + + + +
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))void SubstSimToSimBin(benchmark::State& state) { + static bool first = true; + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + stringa str = e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i)); + benchmark::DoNotOptimize(str); + } + } +}168145162206641
    std::format("art {:#010o} end", i)void FormatStdToStdBin(benchmark::State& state) { + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + std::string str = std::format("art {:#010o} end", i); + benchmark::DoNotOptimize(str); + } + } +}10041261136916781750
    e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))void VSubstSimToSimBin(benchmark::State& state) { + ssa pattern = "art {} end"; + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + stringa str = e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i)); + benchmark::DoNotOptimize(str); + } + } +}3633413053541016
    std::vformat(pattern, std::make_format_args(i))void VFormatStdToStdBin(benchmark::State& state) { + std::string_view pattern = "art {:#010o} end"; + static bool first = true; + for (auto _: state) { + for (unsigned i = 1; i <= 100'000; i *= 10) { + std::string str = std::vformat(pattern, std::make_format_args(i)); + benchmark::DoNotOptimize(str); + } + } +}10241132137316561747
    + +

    # Concatenate string + "Literal"

    +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    Concat std::string by std to std::stringvoid ConcatStdToStdS(benchmark::State& state) { std::string s1 = "start "; @@ -474,7 +520,7 @@ while in stringa , the entire test is included in SSO.44.349.640.156.5101
    55.852.040.955.096.4
    Concat std::string by StrExpr to std::stringvoid ConcatSimToStdS(benchmark::State& state) { std::string s1 = "start "; for (auto _: state) { @@ -484,7 +530,7 @@ while in stringa , the entire test is included in SSO.34.829.538.983.3108
    39.535.840.775.6111
    Concat stringa by StrExpr to stringavoid ConcatSimToSimS(benchmark::State& state) { stra s1 = "start "; for (auto _: state) { @@ -494,35 +540,35 @@ while in stringa , the entire test is included in SSO.29.128.029.252.496.7
    -

    # Find three concatenated string in string_view

    +

    # Find three concatenated string in string_view

    +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    Find concat three std::stringsize_t find_pos_str(std::string_view src, std::string_view name) { // before C++26 we can not concatenate string and string_view... return src.find("\n- "s + std::string{name} + " -\n"); -}114138214218187
    113129204230149
    Find concat three strexprsize_t find_pos_exp(ssa src, ssa name) { return src.find(std::string{"\n- " + name + " -\n"}); -}50.541.0115119107
    48.054.9113129106
    Find concat three simstrsize_t find_pos_sim(ssa src, ssa name) { return src.find(lstringa<200>{"\n- " + name + " -\n"}); } >> Если результат конкатенации меньше 207 символов, он собирается в буфере на стеке, без аллокации и деалокации. If the concatenation result is less than 207 characters, -it is collected in a stack-based buffer, without allocation or deallocation.53.319.829.928.776.4
    -

    # Build Type Name

    +

    # Build Type Name

    +} +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    BuildTypeNameStr 0/0std::string buildTypeNameStr(std::string_view type_name, size_t prec, size_t scale) { std::string res{type_name}; @@ -534,19 +580,19 @@ it is collected in a stack-based buffer, without allocation or deallocation.7.1412.18.1017.317.3
    7.5110.28.1617.618.0
    BuildTypeNameExp 0/0std::string buildTypeNameExp(ssa type_name, size_t prec, size_t scale) { if (prec) { return type_name + "(" + prec + e_if(scale, ","_ss + scale) + ")"; } return type_name; -}6.746.357.5214.016.1
    6.396.447.6614.017.5
    BuildTypeNameSim 0/0stringa buildTypeNameSim(ssa type_name, size_t prec, size_t scale) { if (prec) { return type_name + "(" + prec + e_if(scale, ","_ss + scale) + ")"; } return type_name; -}5.105.228.4215.916.4
    4.205.147.7314.815.6
    BuildTypeNameStr 10/10std::string buildTypeNameStr(std::string_view type_name, size_t prec, size_t scale) { std::string res{type_name}; if (prec) { @@ -557,29 +603,29 @@ it is collected in a stack-based buffer, without allocation or deallocation.56.684.259.180.2274
    65.685.159.779.7296
    BuildTypeNameExp 10/10std::string buildTypeNameExp(ssa type_name, size_t prec, size_t scale) { if (prec) { return type_name + "(" + prec + e_if(scale, ","_ss + scale) + ")"; } return type_name; -}30.126.936.142.994.7
    33.726.532.437.9106
    BuildTypeNameSim 10/10stringa buildTypeNameSim(ssa type_name, size_t prec, size_t scale) { if (prec) { return type_name + "(" + prec + e_if(scale, ","_ss + scale) + ")"; } return type_name; -}22.623.026.536.168.8
    -

    # Replace string by copy

    +

    # Replace string by copy

    +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    Concat with replace strstd::string make_str_str(std::string_view from, std::string_view pattern, std::string_view repl) { auto str_replace = [](std::string_view from, std::string_view pattern, std::string_view repl) { @@ -597,18 +643,18 @@ it is collected in a stack-based buffer, without allocation or deallocation."; -}205229317346444
    210228349341496
    Concat with replace expstd::string make_str_exp(std::string_view from, std::string_view pattern, std::string_view repl) { return "<" + e_repl(from, pattern, repl) + ">"; } >> В simstr строковое выражение для замены подстрок есть "из коробки". -simstr has a string expression for replacing substrings out of the box.143131210225252
    -

    # Create Empty Str

    +

    # Create Empty Str

    +Empty lines, nothing unusual. +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string e;template<typename T> void CreateEmpty(benchmark::State& state) { @@ -617,52 +663,52 @@ void CreateEmpty(benchmark::State& state) { benchmark::DoNotOptimize(empty_string); } } >> Пустые строки, ничего необычного. -Empty lines, nothing unusual.1.101.131.112.842.15
    1.091.111.132.222.16
    std::string_view e;template<typename T> void CreateEmpty(benchmark::State& state) { for (auto _: state) { T empty_string; benchmark::DoNotOptimize(empty_string); } -}0.3760.7500.3621.820.974
    0.3650.7330.3641.880.989
    ssa e;template<typename T> void CreateEmpty(benchmark::State& state) { for (auto _: state) { T empty_string; benchmark::DoNotOptimize(empty_string); } -}0.3740.1810.3711.460.939
    0.3630.1820.3571.470.945
    stringa e;template<typename T> void CreateEmpty(benchmark::State& state) { for (auto _: state) { T empty_string; benchmark::DoNotOptimize(empty_string); } -}0.7400.7310.7632.192.19
    0.7300.7380.7422.202.16
    lstringa<20> e;template<typename T> void CreateEmpty(benchmark::State& state) { for (auto _: state) { T empty_string; benchmark::DoNotOptimize(empty_string); } -}1.131.111.122.622.21
    1.131.121.112.552.22
    lstringa<40> e;template<typename T> void CreateEmpty(benchmark::State& state) { for (auto _: state) { T empty_string; benchmark::DoNotOptimize(empty_string); } -}1.191.111.122.572.57
    -

    # Create Str from short literal (9 symbols)

    +

    # Create Str from short literal (9 symbols)

    +time is spent only copying 10 bytes. +a pointer to text and its length. +} +only a pointer to the text and its length. +time is spent only on copying bytes. -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string e = "Test text";template<typename T> void CreateShortLiteral(benchmark::State& state) { @@ -673,7 +719,7 @@ void CreateShortLiteral(benchmark::State& state) { } >> Короткий литерал помещается во внутренний буфер std::string, время тратится только на копирование 10 байтов. The short literal is placed in the internal std::string buffer; -time is spent only copying 10 bytes.1.831.871.822.682.34
    1.831.991.802.602.29
    std::string_view e = "Test text";template<typename T> void CreateShortLiteral(benchmark::State& state) { for (auto _: state) { @@ -683,14 +729,14 @@ void CreateShortLiteral(benchmark::State& state) { } >> И string_view, и ssa - по сути одно и то же: указатель на текст и его длина. Both string_view and ssa are essentially the same thing: -a pointer to text and its length.0.7380.7340.7321.841.26
    0.7340.7780.7301.791.24
    ssa e = "Test text";template<typename T> void CreateShortLiteral(benchmark::State& state) { for (auto _: state) { T empty_string = TEST_TEXT; benchmark::DoNotOptimize(empty_string); } -}0.3680.7350.3621.830.978
    0.3720.7470.3681.790.976
    stringa e = "Test text";template<typename T> void CreateShortLiteral(benchmark::State& state) { for (auto _: state) { @@ -700,7 +746,7 @@ void CreateShortLiteral(benchmark::State& state) { } >> stringa при инициализации константным литералом так же сохраняет только указатель на текст и его длину. When initialized with a constant literal, stringa also stores -only a pointer to the text and its length.1.121.141.102.832.18
    1.111.091.112.212.22
    lstringa<20> e = "Test text";template<typename T> void CreateShortLiteral(benchmark::State& state) { for (auto _: state) { @@ -710,24 +756,24 @@ void CreateShortLiteral(benchmark::State& state) { } >> Внутреннего буфера хватает для размещения символов, время уходит только на копирование байтов. The internal buffer is sufficient to accommodate characters; -time is spent only on copying bytes.1.891.881.882.562.66
    1.851.831.842.622.64
    lstringa<40> e = "Test text";template<typename T> void CreateShortLiteral(benchmark::State& state) { for (auto _: state) { T empty_string = TEST_TEXT; benchmark::DoNotOptimize(empty_string); } -}1.901.831.862.552.67
    -

    # Create Str from long literal (30 symbols)

    +

    # Create Str from long literal (30 symbols)

    +But how much slower is allocation under Windows than under Linux, 20 ns vs. 70 ns... +remember the pointer to the text and its size. +} +stringa doesn't lag behind on constant literals! +Obviously, 30 characters already require allocation. -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string e = "123456789012345678901234567890";template<typename T> void CreateLongLiteral(benchmark::State& state) { @@ -740,7 +786,7 @@ void CreateLongLiteral(benchmark::State& state) { Но как же отстает аллокация под Windows от Linux'а, 20 vs 70 ns... Here, the literal doesn't fit into the internal buffer, and 30 bytes are allocated and copied. -But how much slower is allocation under Windows than under Linux, 20 ns vs. 70 ns...18.718.879.378.115.9
    19.319.070.180.216.3
    std::string_view e = "123456789012345678901234567890";template<typename T> void CreateLongLiteral(benchmark::State& state) { for (auto _: state) { @@ -750,14 +796,14 @@ void CreateLongLiteral(benchmark::State& state) { } >> string_view и ssa по прежнему ничего не делают, кроме запоминания указателя на текст и его размера. string_view and ssa still do nothing except -remember the pointer to the text and its size.0.7410.7380.7261.831.25
    0.7390.7350.7571.821.23
    ssa e = "123456789012345678901234567890";template<typename T> void CreateLongLiteral(benchmark::State& state) { for (auto _: state) { T empty_string{LONG_TEXT}; benchmark::DoNotOptimize(empty_string); } -}0.3690.7320.3641.820.981
    0.3860.7220.3911.840.976
    stringa e = "123456789012345678901234567890";template<typename T> void CreateLongLiteral(benchmark::State& state) { for (auto _: state) { @@ -765,7 +811,7 @@ void CreateLongLiteral(benchmark::State& state) { benchmark::DoNotOptimize(empty_string); } } >> stringa на константных литералах не отстает! -stringa doesn't lag behind on constant literals!1.111.111.112.542.24
    1.121.091.122.522.27
    lstringa<20> e = "123456789012345678901234567890";template<typename T> void CreateLongLiteral(benchmark::State& state) { for (auto _: state) { @@ -774,7 +820,7 @@ void CreateLongLiteral(benchmark::State& state) { } } >> lstringa<20> может вместить в себя до 23 символов, Очевидно, что для 30-и символов уже нужна аллокация. -Obviously, 30 characters already require allocation.20.521.275.774.917.2
    21.720.376.977.317.1
    lstringa<40> e = "123456789012345678901234567890";template<typename T> void CreateLongLiteral(benchmark::State& state) { for (auto _: state) { @@ -784,17 +830,17 @@ void CreateLongLiteral(benchmark::State& state) { } >> А в lstringa<40> влезает до 47 символов, так что просто копируется 30 байтов. And lstringa<40> can hold up to 47 characters, so 30 -bytes are simply copied.2.551.852.533.312.99
    -

    # Create copy of Str with 9 symbols

    +

    # Create copy of Str with 9 symbols

    +The string is within the SSO, so it just copies the bytes. +} +string information is copied. +especially if it is initialized with a literal. +In both cases, the internal buffer is sufficient. -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string e = "Test text"; auto c{e};template<typename T> void CopyShortString(benchmark::State& state) { @@ -805,7 +851,7 @@ void CopyShortString(benchmark::State& state) { benchmark::DoNotOptimize(x); } } >> Строка в пределах SSO, так что просто копирует байты. -The string is within the SSO, so it just copies the bytes.5.144.821.885.752.26
    6.074.881.825.242.21
    std::string_view e = "Test text"; auto c{e};template<typename T> void CopyShortString(benchmark::State& state) { T x{TEST_TEXT}; @@ -814,7 +860,7 @@ void CopyShortString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}0.3880.3810.3713.491.25
    0.3820.3780.3692.911.24
    ssa e = "Test text"; auto c{e};template<typename T> void CopyShortString(benchmark::State& state) { T x{TEST_TEXT}; @@ -826,7 +872,7 @@ void CopyShortString(benchmark::State& state) { } >> ssa и string_view не владеют строкой, копируется только информация о строке. ssa and string_view don't own the string; only the -string information is copied.0.3670.3730.3763.511.24
    0.3670.3750.3652.881.23
    stringa e = "Test text"; auto c{e};template<typename T> void CopyShortString(benchmark::State& state) { T x{TEST_TEXT}; @@ -838,7 +884,7 @@ void CopyShortString(benchmark::State& state) { } >> Копирование stringa происходит быстро, особенно если она инициализирована литералом. Copying a stringa is fast, -especially if it is initialized with a literal.1.101.301.284.032.58
    1.121.091.284.092.64
    lstringa<20> e = "Test text"; auto c{e};template<typename T> void CopyShortString(benchmark::State& state) { T x{TEST_TEXT}; @@ -848,7 +894,7 @@ void CopyShortString(benchmark::State& state) { benchmark::DoNotOptimize(x); } } >> В обоих случаях хватает внутреннего буфера. -In both cases, the internal buffer is sufficient.4.384.615.117.8015.2
    4.124.524.777.6015.5
    lstringa<40> e = "Test text"; auto c{e};template<typename T> void CopyShortString(benchmark::State& state) { T x{TEST_TEXT}; @@ -858,17 +904,17 @@ void CopyShortString(benchmark::State& state) { benchmark::DoNotOptimize(x); } } >> Только копируются байты. -Only bytes are copied.4.524.585.118.5314.8
    -

    # Create copy of Str with 30 symbols

    +

    # Create copy of Str with 30 symbols

    +SSO is no longer sufficient. And again, how allocation lags under Windows... +} +} +compare with the previous benchmark. +Doesn't fit, allocation. -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string e = "123456789012345678901234567890"; auto c{e};template<typename T> void CopyLongString(benchmark::State& state) { @@ -880,7 +926,7 @@ void CopyLongString(benchmark::State& state) { } >> Копирования длинной строки вызывает аллокацию, SSO уже не хватает. И снова как же отстаёт аллокация под Windows... Copying a long string causes allocations, -SSO is no longer sufficient. And again, how allocation lags under Windows...18.923.877.278.233.9
    20.123.570.677.936.8
    std::string_view e = "123456789012345678901234567890"; auto c{e};template<typename T> void CopyLongString(benchmark::State& state) { T x = LONG_TEXT; @@ -888,7 +934,7 @@ void CopyLongString(benchmark::State& state) { T copy{x}; benchmark::DoNotOptimize(copy); } -}0.7330.7420.7311.811.25
    0.7320.7380.7262.041.25
    ssa e = "123456789012345678901234567890"; auto c{e};template<typename T> void CopyLongString(benchmark::State& state) { T x = LONG_TEXT; @@ -896,7 +942,7 @@ void CopyLongString(benchmark::State& state) { T copy{x}; benchmark::DoNotOptimize(copy); } -}0.3670.7420.3641.810.972
    0.3760.7450.3622.070.975
    stringa e = "123456789012345678901234567890"; auto c{e};template<typename T> void CopyLongString(benchmark::State& state) { T x = LONG_TEXT; @@ -907,7 +953,7 @@ void CopyLongString(benchmark::State& state) { } >> А вот у stringa копирование литерала не зависит от его длины, сравни с предыдущим бенчмарком. But with stringa, literal copying doesn't depend on its length, -compare with the previous benchmark.1.151.111.862.922.22
    1.151.211.822.942.24
    lstringa<20> e = "123456789012345678901234567890"; auto c{e};template<typename T> void CopyLongString(benchmark::State& state) { T x = LONG_TEXT; @@ -916,7 +962,7 @@ void CopyLongString(benchmark::State& state) { benchmark::DoNotOptimize(copy); } } >> Не влезает, аллокация. -Doesn't fit, allocation.19.920.278.680.916.3
    21.522.477.580.515.9
    lstringa<40> e = "123456789012345678901234567890"; auto c{e};template<typename T> void CopyLongString(benchmark::State& state) { T x = LONG_TEXT; @@ -925,17 +971,17 @@ void CopyLongString(benchmark::State& state) { benchmark::DoNotOptimize(copy); } } >> Уложили во внутренний буфер. -Placed in the internal buffer.4.504.824.786.6014.0
    -

    # Find 9 symbols text in end of 99 symbols text

    +

    # Find 9 symbols text in end of 99 symbols text

    +However, Windows and Linux are clearly in different weight classes. +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string::find;template<typename T> void Find(benchmark::State& state) { @@ -954,7 +1000,7 @@ void Find(benchmark::State& state) { } >> Здесь "победила дружба", у всех типов по колонке примерно одинаково. Однако, Windows и Linux явно в разных весовых категориях. Here, "friendship wins," with all types scoring roughly equally. -However, Windows and Linux are clearly in different weight classes.6.716.8238.341.945.3
    6.676.9440.943.744.9
    std::string_view::find;template<typename T> void Find(benchmark::State& state) { T x{LONG_TEXT LONG_TEXT LONG_TEXT TEST_TEXT}; @@ -969,7 +1015,7 @@ void Find(benchmark::State& state) { benchmark::DoNotOptimize(i); benchmark::DoNotOptimize(x); } -}7.246.7638.839.749.9
    7.816.6638.242.151.6
    ssa::find;template<typename T> void Find(benchmark::State& state) { T x{LONG_TEXT LONG_TEXT LONG_TEXT TEST_TEXT}; @@ -984,7 +1030,7 @@ void Find(benchmark::State& state) { benchmark::DoNotOptimize(i); benchmark::DoNotOptimize(x); } -}6.726.2917.420.649.3
    7.116.5719.122.249.0
    stringa::find;template<typename T> void Find(benchmark::State& state) { T x{LONG_TEXT LONG_TEXT LONG_TEXT TEST_TEXT}; @@ -999,7 +1045,7 @@ void Find(benchmark::State& state) { benchmark::DoNotOptimize(i); benchmark::DoNotOptimize(x); } -}7.596.8218.328.751.1
    7.186.6817.530.351.1
    lstringa<20>::find;template<typename T> void Find(benchmark::State& state) { T x{LONG_TEXT LONG_TEXT LONG_TEXT TEST_TEXT}; @@ -1014,7 +1060,7 @@ void Find(benchmark::State& state) { benchmark::DoNotOptimize(i); benchmark::DoNotOptimize(x); } -}6.277.0917.520.743.8
    7.106.6018.220.443.9
    lstringa<40>::find;template<typename T> void Find(benchmark::State& state) { T x{LONG_TEXT LONG_TEXT LONG_TEXT TEST_TEXT}; @@ -1029,17 +1075,17 @@ void Find(benchmark::State& state) { benchmark::DoNotOptimize(i); benchmark::DoNotOptimize(x); } -}6.326.4317.821.943.8
    -

    # Copy not literal Str with N symbols

    +

    # Copy not literal Str with N symbols

    +} +smaller, as far as I remember: 11 characters + 0. +Then the time for copying bytes is simply added. +} +} +} +} +} +} +} +} +The longer the string, the longer it takes to create a copy. +meaning it must store characters itself. +increment was replaced with a regular one, judging by the time. +copies faster than 15 in std::string. +Time is added for the atomic counter increment. +} +} +} +} +} +} +} +increment; copying time does not depend on the string length. +WASM has a 32-bit architecture, so SSO is up to 19 characters. +} +} +And then it starts to behave like std::string when copied. +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +allocation or atomic increment. +And then it's like everyone else. +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string copy{str_with_len_N};/15template<typename T> void CopyDynString(benchmark::State& state) { @@ -1049,7 +1095,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}4.854.811.925.0634.6
    5.615.531.845.0435.7
    std::string copy{str_with_len_N};/16template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1063,7 +1109,7 @@ void CopyDynString(benchmark::State& state) { SSO у std::string меньше, насколько я помню, 11 символов + 0. The jump where SSO ends and allocation begins is clearly visible. Note that WASM is 32-bit, and the size of the SSO for std::string is -smaller, as far as I remember: 11 characters + 0.22.223.279.184.434.9
    23.023.779.181.535.9
    std::string copy{str_with_len_N};/23template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1073,7 +1119,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(x); } } >> Дальше просто добавляется время на копирование байтов. -Then the time for copying bytes is simply added.22.223.280.389.236.1
    23.023.478.481.836.3
    std::string copy{str_with_len_N};/24template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1082,7 +1128,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}24.024.779.587.834.4
    22.923.278.182.537.4
    std::string copy{str_with_len_N};/32template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1091,7 +1137,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}23.422.781.888.937.9
    22.423.479.286.141.8
    std::string copy{str_with_len_N};/64template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1100,7 +1146,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}22.022.581.286.837.7
    23.122.480.387.940.9
    std::string copy{str_with_len_N};/128template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1109,7 +1155,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}23.524.484.490.939.1
    24.226.983.290.143.9
    std::string copy{str_with_len_N};/256template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1118,7 +1164,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}28.628.287.297.059.2
    24.724.886.788.253.7
    std::string copy{str_with_len_N};/512template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1127,7 +1173,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}28.728.684.995.855.7
    29.228.587.189.450.9
    std::string copy{str_with_len_N};/1024template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1136,7 +1182,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}35.933.896.510154.8
    45.346.798.295.258.1
    std::string copy{str_with_len_N};/2048template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1145,7 +1191,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}11912112912878.0
    12312713113483.5
    std::string copy{str_with_len_N};/4096template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1155,7 +1201,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(x); } } >> Чем длиннее строка, тем дольше создаётся копия. -The longer the string, the longer it takes to create a copy.150164172179112
    153155178184126
    stringa copy{str_with_len_N};/15template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1167,7 +1213,7 @@ void CopyDynString(benchmark::State& state) { } >> Здесь stringa инициализируется не литералом, а значит, должна сама хранить символы. Here, stringa is not initialized with a literal, -meaning it must store characters itself.1.101.111.283.982.56
    1.101.141.404.012.57
    stringa copy{str_with_len_N};/16template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1181,7 +1227,7 @@ void CopyDynString(benchmark::State& state) { инкремент заменён на обычный, судя по времени. Under WASM, stringa has a 15-character SSO. Furthermore, it was built without thread support, so the atomic -increment was replaced with a regular one, judging by the time.1.101.121.283.994.87
    1.111.141.383.994.88
    stringa copy{str_with_len_N};/23template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1193,7 +1239,7 @@ void CopyDynString(benchmark::State& state) { } >> SSO в stringa до 23 символов, и даже 23 копируются быстрее, чем 15 в std::string. SSO in stringa is up to 23 characters, and even 23 -copies faster than 15 in std::string.1.161.121.293.984.85
    1.101.121.314.114.85
    stringa copy{str_with_len_N};/24template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1205,7 +1251,7 @@ void CopyDynString(benchmark::State& state) { } >> Всё, не влезаем в SSO, а значит, используем shared буфер. Добавляется время на атомарный инкремент счётчика. That's it, we're not using SSO, so we're using a shared buffer. -Time is added for the atomic counter increment.16.016.415.918.34.91
    16.216.115.818.44.88
    stringa copy{str_with_len_N};/32template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1214,7 +1260,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}16.016.116.018.34.87
    16.316.015.918.64.97
    stringa copy{str_with_len_N};/64template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1223,7 +1269,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}16.316.116.718.44.81
    16.416.116.018.84.98
    stringa copy{str_with_len_N};/128template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1232,7 +1278,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}16.316.115.818.34.84
    16.616.215.918.44.88
    stringa copy{str_with_len_N};/256template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1241,7 +1287,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}16.016.315.818.44.87
    16.316.115.818.34.84
    stringa copy{str_with_len_N};/512template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1250,7 +1296,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}16.016.415.818.44.82
    16.316.315.818.44.82
    stringa copy{str_with_len_N};/1024template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1259,7 +1305,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}16.016.315.818.34.98
    16.416.015.818.34.85
    stringa copy{str_with_len_N};/2048template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1268,7 +1314,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}16.116.115.818.34.90
    16.316.016.018.34.85
    stringa copy{str_with_len_N};/4096template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1280,7 +1326,7 @@ void CopyDynString(benchmark::State& state) { } >> И как видно, кроме инкремента нет накладных расходов, время копирования не зависит от длины строки. And as you can see, there are no overhead costs other than the -increment; copying time does not depend on the string length.16.216.115.818.34.84
    16.316.215.819.64.80
    lstringa<16> copy{str_with_len_N};/15template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1292,7 +1338,7 @@ void CopyDynString(benchmark::State& state) { } >> lstringa<16> использует SSO до 23 символов. А в WASM 32-битная архитектура, SSO до 19 символов. lstringa<16> uses SSO up to 23 characters. -WASM has a 32-bit architecture, so SSO is up to 19 characters.4.494.554.787.3914.3
    4.194.484.587.2314.3
    lstringa<16> copy{str_with_len_N};/16template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1301,7 +1347,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}4.674.505.327.6215.0
    4.234.404.387.8914.7
    lstringa<16> copy{str_with_len_N};/23template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1310,7 +1356,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}4.624.445.127.3228.8
    4.114.564.497.6429.7
    lstringa<16> copy{str_with_len_N};/24template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1320,7 +1366,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(x); } } >> И после начинает вести себя при копировании, как std::string. -And then it starts to behave like std::string when copied.23.824.579.781.129.8
    23.423.775.083.529.6
    lstringa<16> copy{str_with_len_N};/32template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1329,7 +1375,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}23.524.481.583.831.9
    23.223.477.287.132.2
    lstringa<16> copy{str_with_len_N};/64template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1338,7 +1384,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}25.226.578.683.431.3
    24.425.377.883.734.5
    lstringa<16> copy{str_with_len_N};/128template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1347,7 +1393,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}25.226.682.087.032.5
    24.426.683.584.134.3
    lstringa<16> copy{str_with_len_N};/256template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1356,7 +1402,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}27.829.783.488.854.6
    26.228.284.385.948.1
    lstringa<16> copy{str_with_len_N};/512template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1365,7 +1411,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}30.430.885.290.751.6
    28.931.983.587.447.2
    lstringa<16> copy{str_with_len_N};/1024template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1374,7 +1420,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}95.793.896.396.351.0
    93.796.493.896.453.7
    lstringa<16> copy{str_with_len_N};/2048template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1383,7 +1429,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}12212412412874.1
    10710713213179.5
    lstringa<16> copy{str_with_len_N};/4096template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1392,7 +1438,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}128128181187110
    121126188193123
    lstringa<512> copy{str_with_len_N};/15template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1401,7 +1447,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}4.945.795.228.9214.4
    4.495.384.868.0514.8
    lstringa<512> copy{str_with_len_N};/16template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1410,7 +1456,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}5.136.045.278.5214.2
    4.615.514.968.0615.7
    lstringa<512> copy{str_with_len_N};/23template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1419,7 +1465,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}4.865.665.428.8014.0
    4.755.674.868.2415.3
    lstringa<512> copy{str_with_len_N};/24template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1428,7 +1474,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}4.915.745.138.4614.2
    5.415.454.998.0215.2
    lstringa<512> copy{str_with_len_N};/32template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1437,7 +1483,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}4.565.347.9911.417.8
    4.775.078.6510.918.3
    lstringa<512> copy{str_with_len_N};/64template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1446,7 +1492,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}5.956.838.0911.417.4
    6.396.547.9910.818.2
    lstringa<512> copy{str_with_len_N};/128template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1455,7 +1501,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}6.866.978.4011.917.6
    6.257.268.0911.419.2
    lstringa<512> copy{str_with_len_N};/256template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1464,7 +1510,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}17.17.839.6912.819.4
    8.318.609.3012.419.6
    lstringa<512> copy{str_with_len_N};/512template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1476,7 +1522,7 @@ void CopyDynString(benchmark::State& state) { } >> Даже 512 символов копируются быстрее, чем одна аллокация или атомарный инкремент. Even 512 characters are copied faster than a single -allocation or atomic increment.10.310.611.414.321.6
    10.111.511.014.222.9
    lstringa<512> copy{str_with_len_N};/1024template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1486,7 +1532,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(x); } } >> А дальше уже как у всех. -And then it's like everyone else.95.094.898.194.952.8
    94.610899.199.557.1
    lstringa<512> copy{str_with_len_N};/2048template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1495,7 +1541,7 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}11311412913274.7
    10611013213279.9
    lstringa<512> copy{str_with_len_N};/4096template<typename T> void CopyDynString(benchmark::State& state) { T x(state.range(0), 'a'); @@ -1504,59 +1550,59 @@ void CopyDynString(benchmark::State& state) { benchmark::DoNotOptimize(copy); benchmark::DoNotOptimize(x); } -}126128185189111
    -

    # Convert to int '1234567'

    +

    # Convert to int '1234567'

    +Here, I attempted to run tests that are similar in logic to std::from_chars. +signs, spaces, 0x prefixes, etc. +decimal system, no leading spaces, and no plus sign. +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);void ToIntStr10(benchmark::State& state, const std::string& s, int c) { for (auto _: state) { @@ -1577,7 +1623,7 @@ void CopyDynString(benchmark::State& state) { In simstr, a string fragment is sufficient for conversion to a number; there's no need for null termination. The closest analog to this behavior is "std::from_chars," but unfortunately, it is very limited in its capabilities. -Here, I attempted to run tests that are similar in logic to std::from_chars.26.927.030.732.070.3
    27.127.930.732.171.7
    std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);void ToIntFromChars10(benchmark::State& state, const std::string_view& s, int c) { for (auto _: state) { int res = 0; @@ -1593,7 +1639,7 @@ Here, I attempted to run tests that are similar in logic to std::from_chars. >> from_chars требует точного указания основания счисления, не допускает знаков плюс, пробелов, префиксов 0x и т.п. from_chars requires an exact radix specification and does not allow plus -signs, spaces, 0x prefixes, etc.14.812.113.513.427.4
    15.312.513.713.727.1
    stringa s = "123456789"; int res = s.to_int<int, true, 10, false>template<typename T> void ToIntSimStr10(benchmark::State& state, T t, int c) { for (auto _: state) { @@ -1610,7 +1656,7 @@ void ToIntSimStr10(benchmark::State& state, T t, int c) { } >> Здесь для to_int заданы такие же ограничения - проверять переполнение, десятичная система, без лидирующих пробелов и знака плюс Here, to_int has the same restrictions: check for overflow, -decimal system, no leading spaces, and no plus sign.12.98.1114.115.918.8
    12.98.3214.414.618.7
    ssa s = "123456789"; int res = s.to_int<int, true, 10, false>template<typename T> void ToIntSimStr10(benchmark::State& state, T t, int c) { for (auto _: state) { @@ -1624,7 +1670,7 @@ void ToIntSimStr10(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}12.98.2213.815.016.9
    12.67.9213.715.117.0
    lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>template<typename T> void ToIntSimStr10(benchmark::State& state, T t, int c) { for (auto _: state) { @@ -1638,16 +1684,16 @@ void ToIntSimStr10(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}12.38.0714.815.916.7
    -

    # Convert to unsigned 'abcDef'

    +

    # Convert to unsigned 'abcDef'

    +Everything is the same, only for the hexadecimal system +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);void ToIntStr16(benchmark::State& state, const std::string& s, int c) { for (auto _: state) { @@ -1661,7 +1707,7 @@ void ToIntSimStr10(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); } } >> Всё то же, только для 16ричной системы -Everything is the same, only for the hexadecimal system23.523.233.235.754.8
    23.825.533.535.554.3
    std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);void ToIntFromChars16(benchmark::State& state, const std::string_view& s, int c) { for (auto _: state) { int res = 0; @@ -1674,7 +1720,7 @@ Everything is the same, only for the hexadecimal system9.6310.58.2112.528.7
    9.6410.38.1013.228.7
    stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>template<typename T> void ToIntSimStr16(benchmark::State& state, T t, int c) { for (auto _: state) { @@ -1688,7 +1734,7 @@ void ToIntSimStr16(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}12.68.0812.512.817.4
    13.58.2312.014.017.7
    ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>template<typename T> void ToIntSimStr16(benchmark::State& state, T t, int c) { for (auto _: state) { @@ -1702,7 +1748,7 @@ void ToIntSimStr16(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}12.68.1312.012.816.0
    13.37.9912.013.816.0
    lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>template<typename T> void ToIntSimStr16(benchmark::State& state, T t, int c) { for (auto _: state) { @@ -1716,16 +1762,16 @@ void ToIntSimStr16(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}12.57.7712.112.816.2
    -

    # Convert to int ' 1234567'

    +

    # Convert to int ' 1234567'

    +And here we have parsing of an arbitrary number. +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);void ToIntStr0(benchmark::State& state, const std::string& s, int c) { for (auto _: state) { @@ -1739,7 +1785,7 @@ void ToIntSimStr16(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); } } >> А здесь уже парсинг произвольного числа. -And here we have parsing of an arbitrary number.28.528.043.545.777.9
    28.528.843.544.681.3
    stringa s = " 123456789"; int res = s.to_int<int>; // Check overflowtemplate<typename T> void ToIntSimStr0(benchmark::State& state, T t, int c) { for (auto _: state) { @@ -1753,7 +1799,7 @@ void ToIntSimStr0(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}19.614.818.822.124.1
    19.115.117.719.024.5
    ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflowvoid ToIntNoOverflow(benchmark::State& state, ssa t, int c) { for (auto _: state) { int res = t.to_int<int, false>().value; @@ -1766,14 +1812,14 @@ void ToIntSimStr0(benchmark::State& state, T t, int c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}15.213.715.416.023.2
    -

    # Convert to double '1234.567e10'

    +

    # Convert to double '1234.567e10'

    +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);void ToDoubleStr(benchmark::State& state, const std::string& s, double c) { for (auto _: state) { @@ -1790,7 +1836,7 @@ void ToIntSimStr0(benchmark::State& state, T t, int c) { #endif benchmark::DoNotOptimize(res); } -}64.163.6101105198
    66.365.110099.7197
    std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);void ToDoubleFromChars(benchmark::State& state, const std::string_view& s, double c) { for (auto _: state) { double res = 0; @@ -1805,7 +1851,7 @@ void ToIntSimStr0(benchmark::State& state, T t, int c) { #endif benchmark::DoNotOptimize(res); } -}24.423.964.180.7107
    23.923.859.380.0107
    ssa s = "1234.567e10"; double res = *s.to_double()template<typename T> void ToDoubleSimStr(benchmark::State& state, T t, double c) { for (auto _: state) { @@ -1823,14 +1869,14 @@ void ToDoubleSimStr(benchmark::State& state, T t, double c) { benchmark::DoNotOptimize(res); benchmark::DoNotOptimize(t); } -}26.124.636.036.243.0
    -

    # Append const literal of 16 bytes 64 times, 1024 total length

    +

    # Append const literal of 16 bytes 64 times, 1024 total length

    +} +} +} +required, and the faster the result. +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::stringstream str; ... str << "abbaabbaabbaabba";void AppendStreamConstLiteral(benchmark::State& state) { for (auto _: state) { @@ -1849,7 +1895,7 @@ void ToDoubleSimStr(benchmark::State& state, T t, double c) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(str); } -}13511440475056004315
    13431335482955334356
    std::string str; ... str += "abbaabbaabbaabba";void AppendStdStringConstLiteral(benchmark::State& state) { for (auto _: state) { std::string result; @@ -1864,7 +1910,7 @@ void ToDoubleSimStr(benchmark::State& state, T t, double c) { #endif benchmark::DoNotOptimize(result); } -}37538910631313608
    40038010791309595
    lstringa<8> str; ... str += "abbaabbaabbaabba";template<unsigned N> void AppendLstringConstLiteral(benchmark::State& state) { for (auto _: state) { @@ -1880,7 +1926,7 @@ void AppendLstringConstLiteral(benchmark::State& state) { #endif benchmark::DoNotOptimize(result); } -}411398730904727
    384394747947741
    lstringa<128> str; ... str += "abbaabbaabbaabba";template<unsigned N> void AppendLstringConstLiteral(benchmark::State& state) { for (auto _: state) { @@ -1899,7 +1945,7 @@ void AppendLstringConstLiteral(benchmark::State& state) { } >> Чем больше внутренний буфер, тем меньше раз требуется аллокация, тем быстрее результат. The larger the internal buffer, the fewer allocations are -required, and the faster the result.253259395569564
    282272391523571
    lstringa<512> str; ... str += "abbaabbaabbaabba";template<unsigned N> void AppendLstringConstLiteral(benchmark::State& state) { for (auto _: state) { @@ -1915,7 +1961,7 @@ void AppendLstringConstLiteral(benchmark::State& state) { #endif benchmark::DoNotOptimize(result); } -}232242250348466
    255250238348464
    lstringa<1024> str; ... str += "abbaabbaabbaabba";template<unsigned N> void AppendLstringConstLiteral(benchmark::State& state) { for (auto _: state) { @@ -1931,17 +1977,17 @@ void AppendLstringConstLiteral(benchmark::State& state) { #endif benchmark::DoNotOptimize(result); } -}147141156232391
    -

    # Append string of 16 bytes and const literal of 16 bytes 32 times, 1024 total length

    +

    # Append string of 16 bytes and const literal of 16 bytes 32 times, 1024 total length

    +} +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::stringstream str; ... str << str_var << "abbaabbaabbaabba";void AppendStreamStrConstLiteral(benchmark::State& state) { std::string s1 = TEXT_16; @@ -1961,7 +2007,7 @@ void AppendLstringConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(s1); } -}13701360461355284263
    14401363451258234443
    std::string str; ... str += str_var + "abbaabbaabbaabba";void AppendStdStrStrConstLiteral(benchmark::State& state) { std::string p1 = TEXT_16; for (auto _: state) { @@ -1978,7 +2024,7 @@ void AppendLstringConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}12631352380839481852
    12211255373040971968
    lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";template<unsigned N> void AppendLstringStrConstLiteral(benchmark::State& state) { stringa p1 = TEXT_16; @@ -1996,7 +2042,7 @@ void AppendLstringStrConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}474432734814801
    444484702880921
    lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";template<unsigned N> void AppendLstringStrConstLiteral(benchmark::State& state) { stringa p1 = TEXT_16; @@ -2014,7 +2060,7 @@ void AppendLstringStrConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}331402475531707
    366459448561694
    lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";template<unsigned N> void AppendLstringStrConstLiteral(benchmark::State& state) { stringa p1 = TEXT_16; @@ -2032,7 +2078,7 @@ void AppendLstringStrConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}318326288373609
    297354298380656
    lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";template<unsigned N> void AppendLstringStrConstLiteral(benchmark::State& state) { stringa p1 = TEXT_16; @@ -2050,17 +2096,17 @@ void AppendLstringStrConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}235253184292530
    -

    # Append string of 16 bytes and const literal of 16 bytes 2048 times, 65536 total length

    +

    # Append string of 16 bytes and const literal of 16 bytes 2048 times, 65536 total length

    +} +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 timesvoid AppendStreamStrConstLiteralBig(benchmark::State& state) { std::string s1 = TEXT_16; @@ -2080,7 +2126,7 @@ void AppendLstringStrConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(s1); } -}7770873241219319288865223824
    7716973412217555307647223755
    std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 timesvoid AppendStdStrStrConstLiteralBig(benchmark::State& state) { std::string p1 = TEXT_16; for (auto _: state) { @@ -2097,7 +2143,7 @@ void AppendLstringStrConstLiteral(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}7281772618194821189369107632
    7373571780187292186310106717
    lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 timestemplate<unsigned N> void AppendLstringStrConstLiteralBig(benchmark::State& state) { stringa p1 = TEXT_16; @@ -2115,7 +2161,7 @@ void AppendLstringStrConstLiteralBig(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}1862119903188972438940520
    2320921248191252402440706
    lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 timestemplate<unsigned N> void AppendLstringStrConstLiteralBig(benchmark::State& state) { stringa p1 = TEXT_16; @@ -2133,7 +2179,7 @@ void AppendLstringStrConstLiteralBig(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}1804717505173352236437619
    1806017315167902228739893
    lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 timestemplate<unsigned N> void AppendLstringStrConstLiteralBig(benchmark::State& state) { stringa p1 = TEXT_16; @@ -2151,7 +2197,7 @@ void AppendLstringStrConstLiteralBig(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}1585317272169052134536261
    1994917550161822224039281
    lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 timestemplate<unsigned N> void AppendLstringStrConstLiteralBig(benchmark::State& state) { stringa p1 = TEXT_16; @@ -2169,17 +2215,17 @@ void AppendLstringStrConstLiteralBig(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(p1); } -}1664817201167582197537537
    -

    # Append 2 string of 16 bytes 32 times, 1024 total length

    +

    # Append 2 string of 16 bytes 32 times, 1024 total length

    +} +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::stringstream str; ... str << str_var1 << str_var2;void AppendStream2String(benchmark::State& state) { std::string s1 = TEXT_16; @@ -2201,7 +2247,7 @@ void AppendLstringStrConstLiteralBig(benchmark::State& state) { benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s2); } -}13771469430653914561
    15271538436551934753
    std::string str; ... str += str_var1 + str_var2;void AppendStdStr2String(benchmark::State& state) { std::string s1 = TEXT_16; std::string s2 = TEXT_16; @@ -2221,7 +2267,7 @@ void AppendLstringStrConstLiteralBig(benchmark::State& state) { benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s2); } -}13791346394239532331
    14671325387840252557
    lstringa<16> str; ... str += str_var1 + str_var2;template<unsigned N> void AppendLstring2String(benchmark::State& state) { stra s1 = TEXT_16; @@ -2241,7 +2287,7 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s2); } -}5255127958811151
    5325678589091248
    lstringa<128> str; ... str += str_var1 + str_var2;template<unsigned N> void AppendLstring2String(benchmark::State& state) { stra s1 = TEXT_16; @@ -2261,7 +2307,7 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s2); } -}4294425306041032
    4664795986451085
    lstringa<512> str; ... str += str_var1 + str_var2;template<unsigned N> void AppendLstring2String(benchmark::State& state) { stra s1 = TEXT_16; @@ -2281,7 +2327,7 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s2); } -}398395404449908
    413412388457934
    lstringa<1024> str; ... str += str_var1 + str_var2;template<unsigned N> void AppendLstring2String(benchmark::State& state) { stra s1 = TEXT_16; @@ -2301,17 +2347,17 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s2); } -}301338281394848
    -

    # Append text, number, text

    +

    # Append text, number, text

    +} +} +} +} +string without allocation. +And it fits in this one. Use buffers of the appropriate size right away. +The result does not fit into SSO, an allocation occurs. +Once again, use appropriately sized buffers from the start. -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::stringstream str; str << "test = " << k << " times";void AppendStreamStrNumStr(benchmark::State& state) { for (auto _: state) { @@ -2329,7 +2375,7 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(k); } } -}3091304110756118576485
    3076332310795111586507
    std::string str = "test = " + std::to_string(k) + " times";void AppendStdStringStrNumStr(benchmark::State& state) { for (auto _: state) { for (unsigned k = 1; k <= 1'000'000'000; k *= 10) { @@ -2344,7 +2390,7 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(k); } } -}470439107212601595
    494474108712311696
    char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;void AppendSprintfStrNumStr(benchmark::State& state) { for (auto _: state) { for (unsigned k = 1; k <= 1'000'000'000; k *= 10) { @@ -2361,7 +2407,7 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(k); } } -}13911458282728222803
    14211486279428612885
    std::string str = std::format("test = {} times", k);void AppendFormatStrNumStr(benchmark::State& state) { for (auto _: state) { for (unsigned k = 1; k <= 1'000'000'000; k *= 10) { @@ -2376,7 +2422,7 @@ void AppendLstring2String(benchmark::State& state) { benchmark::DoNotOptimize(k); } } -}11661251190724232056
    11181312189725402102
    lstringa<8> str; str.format("test = {} times", k);template<typename T> void AppendSimStrStrNumStrF(benchmark::State& state) { for (auto _: state) { @@ -2395,7 +2441,7 @@ void AppendSimStrStrNumStrF(benchmark::State& state) { } } >> В simstr format с первого раза не помещается в такую строку без аллокации. In simstr format, the first time it doesn't fit into such a -string without allocation.13811668216026943049
    13741646207327563013
    lstringa<32> str; str.format("test = {} times", k);template<typename T> void AppendSimStrStrNumStrF(benchmark::State& state) { for (auto _: state) { @@ -2413,7 +2459,7 @@ void AppendSimStrStrNumStrF(benchmark::State& state) { } } } >> А в такую помещается. Используйте сразу буфера подходящего размера. -And it fits in this one. Use buffers of the appropriate size right away.11111103100915202473
    9741116110015282433
    lstringa<8> str = "test = " + k + " times";template<typename T> void AppendSimStrStrNumStr(benchmark::State& state) { for (auto _: state) { @@ -2430,7 +2476,7 @@ void AppendSimStrStrNumStr(benchmark::State& state) { } } } >> Результат не помещается в SSO, возникает аллокация. -The result does not fit into SSO, an allocation occurs.288313831904588
    296301867910641
    lstringa<32> str = "test = " + k + " times";template<typename T> void AppendSimStrStrNumStr(benchmark::State& state) { for (auto _: state) { @@ -2449,7 +2495,7 @@ void AppendSimStrStrNumStr(benchmark::State& state) { } >> А здесь и ниже - результат укладывается в SSO. Ещё раз - используйте сразу буфера подходящего размера. And here and below, the result fits within SSO. -Once again, use appropriately sized buffers from the start.155148154185362
    155146168183374
    stringa str = "test = " + k + " times";template<typename T> void AppendSimStrStrNumStr(benchmark::State& state) { for (auto _: state) { @@ -2468,20 +2514,20 @@ void AppendSimStrStrNumStr(benchmark::State& state) { } >> Под WASM размер SSO 15 символов, что явно не хватает для размещения результата, отсюда и такое время. Under WASM, the SSO size is 15 characters, which is clearly not -enough to accommodate the result, hence the long time.146162151243556
    -

    # Split text and convert to int

    +

    # Split text and convert to int

    +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    std::string::find + substr + std::strtolvoid SplitConvertIntStdString(benchmark::State& state) { std::string numbers = NUMBER_LIST; @@ -2505,7 +2551,7 @@ enough to accommodate the result, hence the long time.271279540550619
    281278550542643
    ssa::splitter + ssa::as_intvoid SplitConvertIntSimStr(benchmark::State& state) { stra numbers = NUMBER_LIST; for (auto _: state) { @@ -2522,7 +2568,7 @@ enough to accommodate the result, hence the long time.162144168292274
    157139160294278
    ssa::splitf + functorvoid SplitConvertIntSplitf(benchmark::State& state) { stra numbers = NUMBER_LIST; for (auto _: state) { @@ -2537,14 +2583,14 @@ enough to accommodate the result, hence the long time.212130191217332
    -

    # Replace symbols in text ~400 symbols

    +

    # Replace symbols in text ~400 symbols

    +it works quickly. +conflicting replacements. +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    Naive (and wrong) replace symbols with std::string find + replacevoid ReplaceSymbolsStdStringNaiveWrong(benchmark::State& state) { std::string_view source = @@ -2603,7 +2649,7 @@ enough to accommodate the result, hence the long time.'b' and 'b'->'a'. But if the substitutions don't conflict, -it works quickly.882827108911762905
    1000826111813013545
    replace symbols with std::string find_first_of + replacevoid ReplaceSymbolsStdStringNaiveRight(benchmark::State& state) { std::string_view source = "abcdefg124 < jhsfjsh sjdfsh jfhjd && jdjdj >" @@ -2658,7 +2704,7 @@ it works quickly.882 >> Дальше уже правильные реализации, не зависящие от конфликтующих замен. Further, there are correct implementations that do not depend on -conflicting replacements.24532391207221553870
    26792461199022254741
    replace symbols with std::string_view find_first_of + copyvoid ReplaceSymbolsStdString(benchmark::State& state) { std::string_view source = "abcdefg124 < jhsfjsh sjdfsh jfhjd && jdjdj >" @@ -2710,7 +2756,7 @@ conflicting replacements.245311121089245925462942
    11091030236925463504
    replace runtime symbols with string expressions and without remembering all search resultstemplate<bool UseVector> void ReplaceSymbolsDynPatternSimStr(benchmark::State& state) { stra source = @@ -2756,7 +2802,7 @@ void ReplaceSymbolsDynPatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(source); benchmark::DoNotOptimize(repl); } -}12681478141315953121
    12671459145416193605
    replace runtime symbols with simstr and memorization of all search resultstemplate<bool UseVector> void ReplaceSymbolsDynPatternSimStr(benchmark::State& state) { stra source = @@ -2802,7 +2848,7 @@ void ReplaceSymbolsDynPatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(source); benchmark::DoNotOptimize(repl); } -}10581013133414182807
    10021014139114343154
    replace const symbols with string expressions and without remembering all search resultstemplate<bool UseVector> void ReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { stra source = @@ -2845,7 +2891,7 @@ void ReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}10161247114012902448
    11501221122312772939
    replace const symbols with string expressions and memorization of all search resultstemplate<bool UseVector> void ReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { stra source = @@ -2888,18 +2934,18 @@ void ReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}906897128012492383
    -

    # Replace symbols in text ~40 symbols

    +

    # Replace symbols in text ~40 symbols

    +} +} +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    Short Naive (and wrong) replace symbols with std::string find + replacevoid ShortReplaceSymbolsStdStringNaiveWrong(benchmark::State& state) { std::string_view source = @@ -2939,7 +2985,7 @@ void ReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(source); benchmark::DoNotOptimize(repl); } -}165162314338429
    172161319332436
    Short replace symbols with std::string find_first_of + replacevoid ShortReplaceSymbolsStdStringNaiveRight(benchmark::State& state) { std::string_view source = "abcdefg124 < jhsfjsh sjdfsh jfhjd && jdjdj >" @@ -2978,7 +3024,7 @@ void ReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(source); benchmark::DoNotOptimize(repl); } -}317302368439526
    322353371428510
    Short replace symbols with std::string_view find_first_of + copyvoid ShortReplaceSymbolsStdString(benchmark::State& state) { std::string_view source = "abcdefg124 < jhsfjsh sjdfsh jfhjd && jdjdj >" @@ -3016,7 +3062,7 @@ void ReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}164159326375413
    167171327356440
    Short replace runtime symbols with string expressions and without remembering all search resultstemplate<bool UseVector> void ShortReplaceSymbolsDynPatternSimStr(benchmark::State& state) { stra source = @@ -3048,7 +3094,7 @@ void ShortReplaceSymbolsDynPatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(source); benchmark::DoNotOptimize(repl); } -}174190266310390
    181192268319386
    Short replace runtime symbols with simstr and memorization of all search resultstemplate<bool UseVector> void ShortReplaceSymbolsDynPatternSimStr(benchmark::State& state) { stra source = @@ -3080,7 +3126,7 @@ void ShortReplaceSymbolsDynPatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(source); benchmark::DoNotOptimize(repl); } -}183196374394403
    185195388383420
    Short replace const symbols with string expressions and without remembering all search resultstemplate<bool UseVector> void ShortReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { stra source = @@ -3109,7 +3155,7 @@ void ShortReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}134162217267243
    144178241267260
    Short replace const symbols with string expressions and memorization of all search resultstemplate<bool UseVector> void ShortReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { stra source = @@ -3138,18 +3184,18 @@ void ShortReplaceSymbolsCons2PatternSimStr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}150165315352313
    -

    # Replace All Str To Longer Size

    +

    # Replace All Str To Longer Size

    +} +} +} +} +} +} +} +} +} +} +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    replace bb to ---- in std::string|64template<size_t Long> void ReplaceAllLongerStdString(benchmark::State& state) { @@ -3183,7 +3229,7 @@ void ReplaceAllLongerStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}164174228243382
    156183240275377
    replace bb to ---- in std::string|256template<size_t Long> void ReplaceAllLongerStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3216,7 +3262,7 @@ void ReplaceAllLongerStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}5425247548181318
    5254998588991421
    replace bb to ---- in std::string|512template<size_t Long> void ReplaceAllLongerStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3249,7 +3295,7 @@ void ReplaceAllLongerStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}1016949141114922632
    10421012144616322623
    replace bb to ---- in std::string|1024template<size_t Long> void ReplaceAllLongerStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3282,7 +3328,7 @@ void ReplaceAllLongerStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}22212201311532065262
    24182304319433185482
    replace bb to ---- in std::string|2048template<size_t Long> void ReplaceAllLongerStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3315,7 +3361,7 @@ void ReplaceAllLongerStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}621357588203805812723
    588357967825811613478
    replace bb to ---- in lstringa<8>|64template<size_t N, size_t Count> void ReplaceAllLongerSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3337,7 +3383,7 @@ void ReplaceAllLongerSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}140156231251296
    144154224235311
    replace bb to ---- in lstringa<8>|256template<size_t N, size_t Count> void ReplaceAllLongerSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3359,7 +3405,7 @@ void ReplaceAllLongerSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}4294936246701106
    5294846196861149
    replace bb to ---- in lstringa<8>|512template<size_t N, size_t Count> void ReplaceAllLongerSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3381,7 +3427,7 @@ void ReplaceAllLongerSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}811979102111681998
    880886108311082165
    replace bb to ---- in lstringa<8>|1024template<size_t N, size_t Count> void ReplaceAllLongerSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3403,7 +3449,7 @@ void ReplaceAllLongerSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}17181881183220543708
    18051917188620423868
    replace bb to ---- in lstringa<8>|2048template<size_t N, size_t Count> void ReplaceAllLongerSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3425,7 +3471,7 @@ void ReplaceAllLongerSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}31513456357339147236
    32653636362539337737
    replace bb to ---- by init stringa|64template<size_t Count> void ReplaceAllLongerSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3446,7 +3492,7 @@ void ReplaceAllLongerSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}95.8100.0179215208
    10799.5177205226
    replace bb to ---- by init stringa|256template<size_t Count> void ReplaceAllLongerSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3467,7 +3513,7 @@ void ReplaceAllLongerSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}303306384497745
    313297371475790
    replace bb to ---- by init stringa|512template<size_t Count> void ReplaceAllLongerSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3488,7 +3534,7 @@ void ReplaceAllLongerSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}73172882510641649
    75171781310391685
    replace bb to ---- by init stringa|1024template<size_t Count> void ReplaceAllLongerSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3509,7 +3555,7 @@ void ReplaceAllLongerSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}15761640175022103458
    16571663163421653603
    replace bb to ---- by init stringa|2048template<size_t Count> void ReplaceAllLongerSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3530,26 +3576,26 @@ void ReplaceAllLongerSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}30373320314347237119
    -

    # Replace All Str To Same Size

    +

    # Replace All Str To Same Size

    +} +} +} +} +} +} +} +} +} +} +} +} +} +} -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    replace bb to -- in std::string|64template<size_t Long> void ReplaceAllEqualStdString(benchmark::State& state) { @@ -3582,7 +3628,7 @@ void ReplaceAllEqualStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}117123198214275
    120123195212268
    replace bb to -- in std::string|256template<size_t Long> void ReplaceAllEqualStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3614,7 +3660,7 @@ void ReplaceAllEqualStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}3973694765351017
    404383477528987
    replace bb to -- in std::string|512template<size_t Long> void ReplaceAllEqualStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3646,7 +3692,7 @@ void ReplaceAllEqualStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}7657588389581834
    7617198759691942
    replace bb to -- in std::string|1024template<size_t Long> void ReplaceAllEqualStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3678,7 +3724,7 @@ void ReplaceAllEqualStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}14391475160918313524
    16061415163018203660
    replace bb to -- in std::string|2048template<size_t Long> void ReplaceAllEqualStdString(benchmark::State& state) { std::string_view source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3710,7 +3756,7 @@ void ReplaceAllEqualStdString(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}29512805312137017031
    32802838327835857038
    replace bb to -- in lstringa<8>|64template<size_t N, size_t Long> void ReplaceAllEqualSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3731,7 +3777,7 @@ void ReplaceAllEqualSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}10598.2185195217
    104102182190229
    replace bb to -- in lstringa<8>|256template<size_t N, size_t Long> void ReplaceAllEqualSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3752,7 +3798,7 @@ void ReplaceAllEqualSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}286296445459764
    312300440475776
    replace bb to -- in lstringa<8>|512template<size_t N, size_t Long> void ReplaceAllEqualSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3773,7 +3819,7 @@ void ReplaceAllEqualSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}5375797638531417
    5915628479041461
    replace bb to -- in lstringa<8>|1024template<size_t N, size_t Long> void ReplaceAllEqualSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3794,7 +3840,7 @@ void ReplaceAllEqualSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}10981109141714892732
    11391116158016262897
    replace bb to -- in lstringa<8>|2048template<size_t N, size_t Long> void ReplaceAllEqualSimString(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3815,7 +3861,7 @@ void ReplaceAllEqualSimString(benchmark::State& state) { benchmark::DoNotOptimize(result); benchmark::DoNotOptimize(source); } -}22892138276328605398
    26792185282831525674
    replace bb to -- by init stringa|64template<size_t Count> void ReplaceAllEqualSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3840,7 +3886,7 @@ void ReplaceAllEqualSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}84.696.7172178183
    91.097.1153172187
    replace bb to -- by init stringa|256template<size_t Count> void ReplaceAllEqualSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3865,7 +3911,7 @@ void ReplaceAllEqualSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}246279361403637
    242274355397652
    replace bb to -- by init stringa|512template<size_t Count> void ReplaceAllEqualSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3890,7 +3936,7 @@ void ReplaceAllEqualSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}4425215687191165
    4315445996731221
    replace bb to -- by init stringa|1024template<size_t Count> void ReplaceAllEqualSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3915,7 +3961,7 @@ void ReplaceAllEqualSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}9101034105011812294
    9141481107712582366
    replace bb to -- by init stringa|2048template<size_t Count> void ReplaceAllEqualSimStringExpr(benchmark::State& state) { ssa source = "aaaaaaaaaaaaaaaaaaabbbaaaaaaaabbbbaaaaabaaaaaaaaaaaaaaaaaaaaabba"; @@ -3940,26 +3986,26 @@ void ReplaceAllEqualSimStringExpr(benchmark::State& state) { benchmark::DoNotOptimize(pattern); benchmark::DoNotOptimize(repl); } -}17881964196822954391
    -

    # Hash Map insert and find

    +

    # Hash Map insert and find

    +hashStrMapA, and then search for them in it. +Same thing with std::string and std::unordered_map +Now we insert stringa and search for ssa -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    hashStrMapA<size_t> emplace & find stringa;void HashMapSimStr(benchmark::State& state) { for (auto _: state) { @@ -3986,7 +4032,7 @@ void ReplaceAllEqualSimStringExpr(benchmark::State& state) { } >> Вставляем в hashStrMapA 10000 stringa длиной от 30 до 50 символов, а потом ищем их в ней We insert 10,000 strings of length from 30 to 50 characters into -hashStrMapA, and then search for them in it.37073973720534381210142235653100858
    35464283640422397835043612653192661
    std::unordered_map<std::string, size_t> emplace & find std::string;void HashMapStdStr(benchmark::State& state) { for (auto _: state) { std::unordered_map<std::string, size_t> store; @@ -4010,7 +4056,7 @@ hashStrMapA, and then search for them in it. >> То же самое c std::string и std::unordered_map -Same thing with std::string and std::unordered_map34647463566994544229152806393377674
    34869753537855560756758784633399083
    hashStrMapA<size_t> emplace & find ssa;void HashMapSimSsa(benchmark::State& state) { for (auto _: state) { hashStrMapA<size_t> store; @@ -4035,7 +4081,7 @@ Same thing with std::string and std::unordered_map >> Теперь вставляем stringa, а ищем ssa -Now we insert stringa and search for ssa35614103767835344366738696263119903
    35925443721221348921139458923300905
    std::unordered_map<std::string, size_t> emplace & find std::string_view;void HashMapStdStrView(benchmark::State& state) { for (auto _: state) { std::unordered_map<std::string, size_t> store; @@ -4060,15 +4106,15 @@ Now we insert stringa and search for ssa >> Вставляем std::string, а ищем std::string_view -We insert std::string and look for std::string_view40723904195628627445962333093635000
    -

    # Build Full Func Name

    +

    # Build Full Func Name

    +return values. The algorithm uses std::string. ++= to a string are replaced with a single += + + +. +We construct the function name through std::ostringstream and << +Parameter information is appended to the current line. -
    Benchmark nameCommentXeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13Xeon E5-2682 v4, Windows 10, Clang-19Xeon E5-2682 v4, Windows 10, MSVC-19Xeon E5-2682 v4, WASM Firefox, Clang-21
    Build func full name std::string;std::string build_full_name_std() const { std::string str{has_ret_type_resolver ? "any"sv : type_names_sv[(unsigned)ret_type]}; @@ -4107,7 +4153,7 @@ We insert std::string and look for std::string_view7191049155716412745
    697916150716443032
    Build func full name std::string 1;std::string build_full_name_std1() const { std::string str{has_ret_type_resolver ? "any"sv : type_names_sv[(unsigned)ret_type]}; str += " " + std_name + "("; @@ -4139,7 +4185,7 @@ return values. The algorithm uses std::string. >> Почти тот же алгоритм, но несколько последовательных += к строке заменены на одно += + + +. Almost the same algorithm, but several consecutive -+= to a string are replaced with a single += + + +.8081016157517632859
    8031081154317493434
    Build func full name std::stream;std::string build_full_name_stream() const { std::ostringstream str; if (has_ret_type_resolver) { @@ -4173,7 +4219,7 @@ Almost the same algorithm, but several consecutive str << ")"; return str.str(); } >> Строим имя функции через std::ostringstream и << -We construct the function name through std::ostringstream and <<25602568828799116461
    25402581808799407330
    Build func full name stringa;stringa build_full_name() const { lstringa<512> str = e_choice(has_ret_type_resolver, "any", type_names[(unsigned)ret_type]) + " " + name + "("; @@ -4191,7 +4237,7 @@ We construct the function name through std::ostringstream and << >> Реализация на simstr строках и строковых выражениях. Инфа о параметрах добавляется в текущую строку Implementation using simstr strings and string expressions. -Parameter information is appended to the current line.5324608139101302
    5074788239371429
    Build func full name stringa 1;stringa build_full_name1() const { lstringa<512> str = e_choice(has_ret_type_resolver, "any", type_names[(unsigned)ret_type]) + " " + name + "("; @@ -4209,11 +4255,11 @@ Parameter information is appended to the current line.66968294010091478
    \ No newline at end of file diff --git a/bench/results/000-Xeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21.txt b/bench/results/000-Xeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21.txt index 6b2f657..54dd716 100644 --- a/bench/results/000-Xeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21.txt +++ b/bench/results/000-Xeon E5-2682 v4, Ubuntu 22 (WSL), Clang-21.txt @@ -1,4 +1,8 @@ -2026-01-31T16:21:34+03:00 +Benchmarks of simstr, version 1.6.3 +Sources: https://github.com/orefkov/simstr +Results: https://orefkov.github.io/simstr/results.html + +2026-02-03T17:02:44+03:00 Running ./benchStr Run on (32 X 2494.22 MHz CPU s) CPU Caches: @@ -6,897 +10,914 @@ CPU Caches: L1 Instruction 32 KiB (x16) L2 Unified 256 KiB (x16) L3 Unified 40960 KiB (x1) -Load Average: 0.02, 0.47, 0.66 +Load Average: 0.00, 0.00, 0.00 ***WARNING*** ASLR is enabled, the results may have unreproducible noise in them. -------------------------------------------------------------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------------------------------------------------------------------------------------------- ----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and number by std to std::string_mean 209 ns 209 ns 10 -Concat std::string and number by std to std::string_median 208 ns 208 ns 10 -Concat std::string and number by std to std::string_stddev 5.82 ns 5.82 ns 10 -Concat std::string and number by std to std::string_cv 2.79 % 2.79 % 10 -Concat std::string and number by StrExpr to std::string_mean 107 ns 107 ns 10 -Concat std::string and number by StrExpr to std::string_median 105 ns 105 ns 10 -Concat std::string and number by StrExpr to std::string_stddev 3.74 ns 3.74 ns 10 -Concat std::string and number by StrExpr to std::string_cv 3.48 % 3.48 % 10 -Concat stringa and number by StrExpr to simstr::stringa_mean 64.5 ns 64.5 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_median 63.8 ns 63.8 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_stddev 2.68 ns 2.68 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_cv 4.16 % 4.16 % 10 -Concat stringa and number by e_concat to simstr::stringa_mean 72.8 ns 72.8 ns 10 -Concat stringa and number by e_concat to simstr::stringa_median 72.3 ns 72.3 ns 10 -Concat stringa and number by e_concat to simstr::stringa_stddev 3.64 ns 3.64 ns 10 -Concat stringa and number by e_concat to simstr::stringa_cv 5.00 % 5.00 % 10 +Concat std::string and number by std to std::string_mean 234 ns 234 ns 4 +Concat std::string and number by std to std::string_median 233 ns 233 ns 4 +Concat std::string and number by std to std::string_stddev 28.1 ns 28.1 ns 4 +Concat std::string and number by std to std::string_cv 12.02 % 12.02 % 4 +Concat std::string and number by StrExpr to std::string_mean 104 ns 104 ns 4 +Concat std::string and number by StrExpr to std::string_median 103 ns 103 ns 4 +Concat std::string and number by StrExpr to std::string_stddev 3.27 ns 3.27 ns 4 +Concat std::string and number by StrExpr to std::string_cv 3.14 % 3.14 % 4 +Concat stringa and number by StrExpr to simstr::stringa_mean 62.4 ns 62.4 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_median 62.5 ns 62.5 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_stddev 0.757 ns 0.757 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_cv 1.21 % 1.21 % 4 +Concat stringa and number by e_concat to simstr::stringa_mean 67.8 ns 67.8 ns 4 +Concat stringa and number by e_concat to simstr::stringa_median 67.6 ns 67.6 ns 4 +Concat stringa and number by e_concat to simstr::stringa_stddev 1.49 ns 1.49 ns 4 +Concat stringa and number by e_concat to simstr::stringa_cv 2.20 % 2.20 % 4 ----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and format hex number and literal to std::string_mean 682 ns 682 ns 10 -Concat std::string and format hex number and literal to std::string_median 677 ns 677 ns 10 -Concat std::string and format hex number and literal to std::string_stddev 27.0 ns 27.0 ns 10 -Concat std::string and format hex number and literal to std::string_cv 3.95 % 3.95 % 10 -std::format std::string and hex number by literal to std::string_mean 862 ns 862 ns 10 -std::format std::string and hex number by literal to std::string_median 856 ns 856 ns 10 -std::format std::string and hex number by literal to std::string_stddev 27.5 ns 27.5 ns 10 -std::format std::string and hex number by literal to std::string_cv 3.18 % 3.18 % 10 -Concat std::string and std::tochars and string to std::string_mean 198 ns 198 ns 10 -Concat std::string and std::tochars and string to std::string_median 198 ns 198 ns 10 -Concat std::string and std::tochars and string to std::string_stddev 2.77 ns 2.77 ns 10 -Concat std::string and std::tochars and string to std::string_cv 1.40 % 1.40 % 10 -Concat std::string and hex number and literal by StrExpr to std::string_mean 132 ns 132 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_median 130 ns 130 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_stddev 3.79 ns 3.79 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_cv 2.87 % 2.87 % 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 116 ns 116 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 115 ns 115 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 2.64 ns 2.64 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 2.28 % 2.28 % 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 115 ns 115 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_median 115 ns 115 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 1.62 ns 1.62 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.40 % 1.40 % 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_mean 180 ns 180 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_median 180 ns 180 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 3.03 ns 3.03 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_cv 1.68 % 1.68 % 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 315 ns 315 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 313 ns 313 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 8.79 ns 8.79 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 2.79 % 2.79 % 10 +Concat std::string and format hex number and literal to std::string_mean 684 ns 684 ns 4 +Concat std::string and format hex number and literal to std::string_median 686 ns 686 ns 4 +Concat std::string and format hex number and literal to std::string_stddev 5.97 ns 5.97 ns 4 +Concat std::string and format hex number and literal to std::string_cv 0.87 % 0.87 % 4 +std::format std::string and hex number by literal to std::string_mean 872 ns 872 ns 4 +std::format std::string and hex number by literal to std::string_median 875 ns 875 ns 4 +std::format std::string and hex number by literal to std::string_stddev 41.0 ns 41.0 ns 4 +std::format std::string and hex number by literal to std::string_cv 4.70 % 4.70 % 4 +Concat std::string and std::to_chars and string to std::string_mean 203 ns 203 ns 4 +Concat std::string and std::to_chars and string to std::string_median 199 ns 199 ns 4 +Concat std::string and std::to_chars and string to std::string_stddev 10.7 ns 10.7 ns 4 +Concat std::string and std::to_chars and string to std::string_cv 5.25 % 5.25 % 4 +Concat std::string and hex number and literal by StrExpr to std::string_mean 142 ns 142 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_median 141 ns 141 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_stddev 8.25 ns 8.25 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_cv 5.83 % 5.83 % 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 124 ns 124 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 120 ns 120 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 8.24 ns 8.24 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 6.67 % 6.67 % 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 126 ns 126 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_median 126 ns 126 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 1.91 ns 1.91 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.52 % 1.52 % 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_mean 216 ns 216 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_median 215 ns 215 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 4.43 ns 4.43 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_cv 2.05 % 2.05 % 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 321 ns 321 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 322 ns 322 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 6.61 ns 6.61 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 2.06 % 2.06 % 4 +----- format/vformat and subst/vsubst octal number ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_mean 168 ns 168 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_median 167 ns 167 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_stddev 4.50 ns 4.50 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_cv 2.68 % 2.68 % 4 +std::format("art {:#010o} end", i)_mean 1004 ns 1004 ns 4 +std::format("art {:#010o} end", i)_median 1002 ns 1002 ns 4 +std::format("art {:#010o} end", i)_stddev 29.5 ns 29.5 ns 4 +std::format("art {:#010o} end", i)_cv 2.94 % 2.94 % 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_mean 363 ns 363 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_median 363 ns 363 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_stddev 6.96 ns 6.95 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_cv 1.92 % 1.92 % 4 +std::vformat(pattern, std::make_format_args(i))_mean 1024 ns 1024 ns 4 +std::vformat(pattern, std::make_format_args(i))_median 1010 ns 1010 ns 4 +std::vformat(pattern, std::make_format_args(i))_stddev 68.7 ns 68.7 ns 4 +std::vformat(pattern, std::make_format_args(i))_cv 6.71 % 6.71 % 4 ----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string by std to std::string_mean 44.3 ns 44.3 ns 10 -Concat std::string by std to std::string_median 44.3 ns 44.3 ns 10 -Concat std::string by std to std::string_stddev 1.57 ns 1.57 ns 10 -Concat std::string by std to std::string_cv 3.54 % 3.54 % 10 -Concat std::string by StrExpr to std::string_mean 34.8 ns 34.8 ns 10 -Concat std::string by StrExpr to std::string_median 34.9 ns 34.9 ns 10 -Concat std::string by StrExpr to std::string_stddev 1.47 ns 1.47 ns 10 -Concat std::string by StrExpr to std::string_cv 4.22 % 4.22 % 10 -Concat stringa by StrExpr to stringa_mean 29.1 ns 29.1 ns 10 -Concat stringa by StrExpr to stringa_median 28.2 ns 28.2 ns 10 -Concat stringa by StrExpr to stringa_stddev 2.12 ns 2.12 ns 10 -Concat stringa by StrExpr to stringa_cv 7.30 % 7.30 % 10 +Concat std::string by std to std::string_mean 55.8 ns 55.8 ns 4 +Concat std::string by std to std::string_median 55.2 ns 55.2 ns 4 +Concat std::string by std to std::string_stddev 1.46 ns 1.46 ns 4 +Concat std::string by std to std::string_cv 2.62 % 2.62 % 4 +Concat std::string by StrExpr to std::string_mean 39.5 ns 39.5 ns 4 +Concat std::string by StrExpr to std::string_median 39.5 ns 39.5 ns 4 +Concat std::string by StrExpr to std::string_stddev 0.736 ns 0.736 ns 4 +Concat std::string by StrExpr to std::string_cv 1.87 % 1.87 % 4 +Concat stringa by StrExpr to stringa_mean 26.1 ns 26.1 ns 4 +Concat stringa by StrExpr to stringa_median 26.0 ns 26.0 ns 4 +Concat stringa by StrExpr to stringa_stddev 0.638 ns 0.638 ns 4 +Concat stringa by StrExpr to stringa_cv 2.44 % 2.44 % 4 ----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Find concat three std::string_mean 114 ns 114 ns 10 -Find concat three std::string_median 111 ns 111 ns 10 -Find concat three std::string_stddev 6.06 ns 6.06 ns 10 -Find concat three std::string_cv 5.33 % 5.33 % 10 -Find concat three strexpr_mean 50.5 ns 50.5 ns 10 -Find concat three strexpr_median 50.7 ns 50.7 ns 10 -Find concat three strexpr_stddev 1.03 ns 1.03 ns 10 -Find concat three strexpr_cv 2.04 % 2.04 % 10 -Find concat three simstr_mean 53.3 ns 53.3 ns 10 -Find concat three simstr_median 53.2 ns 53.2 ns 10 -Find concat three simstr_stddev 0.963 ns 0.963 ns 10 -Find concat three simstr_cv 1.81 % 1.80 % 10 +Find concat three std::string_mean 113 ns 113 ns 4 +Find concat three std::string_median 112 ns 112 ns 4 +Find concat three std::string_stddev 2.38 ns 2.38 ns 4 +Find concat three std::string_cv 2.11 % 2.11 % 4 +Find concat three strexpr_mean 48.0 ns 48.0 ns 4 +Find concat three strexpr_median 48.0 ns 48.0 ns 4 +Find concat three strexpr_stddev 0.611 ns 0.611 ns 4 +Find concat three strexpr_cv 1.27 % 1.27 % 4 +Find concat three simstr_mean 19.7 ns 19.7 ns 4 +Find concat three simstr_median 19.2 ns 19.2 ns 4 +Find concat three simstr_stddev 1.31 ns 1.31 ns 4 +Find concat three simstr_cv 6.65 % 6.65 % 4 ----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -BuildTypeNameStr 0/0_mean 7.14 ns 7.14 ns 10 -BuildTypeNameStr 0/0_median 7.15 ns 7.15 ns 10 -BuildTypeNameStr 0/0_stddev 0.166 ns 0.166 ns 10 -BuildTypeNameStr 0/0_cv 2.32 % 2.32 % 10 -BuildTypeNameExp 0/0_mean 6.74 ns 6.74 ns 10 -BuildTypeNameExp 0/0_median 6.67 ns 6.67 ns 10 -BuildTypeNameExp 0/0_stddev 0.366 ns 0.366 ns 10 -BuildTypeNameExp 0/0_cv 5.43 % 5.43 % 10 -BuildTypeNameSim 0/0_mean 5.10 ns 5.10 ns 10 -BuildTypeNameSim 0/0_median 4.84 ns 4.84 ns 10 -BuildTypeNameSim 0/0_stddev 0.629 ns 0.629 ns 10 -BuildTypeNameSim 0/0_cv 12.33 % 12.33 % 10 -BuildTypeNameStr 10/10_mean 56.6 ns 56.6 ns 10 -BuildTypeNameStr 10/10_median 56.5 ns 56.5 ns 10 -BuildTypeNameStr 10/10_stddev 1.58 ns 1.58 ns 10 -BuildTypeNameStr 10/10_cv 2.78 % 2.78 % 10 -BuildTypeNameExp 10/10_mean 30.1 ns 30.1 ns 10 -BuildTypeNameExp 10/10_median 30.3 ns 30.3 ns 10 -BuildTypeNameExp 10/10_stddev 0.682 ns 0.682 ns 10 -BuildTypeNameExp 10/10_cv 2.26 % 2.26 % 10 -BuildTypeNameSim 10/10_mean 22.6 ns 22.6 ns 10 -BuildTypeNameSim 10/10_median 22.6 ns 22.6 ns 10 -BuildTypeNameSim 10/10_stddev 0.532 ns 0.532 ns 10 -BuildTypeNameSim 10/10_cv 2.35 % 2.35 % 10 +BuildTypeNameStr 0/0_mean 7.51 ns 7.51 ns 4 +BuildTypeNameStr 0/0_median 7.48 ns 7.48 ns 4 +BuildTypeNameStr 0/0_stddev 0.102 ns 0.102 ns 4 +BuildTypeNameStr 0/0_cv 1.36 % 1.36 % 4 +BuildTypeNameExp 0/0_mean 6.39 ns 6.39 ns 4 +BuildTypeNameExp 0/0_median 6.40 ns 6.40 ns 4 +BuildTypeNameExp 0/0_stddev 0.080 ns 0.080 ns 4 +BuildTypeNameExp 0/0_cv 1.25 % 1.25 % 4 +BuildTypeNameSim 0/0_mean 4.20 ns 4.20 ns 4 +BuildTypeNameSim 0/0_median 4.20 ns 4.20 ns 4 +BuildTypeNameSim 0/0_stddev 0.207 ns 0.207 ns 4 +BuildTypeNameSim 0/0_cv 4.92 % 4.92 % 4 +BuildTypeNameStr 10/10_mean 65.6 ns 65.6 ns 4 +BuildTypeNameStr 10/10_median 66.5 ns 66.5 ns 4 +BuildTypeNameStr 10/10_stddev 3.75 ns 3.75 ns 4 +BuildTypeNameStr 10/10_cv 5.72 % 5.72 % 4 +BuildTypeNameExp 10/10_mean 33.7 ns 33.7 ns 4 +BuildTypeNameExp 10/10_median 34.0 ns 34.0 ns 4 +BuildTypeNameExp 10/10_stddev 3.54 ns 3.54 ns 4 +BuildTypeNameExp 10/10_cv 10.52 % 10.52 % 4 +BuildTypeNameSim 10/10_mean 23.1 ns 23.1 ns 4 +BuildTypeNameSim 10/10_median 22.9 ns 22.9 ns 4 +BuildTypeNameSim 10/10_stddev 0.811 ns 0.811 ns 4 +BuildTypeNameSim 10/10_cv 3.51 % 3.51 % 4 ----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat with replace str_mean 205 ns 205 ns 10 -Concat with replace str_median 200 ns 200 ns 10 -Concat with replace str_stddev 12.4 ns 12.4 ns 10 -Concat with replace str_cv 6.05 % 6.05 % 10 -Concat with replace exp_mean 143 ns 143 ns 10 -Concat with replace exp_median 142 ns 142 ns 10 -Concat with replace exp_stddev 3.04 ns 3.04 ns 10 -Concat with replace exp_cv 2.13 % 2.13 % 10 +Concat with replace str_mean 210 ns 210 ns 4 +Concat with replace str_median 210 ns 210 ns 4 +Concat with replace str_stddev 3.29 ns 3.29 ns 4 +Concat with replace str_cv 1.57 % 1.57 % 4 +Concat with replace exp_mean 138 ns 138 ns 4 +Concat with replace exp_median 138 ns 138 ns 4 +Concat with replace exp_stddev 0.823 ns 0.823 ns 4 +Concat with replace exp_cv 0.60 % 0.60 % 4 ----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e;_mean 1.10 ns 1.10 ns 10 -std::string e;_median 1.11 ns 1.11 ns 10 -std::string e;_stddev 0.014 ns 0.014 ns 10 -std::string e;_cv 1.28 % 1.28 % 10 -std::string_view e;_mean 0.376 ns 0.376 ns 10 -std::string_view e;_median 0.370 ns 0.370 ns 10 -std::string_view e;_stddev 0.018 ns 0.018 ns 10 -std::string_view e;_cv 4.81 % 4.81 % 10 -ssa e;_mean 0.374 ns 0.374 ns 10 -ssa e;_median 0.366 ns 0.366 ns 10 -ssa e;_stddev 0.020 ns 0.020 ns 10 -ssa e;_cv 5.33 % 5.33 % 10 -stringa e;_mean 0.740 ns 0.740 ns 10 -stringa e;_median 0.743 ns 0.743 ns 10 -stringa e;_stddev 0.011 ns 0.011 ns 10 -stringa e;_cv 1.48 % 1.48 % 10 -lstringa<20> e;_mean 1.13 ns 1.13 ns 10 -lstringa<20> e;_median 1.12 ns 1.12 ns 10 -lstringa<20> e;_stddev 0.027 ns 0.027 ns 10 -lstringa<20> e;_cv 2.40 % 2.40 % 10 -lstringa<40> e;_mean 1.19 ns 1.19 ns 10 -lstringa<40> e;_median 1.19 ns 1.19 ns 10 -lstringa<40> e;_stddev 0.070 ns 0.070 ns 10 -lstringa<40> e;_cv 5.92 % 5.92 % 10 +std::string e;_mean 1.09 ns 1.09 ns 4 +std::string e;_median 1.09 ns 1.09 ns 4 +std::string e;_stddev 0.006 ns 0.006 ns 4 +std::string e;_cv 0.59 % 0.59 % 4 +std::string_view e;_mean 0.365 ns 0.365 ns 4 +std::string_view e;_median 0.364 ns 0.364 ns 4 +std::string_view e;_stddev 0.005 ns 0.005 ns 4 +std::string_view e;_cv 1.45 % 1.45 % 4 +ssa e;_mean 0.363 ns 0.363 ns 4 +ssa e;_median 0.364 ns 0.364 ns 4 +ssa e;_stddev 0.004 ns 0.004 ns 4 +ssa e;_cv 1.24 % 1.24 % 4 +stringa e;_mean 0.730 ns 0.730 ns 4 +stringa e;_median 0.729 ns 0.729 ns 4 +stringa e;_stddev 0.008 ns 0.008 ns 4 +stringa e;_cv 1.05 % 1.05 % 4 +lstringa<20> e;_mean 1.13 ns 1.13 ns 4 +lstringa<20> e;_median 1.12 ns 1.12 ns 4 +lstringa<20> e;_stddev 0.066 ns 0.066 ns 4 +lstringa<20> e;_cv 5.83 % 5.83 % 4 +lstringa<40> e;_mean 1.14 ns 1.14 ns 4 +lstringa<40> e;_median 1.13 ns 1.13 ns 4 +lstringa<40> e;_stddev 0.044 ns 0.044 ns 4 +lstringa<40> e;_cv 3.90 % 3.90 % 4 ----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text";_mean 1.83 ns 1.83 ns 10 -std::string e = "Test text";_median 1.83 ns 1.83 ns 10 -std::string e = "Test text";_stddev 0.026 ns 0.026 ns 10 -std::string e = "Test text";_cv 1.44 % 1.44 % 10 -std::string_view e = "Test text";_mean 0.738 ns 0.738 ns 10 -std::string_view e = "Test text";_median 0.735 ns 0.735 ns 10 -std::string_view e = "Test text";_stddev 0.022 ns 0.022 ns 10 -std::string_view e = "Test text";_cv 2.98 % 2.98 % 10 -ssa e = "Test text";_mean 0.368 ns 0.368 ns 10 -ssa e = "Test text";_median 0.369 ns 0.369 ns 10 -ssa e = "Test text";_stddev 0.007 ns 0.007 ns 10 -ssa e = "Test text";_cv 2.03 % 2.03 % 10 -stringa e = "Test text";_mean 1.12 ns 1.12 ns 10 -stringa e = "Test text";_median 1.12 ns 1.12 ns 10 -stringa e = "Test text";_stddev 0.023 ns 0.023 ns 10 -stringa e = "Test text";_cv 2.09 % 2.09 % 10 -lstringa<20> e = "Test text";_mean 1.89 ns 1.89 ns 10 -lstringa<20> e = "Test text";_median 1.87 ns 1.87 ns 10 -lstringa<20> e = "Test text";_stddev 0.054 ns 0.054 ns 10 -lstringa<20> e = "Test text";_cv 2.88 % 2.88 % 10 -lstringa<40> e = "Test text";_mean 1.90 ns 1.90 ns 10 -lstringa<40> e = "Test text";_median 1.85 ns 1.85 ns 10 -lstringa<40> e = "Test text";_stddev 0.115 ns 0.115 ns 10 -lstringa<40> e = "Test text";_cv 6.05 % 6.05 % 10 +std::string e = "Test text";_mean 1.83 ns 1.83 ns 4 +std::string e = "Test text";_median 1.83 ns 1.83 ns 4 +std::string e = "Test text";_stddev 0.030 ns 0.030 ns 4 +std::string e = "Test text";_cv 1.64 % 1.64 % 4 +std::string_view e = "Test text";_mean 0.734 ns 0.734 ns 4 +std::string_view e = "Test text";_median 0.733 ns 0.733 ns 4 +std::string_view e = "Test text";_stddev 0.012 ns 0.012 ns 4 +std::string_view e = "Test text";_cv 1.60 % 1.60 % 4 +ssa e = "Test text";_mean 0.372 ns 0.372 ns 4 +ssa e = "Test text";_median 0.371 ns 0.371 ns 4 +ssa e = "Test text";_stddev 0.004 ns 0.004 ns 4 +ssa e = "Test text";_cv 1.11 % 1.11 % 4 +stringa e = "Test text";_mean 1.11 ns 1.11 ns 4 +stringa e = "Test text";_median 1.11 ns 1.11 ns 4 +stringa e = "Test text";_stddev 0.011 ns 0.011 ns 4 +stringa e = "Test text";_cv 0.97 % 0.97 % 4 +lstringa<20> e = "Test text";_mean 1.85 ns 1.85 ns 4 +lstringa<20> e = "Test text";_median 1.85 ns 1.85 ns 4 +lstringa<20> e = "Test text";_stddev 0.009 ns 0.009 ns 4 +lstringa<20> e = "Test text";_cv 0.50 % 0.50 % 4 +lstringa<40> e = "Test text";_mean 1.89 ns 1.89 ns 4 +lstringa<40> e = "Test text";_median 1.89 ns 1.89 ns 4 +lstringa<40> e = "Test text";_stddev 0.038 ns 0.038 ns 4 +lstringa<40> e = "Test text";_cv 1.99 % 1.99 % 4 ----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890";_mean 18.7 ns 18.7 ns 10 -std::string e = "123456789012345678901234567890";_median 18.4 ns 18.4 ns 10 -std::string e = "123456789012345678901234567890";_stddev 1.00 ns 1.00 ns 10 -std::string e = "123456789012345678901234567890";_cv 5.36 % 5.36 % 10 -std::string_view e = "123456789012345678901234567890";_mean 0.741 ns 0.741 ns 10 -std::string_view e = "123456789012345678901234567890";_median 0.732 ns 0.732 ns 10 -std::string_view e = "123456789012345678901234567890";_stddev 0.016 ns 0.016 ns 10 -std::string_view e = "123456789012345678901234567890";_cv 2.22 % 2.22 % 10 -ssa e = "123456789012345678901234567890";_mean 0.369 ns 0.369 ns 10 -ssa e = "123456789012345678901234567890";_median 0.369 ns 0.369 ns 10 -ssa e = "123456789012345678901234567890";_stddev 0.007 ns 0.007 ns 10 -ssa e = "123456789012345678901234567890";_cv 2.01 % 2.01 % 10 -stringa e = "123456789012345678901234567890";_mean 1.11 ns 1.11 ns 10 -stringa e = "123456789012345678901234567890";_median 1.11 ns 1.11 ns 10 -stringa e = "123456789012345678901234567890";_stddev 0.015 ns 0.015 ns 10 -stringa e = "123456789012345678901234567890";_cv 1.34 % 1.34 % 10 -lstringa<20> e = "123456789012345678901234567890";_mean 20.5 ns 20.5 ns 10 -lstringa<20> e = "123456789012345678901234567890";_median 20.3 ns 20.3 ns 10 -lstringa<20> e = "123456789012345678901234567890";_stddev 0.731 ns 0.731 ns 10 -lstringa<20> e = "123456789012345678901234567890";_cv 3.57 % 3.57 % 10 -lstringa<40> e = "123456789012345678901234567890";_mean 2.55 ns 2.55 ns 10 -lstringa<40> e = "123456789012345678901234567890";_median 2.54 ns 2.54 ns 10 -lstringa<40> e = "123456789012345678901234567890";_stddev 0.055 ns 0.055 ns 10 -lstringa<40> e = "123456789012345678901234567890";_cv 2.14 % 2.14 % 10 +std::string e = "123456789012345678901234567890";_mean 19.3 ns 19.3 ns 4 +std::string e = "123456789012345678901234567890";_median 19.1 ns 19.1 ns 4 +std::string e = "123456789012345678901234567890";_stddev 0.521 ns 0.521 ns 4 +std::string e = "123456789012345678901234567890";_cv 2.70 % 2.70 % 4 +std::string_view e = "123456789012345678901234567890";_mean 0.739 ns 0.739 ns 4 +std::string_view e = "123456789012345678901234567890";_median 0.739 ns 0.739 ns 4 +std::string_view e = "123456789012345678901234567890";_stddev 0.021 ns 0.021 ns 4 +std::string_view e = "123456789012345678901234567890";_cv 2.88 % 2.88 % 4 +ssa e = "123456789012345678901234567890";_mean 0.386 ns 0.386 ns 4 +ssa e = "123456789012345678901234567890";_median 0.373 ns 0.373 ns 4 +ssa e = "123456789012345678901234567890";_stddev 0.028 ns 0.028 ns 4 +ssa e = "123456789012345678901234567890";_cv 7.37 % 7.37 % 4 +stringa e = "123456789012345678901234567890";_mean 1.12 ns 1.12 ns 4 +stringa e = "123456789012345678901234567890";_median 1.12 ns 1.12 ns 4 +stringa e = "123456789012345678901234567890";_stddev 0.046 ns 0.046 ns 4 +stringa e = "123456789012345678901234567890";_cv 4.12 % 4.12 % 4 +lstringa<20> e = "123456789012345678901234567890";_mean 21.7 ns 21.7 ns 4 +lstringa<20> e = "123456789012345678901234567890";_median 20.9 ns 20.9 ns 4 +lstringa<20> e = "123456789012345678901234567890";_stddev 2.22 ns 2.22 ns 4 +lstringa<20> e = "123456789012345678901234567890";_cv 10.23 % 10.23 % 4 +lstringa<40> e = "123456789012345678901234567890";_mean 2.60 ns 2.60 ns 4 +lstringa<40> e = "123456789012345678901234567890";_median 2.56 ns 2.56 ns 4 +lstringa<40> e = "123456789012345678901234567890";_stddev 0.127 ns 0.127 ns 4 +lstringa<40> e = "123456789012345678901234567890";_cv 4.86 % 4.86 % 4 ----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text"; auto c{e};_mean 5.14 ns 5.14 ns 10 -std::string e = "Test text"; auto c{e};_median 5.14 ns 5.14 ns 10 -std::string e = "Test text"; auto c{e};_stddev 0.102 ns 0.102 ns 10 -std::string e = "Test text"; auto c{e};_cv 1.99 % 1.99 % 10 -std::string_view e = "Test text"; auto c{e};_mean 0.388 ns 0.388 ns 10 -std::string_view e = "Test text"; auto c{e};_median 0.382 ns 0.382 ns 10 -std::string_view e = "Test text"; auto c{e};_stddev 0.028 ns 0.028 ns 10 -std::string_view e = "Test text"; auto c{e};_cv 7.15 % 7.15 % 10 -ssa e = "Test text"; auto c{e};_mean 0.367 ns 0.367 ns 10 -ssa e = "Test text"; auto c{e};_median 0.365 ns 0.365 ns 10 -ssa e = "Test text"; auto c{e};_stddev 0.008 ns 0.008 ns 10 -ssa e = "Test text"; auto c{e};_cv 2.30 % 2.30 % 10 -stringa e = "Test text"; auto c{e};_mean 1.10 ns 1.10 ns 10 -stringa e = "Test text"; auto c{e};_median 1.10 ns 1.10 ns 10 -stringa e = "Test text"; auto c{e};_stddev 0.022 ns 0.022 ns 10 -stringa e = "Test text"; auto c{e};_cv 2.00 % 2.00 % 10 -lstringa<20> e = "Test text"; auto c{e};_mean 4.38 ns 4.38 ns 10 -lstringa<20> e = "Test text"; auto c{e};_median 4.38 ns 4.38 ns 10 -lstringa<20> e = "Test text"; auto c{e};_stddev 0.075 ns 0.075 ns 10 -lstringa<20> e = "Test text"; auto c{e};_cv 1.71 % 1.71 % 10 -lstringa<40> e = "Test text"; auto c{e};_mean 4.52 ns 4.52 ns 10 -lstringa<40> e = "Test text"; auto c{e};_median 4.47 ns 4.47 ns 10 -lstringa<40> e = "Test text"; auto c{e};_stddev 0.146 ns 0.146 ns 10 -lstringa<40> e = "Test text"; auto c{e};_cv 3.23 % 3.23 % 10 +std::string e = "Test text"; auto c{e};_mean 6.07 ns 6.07 ns 4 +std::string e = "Test text"; auto c{e};_median 5.87 ns 5.87 ns 4 +std::string e = "Test text"; auto c{e};_stddev 0.557 ns 0.557 ns 4 +std::string e = "Test text"; auto c{e};_cv 9.19 % 9.19 % 4 +std::string_view e = "Test text"; auto c{e};_mean 0.382 ns 0.382 ns 4 +std::string_view e = "Test text"; auto c{e};_median 0.375 ns 0.375 ns 4 +std::string_view e = "Test text"; auto c{e};_stddev 0.025 ns 0.025 ns 4 +std::string_view e = "Test text"; auto c{e};_cv 6.63 % 6.63 % 4 +ssa e = "Test text"; auto c{e};_mean 0.367 ns 0.367 ns 4 +ssa e = "Test text"; auto c{e};_median 0.366 ns 0.366 ns 4 +ssa e = "Test text"; auto c{e};_stddev 0.004 ns 0.004 ns 4 +ssa e = "Test text"; auto c{e};_cv 0.98 % 0.98 % 4 +stringa e = "Test text"; auto c{e};_mean 1.12 ns 1.12 ns 4 +stringa e = "Test text"; auto c{e};_median 1.12 ns 1.12 ns 4 +stringa e = "Test text"; auto c{e};_stddev 0.021 ns 0.021 ns 4 +stringa e = "Test text"; auto c{e};_cv 1.87 % 1.87 % 4 +lstringa<20> e = "Test text"; auto c{e};_mean 4.12 ns 4.12 ns 4 +lstringa<20> e = "Test text"; auto c{e};_median 4.11 ns 4.11 ns 4 +lstringa<20> e = "Test text"; auto c{e};_stddev 0.050 ns 0.050 ns 4 +lstringa<20> e = "Test text"; auto c{e};_cv 1.22 % 1.22 % 4 +lstringa<40> e = "Test text"; auto c{e};_mean 4.37 ns 4.37 ns 4 +lstringa<40> e = "Test text"; auto c{e};_median 4.25 ns 4.25 ns 4 +lstringa<40> e = "Test text"; auto c{e};_stddev 0.297 ns 0.297 ns 4 +lstringa<40> e = "Test text"; auto c{e};_cv 6.81 % 6.81 % 4 ----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890"; auto c{e};_mean 18.9 ns 18.9 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_median 18.8 ns 18.8 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.425 ns 0.425 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_cv 2.25 % 2.25 % 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.733 ns 0.733 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.731 ns 0.731 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.009 ns 0.009 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.18 % 1.18 % 10 -ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.367 ns 0.367 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_median 0.368 ns 0.368 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.006 ns 0.006 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.53 % 1.53 % 10 -stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.15 ns 1.15 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_median 1.12 ns 1.12 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.075 ns 0.075 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_cv 6.49 % 6.49 % 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 19.9 ns 19.9 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 20.0 ns 20.0 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.678 ns 0.678 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 3.40 % 3.40 % 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.50 ns 4.50 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.45 ns 4.45 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.240 ns 0.240 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 5.33 % 5.33 % 10 +std::string e = "123456789012345678901234567890"; auto c{e};_mean 20.1 ns 20.1 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_median 20.0 ns 20.0 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.957 ns 0.958 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_cv 4.76 % 4.76 % 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.732 ns 0.732 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.731 ns 0.731 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.014 ns 0.014 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.88 % 1.88 % 4 +ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.376 ns 0.376 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_median 0.373 ns 0.373 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.009 ns 0.009 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.39 % 2.39 % 4 +stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.15 ns 1.15 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_median 1.13 ns 1.13 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.050 ns 0.050 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_cv 4.39 % 4.39 % 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 21.5 ns 21.5 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 21.4 ns 21.4 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.959 ns 0.959 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 4.46 % 4.46 % 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.04 ns 4.04 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.05 ns 4.05 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.083 ns 0.083 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 2.05 % 2.05 % 4 ----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find;_mean 6.71 ns 6.71 ns 10 -std::string::find;_median 6.70 ns 6.70 ns 10 -std::string::find;_stddev 0.084 ns 0.084 ns 10 -std::string::find;_cv 1.26 % 1.26 % 10 -std::string_view::find;_mean 7.24 ns 7.24 ns 10 -std::string_view::find;_median 7.15 ns 7.15 ns 10 -std::string_view::find;_stddev 0.323 ns 0.323 ns 10 -std::string_view::find;_cv 4.46 % 4.46 % 10 -ssa::find;_mean 6.72 ns 6.72 ns 10 -ssa::find;_median 6.75 ns 6.75 ns 10 -ssa::find;_stddev 0.141 ns 0.141 ns 10 -ssa::find;_cv 2.10 % 2.10 % 10 -stringa::find;_mean 7.59 ns 7.59 ns 10 -stringa::find;_median 7.50 ns 7.50 ns 10 -stringa::find;_stddev 0.327 ns 0.327 ns 10 -stringa::find;_cv 4.30 % 4.30 % 10 -lstringa<20>::find;_mean 6.27 ns 6.27 ns 10 -lstringa<20>::find;_median 6.29 ns 6.29 ns 10 -lstringa<20>::find;_stddev 0.110 ns 0.110 ns 10 -lstringa<20>::find;_cv 1.76 % 1.76 % 10 -lstringa<40>::find;_mean 6.32 ns 6.32 ns 10 -lstringa<40>::find;_median 6.31 ns 6.31 ns 10 -lstringa<40>::find;_stddev 0.124 ns 0.124 ns 10 -lstringa<40>::find;_cv 1.97 % 1.97 % 10 +std::string::find;_mean 6.67 ns 6.67 ns 4 +std::string::find;_median 6.71 ns 6.71 ns 4 +std::string::find;_stddev 0.109 ns 0.109 ns 4 +std::string::find;_cv 1.64 % 1.64 % 4 +std::string_view::find;_mean 7.81 ns 7.81 ns 4 +std::string_view::find;_median 7.79 ns 7.79 ns 4 +std::string_view::find;_stddev 0.460 ns 0.460 ns 4 +std::string_view::find;_cv 5.89 % 5.89 % 4 +ssa::find;_mean 7.11 ns 7.11 ns 4 +ssa::find;_median 7.12 ns 7.12 ns 4 +ssa::find;_stddev 0.120 ns 0.120 ns 4 +ssa::find;_cv 1.69 % 1.69 % 4 +stringa::find;_mean 7.18 ns 7.18 ns 4 +stringa::find;_median 7.22 ns 7.22 ns 4 +stringa::find;_stddev 0.122 ns 0.122 ns 4 +stringa::find;_cv 1.69 % 1.69 % 4 +lstringa<20>::find;_mean 7.10 ns 7.10 ns 4 +lstringa<20>::find;_median 7.00 ns 7.00 ns 4 +lstringa<20>::find;_stddev 0.410 ns 0.410 ns 4 +lstringa<20>::find;_cv 5.77 % 5.77 % 4 +lstringa<40>::find;_mean 6.69 ns 6.69 ns 4 +lstringa<40>::find;_median 6.67 ns 6.67 ns 4 +lstringa<40>::find;_stddev 0.123 ns 0.123 ns 4 +lstringa<40>::find;_cv 1.84 % 1.84 % 4 ------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string copy{str_with_len_N};/15_mean 4.85 ns 4.85 ns 10 -std::string copy{str_with_len_N};/15_median 4.81 ns 4.81 ns 10 -std::string copy{str_with_len_N};/15_stddev 0.104 ns 0.104 ns 10 -std::string copy{str_with_len_N};/15_cv 2.15 % 2.16 % 10 -std::string copy{str_with_len_N};/16_mean 22.2 ns 22.2 ns 10 -std::string copy{str_with_len_N};/16_median 22.2 ns 22.2 ns 10 -std::string copy{str_with_len_N};/16_stddev 0.305 ns 0.305 ns 10 -std::string copy{str_with_len_N};/16_cv 1.38 % 1.38 % 10 -std::string copy{str_with_len_N};/23_mean 22.2 ns 22.2 ns 10 -std::string copy{str_with_len_N};/23_median 22.3 ns 22.3 ns 10 -std::string copy{str_with_len_N};/23_stddev 0.484 ns 0.484 ns 10 -std::string copy{str_with_len_N};/23_cv 2.18 % 2.18 % 10 -std::string copy{str_with_len_N};/24_mean 24.0 ns 24.0 ns 10 -std::string copy{str_with_len_N};/24_median 23.6 ns 23.6 ns 10 -std::string copy{str_with_len_N};/24_stddev 1.77 ns 1.77 ns 10 -std::string copy{str_with_len_N};/24_cv 7.39 % 7.39 % 10 -std::string copy{str_with_len_N};/32_mean 23.4 ns 23.4 ns 10 -std::string copy{str_with_len_N};/32_median 22.5 ns 22.5 ns 10 -std::string copy{str_with_len_N};/32_stddev 1.94 ns 1.94 ns 10 -std::string copy{str_with_len_N};/32_cv 8.32 % 8.32 % 10 -std::string copy{str_with_len_N};/64_mean 22.0 ns 22.0 ns 10 -std::string copy{str_with_len_N};/64_median 21.9 ns 21.9 ns 10 -std::string copy{str_with_len_N};/64_stddev 0.465 ns 0.464 ns 10 -std::string copy{str_with_len_N};/64_cv 2.11 % 2.11 % 10 -std::string copy{str_with_len_N};/128_mean 23.5 ns 23.5 ns 10 -std::string copy{str_with_len_N};/128_median 23.4 ns 23.4 ns 10 -std::string copy{str_with_len_N};/128_stddev 0.398 ns 0.398 ns 10 -std::string copy{str_with_len_N};/128_cv 1.70 % 1.70 % 10 -std::string copy{str_with_len_N};/256_mean 28.6 ns 28.6 ns 10 -std::string copy{str_with_len_N};/256_median 28.5 ns 28.5 ns 10 -std::string copy{str_with_len_N};/256_stddev 1.01 ns 1.01 ns 10 -std::string copy{str_with_len_N};/256_cv 3.52 % 3.52 % 10 -std::string copy{str_with_len_N};/512_mean 28.7 ns 28.7 ns 10 -std::string copy{str_with_len_N};/512_median 27.9 ns 27.9 ns 10 -std::string copy{str_with_len_N};/512_stddev 2.24 ns 2.24 ns 10 -std::string copy{str_with_len_N};/512_cv 7.82 % 7.82 % 10 -std::string copy{str_with_len_N};/1024_mean 35.9 ns 35.9 ns 10 -std::string copy{str_with_len_N};/1024_median 35.4 ns 35.4 ns 10 -std::string copy{str_with_len_N};/1024_stddev 2.19 ns 2.19 ns 10 -std::string copy{str_with_len_N};/1024_cv 6.10 % 6.10 % 10 -std::string copy{str_with_len_N};/2048_mean 119 ns 119 ns 10 -std::string copy{str_with_len_N};/2048_median 119 ns 119 ns 10 -std::string copy{str_with_len_N};/2048_stddev 7.65 ns 7.65 ns 10 -std::string copy{str_with_len_N};/2048_cv 6.43 % 6.43 % 10 -std::string copy{str_with_len_N};/4096_mean 150 ns 150 ns 10 -std::string copy{str_with_len_N};/4096_median 152 ns 152 ns 10 -std::string copy{str_with_len_N};/4096_stddev 8.20 ns 8.20 ns 10 -std::string copy{str_with_len_N};/4096_cv 5.45 % 5.45 % 10 -stringa copy{str_with_len_N};/15_mean 1.10 ns 1.10 ns 10 -stringa copy{str_with_len_N};/15_median 1.10 ns 1.10 ns 10 -stringa copy{str_with_len_N};/15_stddev 0.012 ns 0.012 ns 10 -stringa copy{str_with_len_N};/15_cv 1.07 % 1.07 % 10 -stringa copy{str_with_len_N};/16_mean 1.10 ns 1.10 ns 10 -stringa copy{str_with_len_N};/16_median 1.09 ns 1.09 ns 10 -stringa copy{str_with_len_N};/16_stddev 0.019 ns 0.019 ns 10 -stringa copy{str_with_len_N};/16_cv 1.77 % 1.77 % 10 -stringa copy{str_with_len_N};/23_mean 1.16 ns 1.16 ns 10 -stringa copy{str_with_len_N};/23_median 1.15 ns 1.15 ns 10 -stringa copy{str_with_len_N};/23_stddev 0.056 ns 0.056 ns 10 -stringa copy{str_with_len_N};/23_cv 4.85 % 4.85 % 10 -stringa copy{str_with_len_N};/24_mean 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/24_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/24_stddev 0.056 ns 0.056 ns 10 -stringa copy{str_with_len_N};/24_cv 0.35 % 0.35 % 10 -stringa copy{str_with_len_N};/32_mean 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/32_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/32_stddev 0.059 ns 0.059 ns 10 -stringa copy{str_with_len_N};/32_cv 0.37 % 0.37 % 10 -stringa copy{str_with_len_N};/64_mean 16.3 ns 16.3 ns 10 -stringa copy{str_with_len_N};/64_median 16.2 ns 16.2 ns 10 -stringa copy{str_with_len_N};/64_stddev 0.429 ns 0.429 ns 10 -stringa copy{str_with_len_N};/64_cv 2.64 % 2.64 % 10 -stringa copy{str_with_len_N};/128_mean 16.3 ns 16.3 ns 10 -stringa copy{str_with_len_N};/128_median 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/128_stddev 0.656 ns 0.656 ns 10 -stringa copy{str_with_len_N};/128_cv 4.02 % 4.02 % 10 -stringa copy{str_with_len_N};/256_mean 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/256_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/256_stddev 0.084 ns 0.084 ns 10 -stringa copy{str_with_len_N};/256_cv 0.52 % 0.52 % 10 -stringa copy{str_with_len_N};/512_mean 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/512_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/512_stddev 0.114 ns 0.114 ns 10 -stringa copy{str_with_len_N};/512_cv 0.72 % 0.72 % 10 -stringa copy{str_with_len_N};/1024_mean 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/1024_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/1024_stddev 0.095 ns 0.095 ns 10 -stringa copy{str_with_len_N};/1024_cv 0.59 % 0.59 % 10 -stringa copy{str_with_len_N};/2048_mean 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/2048_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/2048_stddev 0.318 ns 0.318 ns 10 -stringa copy{str_with_len_N};/2048_cv 1.98 % 1.98 % 10 -stringa copy{str_with_len_N};/4096_mean 16.2 ns 16.2 ns 10 -stringa copy{str_with_len_N};/4096_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/4096_stddev 0.389 ns 0.389 ns 10 -stringa copy{str_with_len_N};/4096_cv 2.41 % 2.41 % 10 -lstringa<16> copy{str_with_len_N};/15_mean 4.49 ns 4.49 ns 10 -lstringa<16> copy{str_with_len_N};/15_median 4.45 ns 4.45 ns 10 -lstringa<16> copy{str_with_len_N};/15_stddev 0.122 ns 0.122 ns 10 -lstringa<16> copy{str_with_len_N};/15_cv 2.71 % 2.71 % 10 -lstringa<16> copy{str_with_len_N};/16_mean 4.67 ns 4.67 ns 10 -lstringa<16> copy{str_with_len_N};/16_median 4.54 ns 4.54 ns 10 -lstringa<16> copy{str_with_len_N};/16_stddev 0.301 ns 0.301 ns 10 -lstringa<16> copy{str_with_len_N};/16_cv 6.45 % 6.45 % 10 -lstringa<16> copy{str_with_len_N};/23_mean 4.62 ns 4.62 ns 10 -lstringa<16> copy{str_with_len_N};/23_median 4.45 ns 4.45 ns 10 -lstringa<16> copy{str_with_len_N};/23_stddev 0.370 ns 0.370 ns 10 -lstringa<16> copy{str_with_len_N};/23_cv 8.01 % 8.01 % 10 -lstringa<16> copy{str_with_len_N};/24_mean 23.8 ns 23.8 ns 10 -lstringa<16> copy{str_with_len_N};/24_median 23.6 ns 23.6 ns 10 -lstringa<16> copy{str_with_len_N};/24_stddev 0.619 ns 0.619 ns 10 -lstringa<16> copy{str_with_len_N};/24_cv 2.61 % 2.61 % 10 -lstringa<16> copy{str_with_len_N};/32_mean 23.5 ns 23.5 ns 10 -lstringa<16> copy{str_with_len_N};/32_median 23.4 ns 23.4 ns 10 -lstringa<16> copy{str_with_len_N};/32_stddev 0.921 ns 0.921 ns 10 -lstringa<16> copy{str_with_len_N};/32_cv 3.92 % 3.92 % 10 -lstringa<16> copy{str_with_len_N};/64_mean 25.2 ns 25.2 ns 10 -lstringa<16> copy{str_with_len_N};/64_median 24.9 ns 24.9 ns 10 -lstringa<16> copy{str_with_len_N};/64_stddev 1.48 ns 1.48 ns 10 -lstringa<16> copy{str_with_len_N};/64_cv 5.85 % 5.85 % 10 -lstringa<16> copy{str_with_len_N};/128_mean 25.2 ns 25.2 ns 10 -lstringa<16> copy{str_with_len_N};/128_median 25.1 ns 25.1 ns 10 -lstringa<16> copy{str_with_len_N};/128_stddev 0.499 ns 0.499 ns 10 -lstringa<16> copy{str_with_len_N};/128_cv 1.98 % 1.98 % 10 -lstringa<16> copy{str_with_len_N};/256_mean 27.8 ns 27.8 ns 10 -lstringa<16> copy{str_with_len_N};/256_median 27.0 ns 27.0 ns 10 -lstringa<16> copy{str_with_len_N};/256_stddev 2.11 ns 2.11 ns 10 -lstringa<16> copy{str_with_len_N};/256_cv 7.59 % 7.59 % 10 -lstringa<16> copy{str_with_len_N};/512_mean 30.4 ns 30.4 ns 10 -lstringa<16> copy{str_with_len_N};/512_median 30.2 ns 30.2 ns 10 -lstringa<16> copy{str_with_len_N};/512_stddev 2.08 ns 2.08 ns 10 -lstringa<16> copy{str_with_len_N};/512_cv 6.86 % 6.86 % 10 -lstringa<16> copy{str_with_len_N};/1024_mean 95.7 ns 95.7 ns 10 -lstringa<16> copy{str_with_len_N};/1024_median 94.2 ns 94.2 ns 10 -lstringa<16> copy{str_with_len_N};/1024_stddev 9.99 ns 9.99 ns 10 -lstringa<16> copy{str_with_len_N};/1024_cv 10.44 % 10.44 % 10 -lstringa<16> copy{str_with_len_N};/2048_mean 122 ns 122 ns 10 -lstringa<16> copy{str_with_len_N};/2048_median 116 ns 116 ns 10 -lstringa<16> copy{str_with_len_N};/2048_stddev 15.7 ns 15.7 ns 10 -lstringa<16> copy{str_with_len_N};/2048_cv 12.89 % 12.89 % 10 -lstringa<16> copy{str_with_len_N};/4096_mean 128 ns 128 ns 10 -lstringa<16> copy{str_with_len_N};/4096_median 128 ns 128 ns 10 -lstringa<16> copy{str_with_len_N};/4096_stddev 9.83 ns 9.83 ns 10 -lstringa<16> copy{str_with_len_N};/4096_cv 7.70 % 7.70 % 10 -lstringa<512> copy{str_with_len_N};/15_mean 4.94 ns 4.94 ns 10 -lstringa<512> copy{str_with_len_N};/15_median 4.86 ns 4.86 ns 10 -lstringa<512> copy{str_with_len_N};/15_stddev 0.206 ns 0.206 ns 10 -lstringa<512> copy{str_with_len_N};/15_cv 4.18 % 4.18 % 10 -lstringa<512> copy{str_with_len_N};/16_mean 5.13 ns 5.13 ns 10 -lstringa<512> copy{str_with_len_N};/16_median 4.90 ns 4.90 ns 10 -lstringa<512> copy{str_with_len_N};/16_stddev 0.433 ns 0.433 ns 10 -lstringa<512> copy{str_with_len_N};/16_cv 8.44 % 8.44 % 10 -lstringa<512> copy{str_with_len_N};/23_mean 4.86 ns 4.86 ns 10 -lstringa<512> copy{str_with_len_N};/23_median 4.80 ns 4.80 ns 10 -lstringa<512> copy{str_with_len_N};/23_stddev 0.181 ns 0.181 ns 10 -lstringa<512> copy{str_with_len_N};/23_cv 3.72 % 3.72 % 10 -lstringa<512> copy{str_with_len_N};/24_mean 4.91 ns 4.91 ns 10 -lstringa<512> copy{str_with_len_N};/24_median 4.87 ns 4.87 ns 10 -lstringa<512> copy{str_with_len_N};/24_stddev 0.298 ns 0.298 ns 10 -lstringa<512> copy{str_with_len_N};/24_cv 6.07 % 6.07 % 10 -lstringa<512> copy{str_with_len_N};/32_mean 4.56 ns 4.56 ns 10 -lstringa<512> copy{str_with_len_N};/32_median 4.49 ns 4.49 ns 10 -lstringa<512> copy{str_with_len_N};/32_stddev 0.199 ns 0.199 ns 10 -lstringa<512> copy{str_with_len_N};/32_cv 4.37 % 4.37 % 10 -lstringa<512> copy{str_with_len_N};/64_mean 5.95 ns 5.95 ns 10 -lstringa<512> copy{str_with_len_N};/64_median 5.90 ns 5.90 ns 10 -lstringa<512> copy{str_with_len_N};/64_stddev 0.139 ns 0.139 ns 10 -lstringa<512> copy{str_with_len_N};/64_cv 2.33 % 2.33 % 10 -lstringa<512> copy{str_with_len_N};/128_mean 6.86 ns 6.86 ns 10 -lstringa<512> copy{str_with_len_N};/128_median 6.83 ns 6.83 ns 10 -lstringa<512> copy{str_with_len_N};/128_stddev 0.592 ns 0.592 ns 10 -lstringa<512> copy{str_with_len_N};/128_cv 8.63 % 8.63 % 10 -lstringa<512> copy{str_with_len_N};/256_mean 17.1 ns 17.1 ns 10 -lstringa<512> copy{str_with_len_N};/256_median 17.1 ns 17.1 ns 10 -lstringa<512> copy{str_with_len_N};/256_stddev 0.093 ns 0.093 ns 10 -lstringa<512> copy{str_with_len_N};/256_cv 0.54 % 0.54 % 10 -lstringa<512> copy{str_with_len_N};/512_mean 10.3 ns 10.3 ns 10 -lstringa<512> copy{str_with_len_N};/512_median 10.2 ns 10.2 ns 10 -lstringa<512> copy{str_with_len_N};/512_stddev 0.279 ns 0.279 ns 10 -lstringa<512> copy{str_with_len_N};/512_cv 2.70 % 2.70 % 10 -lstringa<512> copy{str_with_len_N};/1024_mean 95.0 ns 95.0 ns 10 -lstringa<512> copy{str_with_len_N};/1024_median 95.5 ns 95.5 ns 10 -lstringa<512> copy{str_with_len_N};/1024_stddev 9.93 ns 9.93 ns 10 -lstringa<512> copy{str_with_len_N};/1024_cv 10.45 % 10.45 % 10 -lstringa<512> copy{str_with_len_N};/2048_mean 113 ns 113 ns 10 -lstringa<512> copy{str_with_len_N};/2048_median 116 ns 116 ns 10 -lstringa<512> copy{str_with_len_N};/2048_stddev 10.8 ns 10.8 ns 10 -lstringa<512> copy{str_with_len_N};/2048_cv 9.59 % 9.59 % 10 -lstringa<512> copy{str_with_len_N};/4096_mean 126 ns 126 ns 10 -lstringa<512> copy{str_with_len_N};/4096_median 128 ns 128 ns 10 -lstringa<512> copy{str_with_len_N};/4096_stddev 8.21 ns 8.21 ns 10 -lstringa<512> copy{str_with_len_N};/4096_cv 6.53 % 6.53 % 10 +std::string copy{str_with_len_N};/15_mean 5.61 ns 5.61 ns 4 +std::string copy{str_with_len_N};/15_median 5.60 ns 5.60 ns 4 +std::string copy{str_with_len_N};/15_stddev 0.097 ns 0.097 ns 4 +std::string copy{str_with_len_N};/15_cv 1.72 % 1.72 % 4 +std::string copy{str_with_len_N};/16_mean 23.0 ns 23.0 ns 4 +std::string copy{str_with_len_N};/16_median 23.0 ns 23.0 ns 4 +std::string copy{str_with_len_N};/16_stddev 0.539 ns 0.539 ns 4 +std::string copy{str_with_len_N};/16_cv 2.35 % 2.35 % 4 +std::string copy{str_with_len_N};/23_mean 23.0 ns 23.0 ns 4 +std::string copy{str_with_len_N};/23_median 23.2 ns 23.2 ns 4 +std::string copy{str_with_len_N};/23_stddev 0.607 ns 0.607 ns 4 +std::string copy{str_with_len_N};/23_cv 2.64 % 2.64 % 4 +std::string copy{str_with_len_N};/24_mean 22.9 ns 22.9 ns 4 +std::string copy{str_with_len_N};/24_median 22.7 ns 22.7 ns 4 +std::string copy{str_with_len_N};/24_stddev 0.831 ns 0.831 ns 4 +std::string copy{str_with_len_N};/24_cv 3.62 % 3.62 % 4 +std::string copy{str_with_len_N};/32_mean 22.4 ns 22.4 ns 4 +std::string copy{str_with_len_N};/32_median 22.6 ns 22.6 ns 4 +std::string copy{str_with_len_N};/32_stddev 0.449 ns 0.449 ns 4 +std::string copy{str_with_len_N};/32_cv 2.00 % 2.00 % 4 +std::string copy{str_with_len_N};/64_mean 23.1 ns 23.1 ns 4 +std::string copy{str_with_len_N};/64_median 22.7 ns 22.7 ns 4 +std::string copy{str_with_len_N};/64_stddev 0.959 ns 0.959 ns 4 +std::string copy{str_with_len_N};/64_cv 4.15 % 4.15 % 4 +std::string copy{str_with_len_N};/128_mean 24.2 ns 24.2 ns 4 +std::string copy{str_with_len_N};/128_median 24.1 ns 24.1 ns 4 +std::string copy{str_with_len_N};/128_stddev 0.593 ns 0.593 ns 4 +std::string copy{str_with_len_N};/128_cv 2.46 % 2.46 % 4 +std::string copy{str_with_len_N};/256_mean 24.7 ns 24.7 ns 4 +std::string copy{str_with_len_N};/256_median 24.2 ns 24.2 ns 4 +std::string copy{str_with_len_N};/256_stddev 1.11 ns 1.11 ns 4 +std::string copy{str_with_len_N};/256_cv 4.51 % 4.51 % 4 +std::string copy{str_with_len_N};/512_mean 29.2 ns 29.2 ns 4 +std::string copy{str_with_len_N};/512_median 29.2 ns 29.2 ns 4 +std::string copy{str_with_len_N};/512_stddev 0.746 ns 0.746 ns 4 +std::string copy{str_with_len_N};/512_cv 2.55 % 2.55 % 4 +std::string copy{str_with_len_N};/1024_mean 45.3 ns 45.3 ns 4 +std::string copy{str_with_len_N};/1024_median 45.4 ns 45.4 ns 4 +std::string copy{str_with_len_N};/1024_stddev 1.10 ns 1.10 ns 4 +std::string copy{str_with_len_N};/1024_cv 2.43 % 2.43 % 4 +std::string copy{str_with_len_N};/2048_mean 123 ns 123 ns 4 +std::string copy{str_with_len_N};/2048_median 121 ns 121 ns 4 +std::string copy{str_with_len_N};/2048_stddev 8.43 ns 8.43 ns 4 +std::string copy{str_with_len_N};/2048_cv 6.84 % 6.84 % 4 +std::string copy{str_with_len_N};/4096_mean 153 ns 153 ns 4 +std::string copy{str_with_len_N};/4096_median 154 ns 154 ns 4 +std::string copy{str_with_len_N};/4096_stddev 5.35 ns 5.35 ns 4 +std::string copy{str_with_len_N};/4096_cv 3.49 % 3.49 % 4 +stringa copy{str_with_len_N};/15_mean 1.10 ns 1.10 ns 4 +stringa copy{str_with_len_N};/15_median 1.10 ns 1.10 ns 4 +stringa copy{str_with_len_N};/15_stddev 0.021 ns 0.021 ns 4 +stringa copy{str_with_len_N};/15_cv 1.90 % 1.90 % 4 +stringa copy{str_with_len_N};/16_mean 1.11 ns 1.11 ns 4 +stringa copy{str_with_len_N};/16_median 1.11 ns 1.11 ns 4 +stringa copy{str_with_len_N};/16_stddev 0.024 ns 0.024 ns 4 +stringa copy{str_with_len_N};/16_cv 2.19 % 2.19 % 4 +stringa copy{str_with_len_N};/23_mean 1.10 ns 1.10 ns 4 +stringa copy{str_with_len_N};/23_median 1.10 ns 1.10 ns 4 +stringa copy{str_with_len_N};/23_stddev 0.009 ns 0.009 ns 4 +stringa copy{str_with_len_N};/23_cv 0.84 % 0.84 % 4 +stringa copy{str_with_len_N};/24_mean 16.2 ns 16.2 ns 4 +stringa copy{str_with_len_N};/24_median 16.2 ns 16.2 ns 4 +stringa copy{str_with_len_N};/24_stddev 0.129 ns 0.129 ns 4 +stringa copy{str_with_len_N};/24_cv 0.80 % 0.80 % 4 +stringa copy{str_with_len_N};/32_mean 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/32_median 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/32_stddev 0.093 ns 0.093 ns 4 +stringa copy{str_with_len_N};/32_cv 0.57 % 0.57 % 4 +stringa copy{str_with_len_N};/64_mean 16.4 ns 16.4 ns 4 +stringa copy{str_with_len_N};/64_median 16.4 ns 16.4 ns 4 +stringa copy{str_with_len_N};/64_stddev 0.154 ns 0.154 ns 4 +stringa copy{str_with_len_N};/64_cv 0.94 % 0.94 % 4 +stringa copy{str_with_len_N};/128_mean 16.6 ns 16.6 ns 4 +stringa copy{str_with_len_N};/128_median 16.7 ns 16.7 ns 4 +stringa copy{str_with_len_N};/128_stddev 0.246 ns 0.246 ns 4 +stringa copy{str_with_len_N};/128_cv 1.48 % 1.48 % 4 +stringa copy{str_with_len_N};/256_mean 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/256_median 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/256_stddev 0.213 ns 0.213 ns 4 +stringa copy{str_with_len_N};/256_cv 1.31 % 1.31 % 4 +stringa copy{str_with_len_N};/512_mean 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/512_median 16.4 ns 16.4 ns 4 +stringa copy{str_with_len_N};/512_stddev 0.110 ns 0.110 ns 4 +stringa copy{str_with_len_N};/512_cv 0.68 % 0.68 % 4 +stringa copy{str_with_len_N};/1024_mean 16.4 ns 16.4 ns 4 +stringa copy{str_with_len_N};/1024_median 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/1024_stddev 0.146 ns 0.146 ns 4 +stringa copy{str_with_len_N};/1024_cv 0.89 % 0.89 % 4 +stringa copy{str_with_len_N};/2048_mean 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/2048_median 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/2048_stddev 0.054 ns 0.054 ns 4 +stringa copy{str_with_len_N};/2048_cv 0.33 % 0.33 % 4 +stringa copy{str_with_len_N};/4096_mean 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/4096_median 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/4096_stddev 0.037 ns 0.037 ns 4 +stringa copy{str_with_len_N};/4096_cv 0.23 % 0.23 % 4 +lstringa<16> copy{str_with_len_N};/15_mean 4.19 ns 4.19 ns 4 +lstringa<16> copy{str_with_len_N};/15_median 4.20 ns 4.20 ns 4 +lstringa<16> copy{str_with_len_N};/15_stddev 0.032 ns 0.032 ns 4 +lstringa<16> copy{str_with_len_N};/15_cv 0.78 % 0.78 % 4 +lstringa<16> copy{str_with_len_N};/16_mean 4.23 ns 4.23 ns 4 +lstringa<16> copy{str_with_len_N};/16_median 4.24 ns 4.24 ns 4 +lstringa<16> copy{str_with_len_N};/16_stddev 0.155 ns 0.155 ns 4 +lstringa<16> copy{str_with_len_N};/16_cv 3.66 % 3.66 % 4 +lstringa<16> copy{str_with_len_N};/23_mean 4.11 ns 4.11 ns 4 +lstringa<16> copy{str_with_len_N};/23_median 4.11 ns 4.11 ns 4 +lstringa<16> copy{str_with_len_N};/23_stddev 0.074 ns 0.074 ns 4 +lstringa<16> copy{str_with_len_N};/23_cv 1.80 % 1.80 % 4 +lstringa<16> copy{str_with_len_N};/24_mean 23.4 ns 23.4 ns 4 +lstringa<16> copy{str_with_len_N};/24_median 23.3 ns 23.3 ns 4 +lstringa<16> copy{str_with_len_N};/24_stddev 0.277 ns 0.277 ns 4 +lstringa<16> copy{str_with_len_N};/24_cv 1.18 % 1.18 % 4 +lstringa<16> copy{str_with_len_N};/32_mean 23.2 ns 23.2 ns 4 +lstringa<16> copy{str_with_len_N};/32_median 23.1 ns 23.1 ns 4 +lstringa<16> copy{str_with_len_N};/32_stddev 0.575 ns 0.575 ns 4 +lstringa<16> copy{str_with_len_N};/32_cv 2.48 % 2.48 % 4 +lstringa<16> copy{str_with_len_N};/64_mean 24.4 ns 24.4 ns 4 +lstringa<16> copy{str_with_len_N};/64_median 24.4 ns 24.4 ns 4 +lstringa<16> copy{str_with_len_N};/64_stddev 0.655 ns 0.655 ns 4 +lstringa<16> copy{str_with_len_N};/64_cv 2.68 % 2.68 % 4 +lstringa<16> copy{str_with_len_N};/128_mean 24.4 ns 24.4 ns 4 +lstringa<16> copy{str_with_len_N};/128_median 24.5 ns 24.5 ns 4 +lstringa<16> copy{str_with_len_N};/128_stddev 0.639 ns 0.639 ns 4 +lstringa<16> copy{str_with_len_N};/128_cv 2.62 % 2.62 % 4 +lstringa<16> copy{str_with_len_N};/256_mean 26.2 ns 26.2 ns 4 +lstringa<16> copy{str_with_len_N};/256_median 26.1 ns 26.1 ns 4 +lstringa<16> copy{str_with_len_N};/256_stddev 0.329 ns 0.329 ns 4 +lstringa<16> copy{str_with_len_N};/256_cv 1.26 % 1.26 % 4 +lstringa<16> copy{str_with_len_N};/512_mean 28.9 ns 28.9 ns 4 +lstringa<16> copy{str_with_len_N};/512_median 28.8 ns 28.8 ns 4 +lstringa<16> copy{str_with_len_N};/512_stddev 0.706 ns 0.706 ns 4 +lstringa<16> copy{str_with_len_N};/512_cv 2.44 % 2.44 % 4 +lstringa<16> copy{str_with_len_N};/1024_mean 93.7 ns 93.7 ns 4 +lstringa<16> copy{str_with_len_N};/1024_median 93.8 ns 93.8 ns 4 +lstringa<16> copy{str_with_len_N};/1024_stddev 1.58 ns 1.58 ns 4 +lstringa<16> copy{str_with_len_N};/1024_cv 1.69 % 1.69 % 4 +lstringa<16> copy{str_with_len_N};/2048_mean 107 ns 107 ns 4 +lstringa<16> copy{str_with_len_N};/2048_median 106 ns 106 ns 4 +lstringa<16> copy{str_with_len_N};/2048_stddev 3.77 ns 3.77 ns 4 +lstringa<16> copy{str_with_len_N};/2048_cv 3.53 % 3.53 % 4 +lstringa<16> copy{str_with_len_N};/4096_mean 121 ns 121 ns 4 +lstringa<16> copy{str_with_len_N};/4096_median 120 ns 120 ns 4 +lstringa<16> copy{str_with_len_N};/4096_stddev 4.12 ns 4.12 ns 4 +lstringa<16> copy{str_with_len_N};/4096_cv 3.40 % 3.40 % 4 +lstringa<512> copy{str_with_len_N};/15_mean 4.49 ns 4.49 ns 4 +lstringa<512> copy{str_with_len_N};/15_median 4.50 ns 4.50 ns 4 +lstringa<512> copy{str_with_len_N};/15_stddev 0.124 ns 0.124 ns 4 +lstringa<512> copy{str_with_len_N};/15_cv 2.77 % 2.77 % 4 +lstringa<512> copy{str_with_len_N};/16_mean 4.61 ns 4.61 ns 4 +lstringa<512> copy{str_with_len_N};/16_median 4.45 ns 4.45 ns 4 +lstringa<512> copy{str_with_len_N};/16_stddev 0.401 ns 0.401 ns 4 +lstringa<512> copy{str_with_len_N};/16_cv 8.68 % 8.68 % 4 +lstringa<512> copy{str_with_len_N};/23_mean 4.75 ns 4.75 ns 4 +lstringa<512> copy{str_with_len_N};/23_median 4.54 ns 4.54 ns 4 +lstringa<512> copy{str_with_len_N};/23_stddev 0.598 ns 0.598 ns 4 +lstringa<512> copy{str_with_len_N};/23_cv 12.59 % 12.59 % 4 +lstringa<512> copy{str_with_len_N};/24_mean 5.41 ns 5.41 ns 4 +lstringa<512> copy{str_with_len_N};/24_median 5.38 ns 5.38 ns 4 +lstringa<512> copy{str_with_len_N};/24_stddev 0.399 ns 0.399 ns 4 +lstringa<512> copy{str_with_len_N};/24_cv 7.37 % 7.37 % 4 +lstringa<512> copy{str_with_len_N};/32_mean 4.77 ns 4.77 ns 4 +lstringa<512> copy{str_with_len_N};/32_median 4.67 ns 4.67 ns 4 +lstringa<512> copy{str_with_len_N};/32_stddev 0.600 ns 0.600 ns 4 +lstringa<512> copy{str_with_len_N};/32_cv 12.59 % 12.59 % 4 +lstringa<512> copy{str_with_len_N};/64_mean 6.39 ns 6.39 ns 4 +lstringa<512> copy{str_with_len_N};/64_median 6.24 ns 6.24 ns 4 +lstringa<512> copy{str_with_len_N};/64_stddev 0.669 ns 0.669 ns 4 +lstringa<512> copy{str_with_len_N};/64_cv 10.46 % 10.46 % 4 +lstringa<512> copy{str_with_len_N};/128_mean 6.25 ns 6.25 ns 4 +lstringa<512> copy{str_with_len_N};/128_median 6.23 ns 6.23 ns 4 +lstringa<512> copy{str_with_len_N};/128_stddev 0.134 ns 0.134 ns 4 +lstringa<512> copy{str_with_len_N};/128_cv 2.14 % 2.14 % 4 +lstringa<512> copy{str_with_len_N};/256_mean 8.31 ns 8.31 ns 4 +lstringa<512> copy{str_with_len_N};/256_median 8.26 ns 8.26 ns 4 +lstringa<512> copy{str_with_len_N};/256_stddev 0.430 ns 0.430 ns 4 +lstringa<512> copy{str_with_len_N};/256_cv 5.17 % 5.17 % 4 +lstringa<512> copy{str_with_len_N};/512_mean 10.1 ns 10.1 ns 4 +lstringa<512> copy{str_with_len_N};/512_median 10.2 ns 10.2 ns 4 +lstringa<512> copy{str_with_len_N};/512_stddev 0.229 ns 0.229 ns 4 +lstringa<512> copy{str_with_len_N};/512_cv 2.27 % 2.27 % 4 +lstringa<512> copy{str_with_len_N};/1024_mean 94.6 ns 94.6 ns 4 +lstringa<512> copy{str_with_len_N};/1024_median 95.6 ns 95.6 ns 4 +lstringa<512> copy{str_with_len_N};/1024_stddev 2.89 ns 2.89 ns 4 +lstringa<512> copy{str_with_len_N};/1024_cv 3.05 % 3.05 % 4 +lstringa<512> copy{str_with_len_N};/2048_mean 106 ns 106 ns 4 +lstringa<512> copy{str_with_len_N};/2048_median 105 ns 105 ns 4 +lstringa<512> copy{str_with_len_N};/2048_stddev 5.63 ns 5.63 ns 4 +lstringa<512> copy{str_with_len_N};/2048_cv 5.29 % 5.29 % 4 +lstringa<512> copy{str_with_len_N};/4096_mean 127 ns 127 ns 4 +lstringa<512> copy{str_with_len_N};/4096_median 128 ns 128 ns 4 +lstringa<512> copy{str_with_len_N};/4096_stddev 3.87 ns 3.87 ns 4 +lstringa<512> copy{str_with_len_N};/4096_cv 3.05 % 3.05 % 4 ----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 26.9 ns 26.9 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 26.7 ns 26.7 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.568 ns 0.568 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.11 % 2.11 % 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 14.8 ns 14.8 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 14.8 ns 14.8 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.299 ns 0.299 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.03 % 2.03 % 10 -stringa s = "123456789"; int res = s.to_int_mean 12.9 ns 12.9 ns 10 -stringa s = "123456789"; int res = s.to_int_median 12.7 ns 12.7 ns 10 -stringa s = "123456789"; int res = s.to_int_stddev 0.683 ns 0.683 ns 10 -stringa s = "123456789"; int res = s.to_int_cv 5.29 % 5.29 % 10 -ssa s = "123456789"; int res = s.to_int_mean 12.9 ns 12.9 ns 10 -ssa s = "123456789"; int res = s.to_int_median 12.8 ns 12.8 ns 10 -ssa s = "123456789"; int res = s.to_int_stddev 0.742 ns 0.742 ns 10 -ssa s = "123456789"; int res = s.to_int_cv 5.76 % 5.76 % 10 -lstringa<20> s = "123456789"; int res = s.to_int_mean 12.3 ns 12.3 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_median 12.2 ns 12.2 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.142 ns 0.142 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_cv 1.15 % 1.15 % 10 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 27.1 ns 27.1 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 27.3 ns 27.3 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.694 ns 0.695 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.56 % 2.56 % 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 15.3 ns 15.3 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 15.2 ns 15.2 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.592 ns 0.592 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 3.86 % 3.86 % 4 +stringa s = "123456789"; int res = s.to_int_mean 12.9 ns 12.9 ns 4 +stringa s = "123456789"; int res = s.to_int_median 12.9 ns 12.9 ns 4 +stringa s = "123456789"; int res = s.to_int_stddev 0.284 ns 0.284 ns 4 +stringa s = "123456789"; int res = s.to_int_cv 2.21 % 2.21 % 4 +ssa s = "123456789"; int res = s.to_int_mean 12.6 ns 12.6 ns 4 +ssa s = "123456789"; int res = s.to_int_median 12.5 ns 12.5 ns 4 +ssa s = "123456789"; int res = s.to_int_stddev 0.448 ns 0.448 ns 4 +ssa s = "123456789"; int res = s.to_int_cv 3.57 % 3.57 % 4 +lstringa<20> s = "123456789"; int res = s.to_int_mean 12.4 ns 12.4 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_median 12.4 ns 12.4 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.119 ns 0.119 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_cv 0.96 % 0.96 % 4 ----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 23.5 ns 23.5 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 23.3 ns 23.3 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.514 ns 0.514 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.19 % 2.19 % 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.63 ns 9.63 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.65 ns 9.65 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.105 ns 0.105 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.09 % 1.09 % 10 -stringa s = "abcDef"; int res = s.to_int_mean 12.6 ns 12.6 ns 10 -stringa s = "abcDef"; int res = s.to_int_median 12.6 ns 12.6 ns 10 -stringa s = "abcDef"; int res = s.to_int_stddev 0.271 ns 0.271 ns 10 -stringa s = "abcDef"; int res = s.to_int_cv 2.14 % 2.14 % 10 -ssa s = "abcDef"; int res = s.to_int_mean 12.6 ns 12.6 ns 10 -ssa s = "abcDef"; int res = s.to_int_median 12.4 ns 12.4 ns 10 -ssa s = "abcDef"; int res = s.to_int_stddev 0.395 ns 0.395 ns 10 -ssa s = "abcDef"; int res = s.to_int_cv 3.15 % 3.15 % 10 -lstringa<20> s = "abcDef"; int res = s.to_int_mean 12.5 ns 12.5 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_median 12.4 ns 12.4 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.234 ns 0.234 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.88 % 1.88 % 10 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 23.8 ns 23.8 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 23.8 ns 23.8 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.551 ns 0.551 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.31 % 2.31 % 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.64 ns 9.64 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.62 ns 9.62 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.149 ns 0.149 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.55 % 1.55 % 4 +stringa s = "abcDef"; int res = s.to_int_mean 13.5 ns 13.5 ns 4 +stringa s = "abcDef"; int res = s.to_int_median 13.3 ns 13.3 ns 4 +stringa s = "abcDef"; int res = s.to_int_stddev 0.941 ns 0.941 ns 4 +stringa s = "abcDef"; int res = s.to_int_cv 6.95 % 6.95 % 4 +ssa s = "abcDef"; int res = s.to_int_mean 13.3 ns 13.3 ns 4 +ssa s = "abcDef"; int res = s.to_int_median 13.0 ns 13.0 ns 4 +ssa s = "abcDef"; int res = s.to_int_stddev 0.941 ns 0.941 ns 4 +ssa s = "abcDef"; int res = s.to_int_cv 7.05 % 7.05 % 4 +lstringa<20> s = "abcDef"; int res = s.to_int_mean 12.3 ns 12.3 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_median 12.3 ns 12.3 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.159 ns 0.159 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.29 % 1.29 % 4 ----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 28.5 ns 28.5 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 28.3 ns 28.3 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.918 ns 0.918 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 3.23 % 3.23 % 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 19.6 ns 19.6 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 18.9 ns 18.9 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 1.59 ns 1.59 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 8.11 % 8.10 % 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 15.2 ns 15.2 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 15.2 ns 15.2 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.487 ns 0.487 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 3.20 % 3.20 % 10 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 28.5 ns 28.5 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 28.6 ns 28.6 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.214 ns 0.214 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 0.75 % 0.75 % 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 19.1 ns 19.1 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 18.7 ns 18.7 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 1.13 ns 1.13 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 5.93 % 5.93 % 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 15.4 ns 15.4 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 15.4 ns 15.4 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.235 ns 0.235 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 1.52 % 1.52 % 4 ----- Convert to double '1234.567e10' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 64.1 ns 64.1 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 64.5 ns 64.5 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 1.77 ns 1.77 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 2.76 % 2.76 % 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 24.4 ns 24.4 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 24.2 ns 24.2 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.619 ns 0.619 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.54 % 2.54 % 10 -ssa s = "1234.567e10"; double res = *s.to_double()_mean 26.1 ns 26.1 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_median 25.8 ns 25.8 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.875 ns 0.875 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_cv 3.35 % 3.35 % 10 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 66.3 ns 66.3 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 66.0 ns 66.0 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 0.891 ns 0.890 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.34 % 1.34 % 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 23.9 ns 23.9 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 24.0 ns 24.0 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.276 ns 0.276 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.15 % 1.15 % 4 +ssa s = "1234.567e10"; double res = *s.to_double()_mean 25.8 ns 25.8 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_median 26.0 ns 26.0 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.584 ns 0.584 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.26 % 2.26 % 4 -- Append const literal of 16 bytes 64 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << "abbaabbaabbaabba";_mean 1351 ns 1351 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_median 1339 ns 1339 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 40.9 ns 40.9 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_cv 3.03 % 3.03 % 10 -std::string str; ... str += "abbaabbaabbaabba";_mean 375 ns 375 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_median 382 ns 382 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_stddev 20.0 ns 20.0 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_cv 5.34 % 5.34 % 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 411 ns 411 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_median 408 ns 408 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 43.5 ns 43.5 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 10.59 % 10.59 % 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 253 ns 253 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_median 250 ns 250 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 12.7 ns 12.7 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 5.02 % 5.02 % 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 232 ns 232 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_median 228 ns 228 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 15.1 ns 15.1 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 6.50 % 6.50 % 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 147 ns 147 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 147 ns 147 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 2.10 ns 2.10 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.42 % 1.42 % 10 +std::stringstream str; ... str << "abbaabbaabbaabba";_mean 1343 ns 1343 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_median 1333 ns 1333 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 29.9 ns 29.9 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_cv 2.23 % 2.23 % 4 +std::string str; ... str += "abbaabbaabbaabba";_mean 400 ns 400 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_median 398 ns 398 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_stddev 12.4 ns 12.4 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_cv 3.12 % 3.12 % 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 384 ns 384 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_median 384 ns 384 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 1.22 ns 1.22 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 0.32 % 0.32 % 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 282 ns 282 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_median 283 ns 283 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 8.25 ns 8.25 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 2.92 % 2.92 % 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 255 ns 255 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_median 261 ns 261 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 14.8 ns 14.8 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 5.80 % 5.80 % 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 154 ns 154 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 154 ns 154 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 1.31 ns 1.31 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 0.85 % 0.85 % 4 -- Append string of 16 bytes and const literal of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 1370 ns 1370 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1338 ns 1338 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 89.0 ns 89.0 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 6.50 % 6.50 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1263 ns 1263 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1261 ns 1261 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 16.1 ns 16.1 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 1.28 % 1.28 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 474 ns 474 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 476 ns 476 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.4 ns 18.4 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.89 % 3.89 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 331 ns 331 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 324 ns 324 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 17.3 ns 17.3 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.23 % 5.23 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 318 ns 318 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 316 ns 316 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 16.2 ns 16.2 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.08 % 5.08 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 235 ns 235 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 234 ns 234 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 7.14 ns 7.14 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.04 % 3.04 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 1440 ns 1440 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1434 ns 1434 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 35.5 ns 35.5 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.46 % 2.46 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1221 ns 1221 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1224 ns 1224 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 28.8 ns 28.8 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 2.36 % 2.36 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 444 ns 444 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 434 ns 434 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 40.4 ns 40.4 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 9.12 % 9.12 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 366 ns 367 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 368 ns 368 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 9.59 ns 9.59 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.62 % 2.62 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 297 ns 297 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 303 ns 303 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.2 ns 18.2 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 6.13 % 6.13 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 201 ns 201 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 198 ns 198 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 8.16 ns 8.16 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.07 % 4.07 % 4 -- Append string of 16 bytes and const literal of 16 bytes 2048 times, 65536 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 77708 ns 77708 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 75632 ns 75632 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 6322 ns 6322 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 8.14 % 8.14 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 72817 ns 72818 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 73025 ns 73025 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1332 ns 1332 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.83 % 1.83 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18621 ns 18621 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18304 ns 18304 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 932 ns 932 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.00 % 5.00 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18047 ns 18047 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17990 ns 17990 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 290 ns 290 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.61 % 1.61 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 15853 ns 15853 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 15657 ns 15657 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 450 ns 450 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.84 % 2.84 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16648 ns 16648 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16668 ns 16668 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 232 ns 232 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.39 % 1.39 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 77169 ns 77169 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 76502 ns 76502 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 2391 ns 2391 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 3.10 % 3.10 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 73735 ns 73735 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 73638 ns 73638 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2379 ns 2379 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.23 % 3.23 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 23209 ns 23209 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 21203 ns 21203 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 4334 ns 4334 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 18.68 % 18.68 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18060 ns 18060 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17598 ns 17598 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1438 ns 1438 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 7.96 % 7.96 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 19949 ns 19949 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 19751 ns 19751 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1436 ns 1436 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 7.20 % 7.20 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 20464 ns 20464 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 20348 ns 20348 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1584 ns 1584 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 7.74 % 7.74 % 4 -- Append 2 string of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var1 << str_var2;_mean 1377 ns 1377 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_median 1359 ns 1359 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_stddev 47.2 ns 47.2 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_cv 3.43 % 3.43 % 10 -std::string str; ... str += str_var1 + str_var2;_mean 1379 ns 1379 ns 10 -std::string str; ... str += str_var1 + str_var2;_median 1380 ns 1380 ns 10 -std::string str; ... str += str_var1 + str_var2;_stddev 24.7 ns 24.7 ns 10 -std::string str; ... str += str_var1 + str_var2;_cv 1.79 % 1.79 % 10 -lstringa<16> str; ... str += str_var1 + str_var2;_mean 525 ns 525 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_median 526 ns 526 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_stddev 19.4 ns 19.4 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_cv 3.70 % 3.70 % 10 -lstringa<128> str; ... str += str_var1 + str_var2;_mean 429 ns 429 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_median 424 ns 424 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_stddev 15.2 ns 15.2 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_cv 3.56 % 3.56 % 10 -lstringa<512> str; ... str += str_var1 + str_var2;_mean 398 ns 398 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_median 384 ns 384 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_stddev 28.4 ns 28.4 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_cv 7.12 % 7.12 % 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_mean 301 ns 301 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_median 292 ns 292 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 20.7 ns 20.7 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_cv 6.87 % 6.87 % 10 +std::stringstream str; ... str << str_var1 << str_var2;_mean 1527 ns 1527 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_median 1532 ns 1532 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_stddev 35.2 ns 35.1 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_cv 2.30 % 2.30 % 4 +std::string str; ... str += str_var1 + str_var2;_mean 1467 ns 1467 ns 4 +std::string str; ... str += str_var1 + str_var2;_median 1444 ns 1444 ns 4 +std::string str; ... str += str_var1 + str_var2;_stddev 59.7 ns 59.7 ns 4 +std::string str; ... str += str_var1 + str_var2;_cv 4.07 % 4.07 % 4 +lstringa<16> str; ... str += str_var1 + str_var2;_mean 532 ns 532 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_median 533 ns 533 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_stddev 8.68 ns 8.68 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_cv 1.63 % 1.63 % 4 +lstringa<128> str; ... str += str_var1 + str_var2;_mean 466 ns 466 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_median 464 ns 464 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_stddev 9.92 ns 9.92 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_cv 2.13 % 2.13 % 4 +lstringa<512> str; ... str += str_var1 + str_var2;_mean 413 ns 413 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_median 416 ns 416 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_stddev 12.1 ns 12.1 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_cv 2.94 % 2.94 % 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_mean 314 ns 314 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_median 316 ns 316 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 10.5 ns 10.5 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_cv 3.34 % 3.34 % 4 -- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; str << "test = " << k << " times";_mean 3091 ns 3091 ns 10 -std::stringstream str; str << "test = " << k << " times";_median 3040 ns 3040 ns 10 -std::stringstream str; str << "test = " << k << " times";_stddev 215 ns 215 ns 10 -std::stringstream str; str << "test = " << k << " times";_cv 6.97 % 6.97 % 10 -std::string str = "test = " + std::to_string(k) + " times";_mean 470 ns 470 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_median 469 ns 469 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_stddev 6.64 ns 6.64 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_cv 1.41 % 1.41 % 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1391 ns 1391 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1382 ns 1382 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 36.8 ns 36.8 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.65 % 2.65 % 10 -std::string str = std::format("test = {} times", k);_mean 1166 ns 1166 ns 10 -std::string str = std::format("test = {} times", k);_median 1168 ns 1168 ns 10 -std::string str = std::format("test = {} times", k);_stddev 28.8 ns 28.8 ns 10 -std::string str = std::format("test = {} times", k);_cv 2.47 % 2.47 % 10 -lstringa<8> str; str.format("test = {} times", k);_mean 1381 ns 1381 ns 10 -lstringa<8> str; str.format("test = {} times", k);_median 1368 ns 1368 ns 10 -lstringa<8> str; str.format("test = {} times", k);_stddev 28.1 ns 28.1 ns 10 -lstringa<8> str; str.format("test = {} times", k);_cv 2.04 % 2.04 % 10 -lstringa<32> str; str.format("test = {} times", k);_mean 1111 ns 1111 ns 10 -lstringa<32> str; str.format("test = {} times", k);_median 1100 ns 1100 ns 10 -lstringa<32> str; str.format("test = {} times", k);_stddev 74.5 ns 74.5 ns 10 -lstringa<32> str; str.format("test = {} times", k);_cv 6.71 % 6.71 % 10 -lstringa<8> str = "test = " + k + " times";_mean 288 ns 288 ns 10 -lstringa<8> str = "test = " + k + " times";_median 291 ns 291 ns 10 -lstringa<8> str = "test = " + k + " times";_stddev 8.19 ns 8.19 ns 10 -lstringa<8> str = "test = " + k + " times";_cv 2.84 % 2.84 % 10 -lstringa<32> str = "test = " + k + " times";_mean 155 ns 155 ns 10 -lstringa<32> str = "test = " + k + " times";_median 154 ns 154 ns 10 -lstringa<32> str = "test = " + k + " times";_stddev 3.45 ns 3.45 ns 10 -lstringa<32> str = "test = " + k + " times";_cv 2.23 % 2.23 % 10 -stringa str = "test = " + k + " times";_mean 146 ns 146 ns 10 -stringa str = "test = " + k + " times";_median 146 ns 146 ns 10 -stringa str = "test = " + k + " times";_stddev 3.24 ns 3.24 ns 10 -stringa str = "test = " + k + " times";_cv 2.23 % 2.23 % 10 +std::stringstream str; str << "test = " << k << " times";_mean 3076 ns 3076 ns 4 +std::stringstream str; str << "test = " << k << " times";_median 3066 ns 3066 ns 4 +std::stringstream str; str << "test = " << k << " times";_stddev 98.4 ns 98.4 ns 4 +std::stringstream str; str << "test = " << k << " times";_cv 3.20 % 3.20 % 4 +std::string str = "test = " + std::to_string(k) + " times";_mean 494 ns 494 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_median 496 ns 496 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_stddev 11.5 ns 11.5 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_cv 2.33 % 2.33 % 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1421 ns 1421 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1426 ns 1426 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 29.9 ns 29.9 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.10 % 2.10 % 4 +std::string str = std::format("test = {} times", k);_mean 1118 ns 1118 ns 4 +std::string str = std::format("test = {} times", k);_median 1118 ns 1118 ns 4 +std::string str = std::format("test = {} times", k);_stddev 4.01 ns 4.01 ns 4 +std::string str = std::format("test = {} times", k);_cv 0.36 % 0.36 % 4 +lstringa<8> str; str.format("test = {} times", k);_mean 1374 ns 1374 ns 4 +lstringa<8> str; str.format("test = {} times", k);_median 1364 ns 1364 ns 4 +lstringa<8> str; str.format("test = {} times", k);_stddev 46.6 ns 46.6 ns 4 +lstringa<8> str; str.format("test = {} times", k);_cv 3.39 % 3.39 % 4 +lstringa<32> str; str.format("test = {} times", k);_mean 974 ns 974 ns 4 +lstringa<32> str; str.format("test = {} times", k);_median 981 ns 981 ns 4 +lstringa<32> str; str.format("test = {} times", k);_stddev 21.3 ns 21.3 ns 4 +lstringa<32> str; str.format("test = {} times", k);_cv 2.19 % 2.19 % 4 +lstringa<8> str = "test = " + k + " times";_mean 296 ns 296 ns 4 +lstringa<8> str = "test = " + k + " times";_median 296 ns 296 ns 4 +lstringa<8> str = "test = " + k + " times";_stddev 6.67 ns 6.67 ns 4 +lstringa<8> str = "test = " + k + " times";_cv 2.25 % 2.25 % 4 +lstringa<32> str = "test = " + k + " times";_mean 155 ns 155 ns 4 +lstringa<32> str = "test = " + k + " times";_median 154 ns 154 ns 4 +lstringa<32> str = "test = " + k + " times";_stddev 3.30 ns 3.30 ns 4 +lstringa<32> str = "test = " + k + " times";_cv 2.14 % 2.14 % 4 +stringa str = "test = " + k + " times";_mean 153 ns 153 ns 4 +stringa str = "test = " + k + " times";_median 154 ns 154 ns 4 +stringa str = "test = " + k + " times";_stddev 2.68 ns 2.68 ns 4 +stringa str = "test = " + k + " times";_cv 1.76 % 1.76 % 4 -- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find + substr + std::strtol_mean 271 ns 271 ns 10 -std::string::find + substr + std::strtol_median 268 ns 268 ns 10 -std::string::find + substr + std::strtol_stddev 13.3 ns 13.3 ns 10 -std::string::find + substr + std::strtol_cv 4.90 % 4.90 % 10 -ssa::splitter + ssa::as_int_mean 162 ns 162 ns 10 -ssa::splitter + ssa::as_int_median 161 ns 161 ns 10 -ssa::splitter + ssa::as_int_stddev 8.03 ns 8.03 ns 10 -ssa::splitter + ssa::as_int_cv 4.96 % 4.96 % 10 -ssa::splitf + functor_mean 212 ns 212 ns 10 -ssa::splitf + functor_median 207 ns 207 ns 10 -ssa::splitf + functor_stddev 13.9 ns 13.9 ns 10 -ssa::splitf + functor_cv 6.55 % 6.55 % 10 +std::string::find + substr + std::strtol_mean 281 ns 281 ns 4 +std::string::find + substr + std::strtol_median 280 ns 280 ns 4 +std::string::find + substr + std::strtol_stddev 8.26 ns 8.26 ns 4 +std::string::find + substr + std::strtol_cv 2.94 % 2.94 % 4 +ssa::splitter + ssa::as_int_mean 157 ns 157 ns 4 +ssa::splitter + ssa::as_int_median 155 ns 155 ns 4 +ssa::splitter + ssa::as_int_stddev 8.15 ns 8.15 ns 4 +ssa::splitter + ssa::as_int_cv 5.18 % 5.18 % 4 +ssa::splitf + functor_mean 215 ns 215 ns 4 +ssa::splitf + functor_median 214 ns 214 ns 4 +ssa::splitf + functor_stddev 4.23 ns 4.23 ns 4 +ssa::splitf + functor_cv 1.97 % 1.97 % 4 -- Replace symbols in text ~400 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Naive (and wrong) replace symbols with std::string find + replace_mean 882 ns 882 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_median 867 ns 867 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_stddev 54.5 ns 54.5 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_cv 6.18 % 6.18 % 10 -replace symbols with std::string find_first_of + replace_mean 2453 ns 2453 ns 10 -replace symbols with std::string find_first_of + replace_median 2406 ns 2406 ns 10 -replace symbols with std::string find_first_of + replace_stddev 108 ns 108 ns 10 -replace symbols with std::string find_first_of + replace_cv 4.42 % 4.42 % 10 -replace symbols with std::string_view find_first_of + copy_mean 1112 ns 1112 ns 10 -replace symbols with std::string_view find_first_of + copy_median 1108 ns 1108 ns 10 -replace symbols with std::string_view find_first_of + copy_stddev 34.9 ns 34.9 ns 10 -replace symbols with std::string_view find_first_of + copy_cv 3.14 % 3.14 % 10 -replace runtime symbols with string expressions and without remembering all search results_mean 1268 ns 1268 ns 10 -replace runtime symbols with string expressions and without remembering all search results_median 1267 ns 1267 ns 10 -replace runtime symbols with string expressions and without remembering all search results_stddev 28.8 ns 28.8 ns 10 -replace runtime symbols with string expressions and without remembering all search results_cv 2.27 % 2.27 % 10 -replace runtime symbols with simstr and memorization of all search results_mean 1058 ns 1058 ns 10 -replace runtime symbols with simstr and memorization of all search results_median 1055 ns 1055 ns 10 -replace runtime symbols with simstr and memorization of all search results_stddev 20.8 ns 20.8 ns 10 -replace runtime symbols with simstr and memorization of all search results_cv 1.97 % 1.97 % 10 -replace const symbols with string expressions and without remembering all search results_mean 1016 ns 1016 ns 10 -replace const symbols with string expressions and without remembering all search results_median 1016 ns 1016 ns 10 -replace const symbols with string expressions and without remembering all search results_stddev 17.7 ns 17.7 ns 10 -replace const symbols with string expressions and without remembering all search results_cv 1.74 % 1.74 % 10 -replace const symbols with string expressions and memorization of all search results_mean 906 ns 906 ns 10 -replace const symbols with string expressions and memorization of all search results_median 891 ns 891 ns 10 -replace const symbols with string expressions and memorization of all search results_stddev 40.5 ns 40.5 ns 10 -replace const symbols with string expressions and memorization of all search results_cv 4.47 % 4.47 % 10 +Naive (and wrong) replace symbols with std::string find + replace_mean 1000 ns 1000 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_median 982 ns 982 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_stddev 51.7 ns 51.7 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_cv 5.17 % 5.17 % 4 +replace symbols with std::string find_first_of + replace_mean 2679 ns 2679 ns 4 +replace symbols with std::string find_first_of + replace_median 2668 ns 2668 ns 4 +replace symbols with std::string find_first_of + replace_stddev 50.4 ns 50.4 ns 4 +replace symbols with std::string find_first_of + replace_cv 1.88 % 1.88 % 4 +replace symbols with std::string_view find_first_of + copy_mean 1109 ns 1109 ns 4 +replace symbols with std::string_view find_first_of + copy_median 1107 ns 1107 ns 4 +replace symbols with std::string_view find_first_of + copy_stddev 33.7 ns 33.7 ns 4 +replace symbols with std::string_view find_first_of + copy_cv 3.04 % 3.04 % 4 +replace runtime symbols with string expressions and without remembering all search results_mean 1267 ns 1267 ns 4 +replace runtime symbols with string expressions and without remembering all search results_median 1281 ns 1281 ns 4 +replace runtime symbols with string expressions and without remembering all search results_stddev 44.6 ns 44.6 ns 4 +replace runtime symbols with string expressions and without remembering all search results_cv 3.52 % 3.52 % 4 +replace runtime symbols with simstr and memorization of all search results_mean 1002 ns 1002 ns 4 +replace runtime symbols with simstr and memorization of all search results_median 1010 ns 1010 ns 4 +replace runtime symbols with simstr and memorization of all search results_stddev 21.0 ns 21.0 ns 4 +replace runtime symbols with simstr and memorization of all search results_cv 2.09 % 2.09 % 4 +replace const symbols with string expressions and without remembering all search results_mean 1150 ns 1150 ns 4 +replace const symbols with string expressions and without remembering all search results_median 1143 ns 1143 ns 4 +replace const symbols with string expressions and without remembering all search results_stddev 40.6 ns 40.6 ns 4 +replace const symbols with string expressions and without remembering all search results_cv 3.53 % 3.53 % 4 +replace const symbols with string expressions and memorization of all search results_mean 870 ns 870 ns 4 +replace const symbols with string expressions and memorization of all search results_median 870 ns 870 ns 4 +replace const symbols with string expressions and memorization of all search results_stddev 20.7 ns 20.7 ns 4 +replace const symbols with string expressions and memorization of all search results_cv 2.38 % 2.38 % 4 -- Replace symbols in text ~40 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Short Naive (and wrong) replace symbols with std::string find + replace_mean 165 ns 165 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_median 165 ns 165 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_stddev 3.15 ns 3.15 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_cv 1.91 % 1.91 % 10 -Short replace symbols with std::string find_first_of + replace_mean 317 ns 317 ns 10 -Short replace symbols with std::string find_first_of + replace_median 317 ns 317 ns 10 -Short replace symbols with std::string find_first_of + replace_stddev 7.44 ns 7.44 ns 10 -Short replace symbols with std::string find_first_of + replace_cv 2.35 % 2.35 % 10 -Short replace symbols with std::string_view find_first_of + copy_mean 164 ns 164 ns 10 -Short replace symbols with std::string_view find_first_of + copy_median 163 ns 163 ns 10 -Short replace symbols with std::string_view find_first_of + copy_stddev 2.79 ns 2.79 ns 10 -Short replace symbols with std::string_view find_first_of + copy_cv 1.70 % 1.70 % 10 -Short replace runtime symbols with string expressions and without remembering all search results_mean 174 ns 174 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_median 171 ns 171 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_stddev 7.29 ns 7.29 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_cv 4.20 % 4.20 % 10 -Short replace runtime symbols with simstr and memorization of all search results_mean 183 ns 183 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_median 182 ns 182 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_stddev 2.57 ns 2.57 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_cv 1.41 % 1.41 % 10 -Short replace const symbols with string expressions and without remembering all search results_mean 134 ns 134 ns 10 -Short replace const symbols with string expressions and without remembering all search results_median 132 ns 132 ns 10 -Short replace const symbols with string expressions and without remembering all search results_stddev 5.80 ns 5.80 ns 10 -Short replace const symbols with string expressions and without remembering all search results_cv 4.33 % 4.33 % 10 -Short replace const symbols with string expressions and memorization of all search results_mean 150 ns 150 ns 10 -Short replace const symbols with string expressions and memorization of all search results_median 150 ns 150 ns 10 -Short replace const symbols with string expressions and memorization of all search results_stddev 3.30 ns 3.30 ns 10 -Short replace const symbols with string expressions and memorization of all search results_cv 2.20 % 2.20 % 10 +Short Naive (and wrong) replace symbols with std::string find + replace_mean 172 ns 172 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_median 171 ns 171 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_stddev 4.80 ns 4.80 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.79 % 2.79 % 4 +Short replace symbols with std::string find_first_of + replace_mean 322 ns 322 ns 4 +Short replace symbols with std::string find_first_of + replace_median 330 ns 330 ns 4 +Short replace symbols with std::string find_first_of + replace_stddev 17.2 ns 17.2 ns 4 +Short replace symbols with std::string find_first_of + replace_cv 5.32 % 5.32 % 4 +Short replace symbols with std::string_view find_first_of + copy_mean 167 ns 167 ns 4 +Short replace symbols with std::string_view find_first_of + copy_median 166 ns 166 ns 4 +Short replace symbols with std::string_view find_first_of + copy_stddev 1.52 ns 1.52 ns 4 +Short replace symbols with std::string_view find_first_of + copy_cv 0.91 % 0.91 % 4 +Short replace runtime symbols with string expressions and without remembering all search results_mean 181 ns 181 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_median 180 ns 180 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_stddev 5.33 ns 5.33 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_cv 2.94 % 2.94 % 4 +Short replace runtime symbols with simstr and memorization of all search results_mean 185 ns 185 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_median 183 ns 183 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_stddev 4.78 ns 4.78 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_cv 2.59 % 2.59 % 4 +Short replace const symbols with string expressions and without remembering all search results_mean 144 ns 144 ns 4 +Short replace const symbols with string expressions and without remembering all search results_median 143 ns 143 ns 4 +Short replace const symbols with string expressions and without remembering all search results_stddev 2.68 ns 2.68 ns 4 +Short replace const symbols with string expressions and without remembering all search results_cv 1.85 % 1.85 % 4 +Short replace const symbols with string expressions and memorization of all search results_mean 143 ns 143 ns 4 +Short replace const symbols with string expressions and memorization of all search results_median 143 ns 143 ns 4 +Short replace const symbols with string expressions and memorization of all search results_stddev 0.641 ns 0.641 ns 4 +Short replace const symbols with string expressions and memorization of all search results_cv 0.45 % 0.45 % 4 ----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to ---- in std::string|64_mean 164 ns 164 ns 10 -replace bb to ---- in std::string|64_median 163 ns 163 ns 10 -replace bb to ---- in std::string|64_stddev 5.76 ns 5.76 ns 10 -replace bb to ---- in std::string|64_cv 3.52 % 3.52 % 10 -replace bb to ---- in std::string|256_mean 542 ns 542 ns 10 -replace bb to ---- in std::string|256_median 536 ns 536 ns 10 -replace bb to ---- in std::string|256_stddev 20.6 ns 20.6 ns 10 -replace bb to ---- in std::string|256_cv 3.80 % 3.80 % 10 -replace bb to ---- in std::string|512_mean 1016 ns 1016 ns 10 -replace bb to ---- in std::string|512_median 1017 ns 1017 ns 10 -replace bb to ---- in std::string|512_stddev 17.3 ns 17.3 ns 10 -replace bb to ---- in std::string|512_cv 1.70 % 1.70 % 10 -replace bb to ---- in std::string|1024_mean 2221 ns 2221 ns 10 -replace bb to ---- in std::string|1024_median 2213 ns 2213 ns 10 -replace bb to ---- in std::string|1024_stddev 56.0 ns 56.0 ns 10 -replace bb to ---- in std::string|1024_cv 2.52 % 2.52 % 10 -replace bb to ---- in std::string|2048_mean 6213 ns 6213 ns 10 -replace bb to ---- in std::string|2048_median 6322 ns 6322 ns 10 -replace bb to ---- in std::string|2048_stddev 498 ns 498 ns 10 -replace bb to ---- in std::string|2048_cv 8.02 % 8.02 % 10 -replace bb to ---- in lstringa<8>|64_mean 140 ns 140 ns 10 -replace bb to ---- in lstringa<8>|64_median 133 ns 133 ns 10 -replace bb to ---- in lstringa<8>|64_stddev 22.3 ns 22.3 ns 10 -replace bb to ---- in lstringa<8>|64_cv 15.91 % 15.91 % 10 -replace bb to ---- in lstringa<8>|256_mean 429 ns 429 ns 10 -replace bb to ---- in lstringa<8>|256_median 431 ns 431 ns 10 -replace bb to ---- in lstringa<8>|256_stddev 8.26 ns 8.26 ns 10 -replace bb to ---- in lstringa<8>|256_cv 1.92 % 1.92 % 10 -replace bb to ---- in lstringa<8>|512_mean 811 ns 811 ns 10 -replace bb to ---- in lstringa<8>|512_median 811 ns 811 ns 10 -replace bb to ---- in lstringa<8>|512_stddev 14.4 ns 14.4 ns 10 -replace bb to ---- in lstringa<8>|512_cv 1.77 % 1.77 % 10 -replace bb to ---- in lstringa<8>|1024_mean 1718 ns 1718 ns 10 -replace bb to ---- in lstringa<8>|1024_median 1692 ns 1692 ns 10 -replace bb to ---- in lstringa<8>|1024_stddev 57.5 ns 57.5 ns 10 -replace bb to ---- in lstringa<8>|1024_cv 3.35 % 3.35 % 10 -replace bb to ---- in lstringa<8>|2048_mean 3151 ns 3151 ns 10 -replace bb to ---- in lstringa<8>|2048_median 3145 ns 3145 ns 10 -replace bb to ---- in lstringa<8>|2048_stddev 73.6 ns 73.6 ns 10 -replace bb to ---- in lstringa<8>|2048_cv 2.34 % 2.34 % 10 -replace bb to ---- by init stringa|64_mean 95.8 ns 95.8 ns 10 -replace bb to ---- by init stringa|64_median 96.2 ns 96.2 ns 10 -replace bb to ---- by init stringa|64_stddev 3.25 ns 3.25 ns 10 -replace bb to ---- by init stringa|64_cv 3.39 % 3.39 % 10 -replace bb to ---- by init stringa|256_mean 303 ns 303 ns 10 -replace bb to ---- by init stringa|256_median 299 ns 299 ns 10 -replace bb to ---- by init stringa|256_stddev 12.9 ns 12.9 ns 10 -replace bb to ---- by init stringa|256_cv 4.24 % 4.24 % 10 -replace bb to ---- by init stringa|512_mean 731 ns 731 ns 10 -replace bb to ---- by init stringa|512_median 710 ns 710 ns 10 -replace bb to ---- by init stringa|512_stddev 52.1 ns 52.1 ns 10 -replace bb to ---- by init stringa|512_cv 7.12 % 7.12 % 10 -replace bb to ---- by init stringa|1024_mean 1576 ns 1576 ns 10 -replace bb to ---- by init stringa|1024_median 1567 ns 1567 ns 10 -replace bb to ---- by init stringa|1024_stddev 72.3 ns 72.3 ns 10 -replace bb to ---- by init stringa|1024_cv 4.59 % 4.59 % 10 -replace bb to ---- by init stringa|2048_mean 3037 ns 3037 ns 10 -replace bb to ---- by init stringa|2048_median 3040 ns 3040 ns 10 -replace bb to ---- by init stringa|2048_stddev 36.2 ns 36.2 ns 10 -replace bb to ---- by init stringa|2048_cv 1.19 % 1.19 % 10 +replace bb to ---- in std::string|64_mean 156 ns 156 ns 4 +replace bb to ---- in std::string|64_median 155 ns 155 ns 4 +replace bb to ---- in std::string|64_stddev 2.62 ns 2.62 ns 4 +replace bb to ---- in std::string|64_cv 1.68 % 1.68 % 4 +replace bb to ---- in std::string|256_mean 525 ns 525 ns 4 +replace bb to ---- in std::string|256_median 524 ns 524 ns 4 +replace bb to ---- in std::string|256_stddev 11.1 ns 11.1 ns 4 +replace bb to ---- in std::string|256_cv 2.11 % 2.11 % 4 +replace bb to ---- in std::string|512_mean 1042 ns 1042 ns 4 +replace bb to ---- in std::string|512_median 1042 ns 1042 ns 4 +replace bb to ---- in std::string|512_stddev 5.69 ns 5.69 ns 4 +replace bb to ---- in std::string|512_cv 0.55 % 0.55 % 4 +replace bb to ---- in std::string|1024_mean 2418 ns 2418 ns 4 +replace bb to ---- in std::string|1024_median 2373 ns 2373 ns 4 +replace bb to ---- in std::string|1024_stddev 174 ns 174 ns 4 +replace bb to ---- in std::string|1024_cv 7.18 % 7.18 % 4 +replace bb to ---- in std::string|2048_mean 5883 ns 5883 ns 4 +replace bb to ---- in std::string|2048_median 5916 ns 5916 ns 4 +replace bb to ---- in std::string|2048_stddev 106 ns 106 ns 4 +replace bb to ---- in std::string|2048_cv 1.79 % 1.79 % 4 +replace bb to ---- in lstringa<8>|64_mean 144 ns 144 ns 4 +replace bb to ---- in lstringa<8>|64_median 141 ns 141 ns 4 +replace bb to ---- in lstringa<8>|64_stddev 9.16 ns 9.16 ns 4 +replace bb to ---- in lstringa<8>|64_cv 6.38 % 6.38 % 4 +replace bb to ---- in lstringa<8>|256_mean 529 ns 529 ns 4 +replace bb to ---- in lstringa<8>|256_median 528 ns 528 ns 4 +replace bb to ---- in lstringa<8>|256_stddev 49.3 ns 49.3 ns 4 +replace bb to ---- in lstringa<8>|256_cv 9.32 % 9.32 % 4 +replace bb to ---- in lstringa<8>|512_mean 880 ns 880 ns 4 +replace bb to ---- in lstringa<8>|512_median 883 ns 883 ns 4 +replace bb to ---- in lstringa<8>|512_stddev 97.4 ns 97.4 ns 4 +replace bb to ---- in lstringa<8>|512_cv 11.07 % 11.07 % 4 +replace bb to ---- in lstringa<8>|1024_mean 1805 ns 1805 ns 4 +replace bb to ---- in lstringa<8>|1024_median 1790 ns 1790 ns 4 +replace bb to ---- in lstringa<8>|1024_stddev 54.4 ns 54.4 ns 4 +replace bb to ---- in lstringa<8>|1024_cv 3.01 % 3.01 % 4 +replace bb to ---- in lstringa<8>|2048_mean 3265 ns 3265 ns 4 +replace bb to ---- in lstringa<8>|2048_median 3245 ns 3245 ns 4 +replace bb to ---- in lstringa<8>|2048_stddev 76.3 ns 76.3 ns 4 +replace bb to ---- in lstringa<8>|2048_cv 2.34 % 2.34 % 4 +replace bb to ---- by init stringa|64_mean 107 ns 107 ns 4 +replace bb to ---- by init stringa|64_median 107 ns 107 ns 4 +replace bb to ---- by init stringa|64_stddev 2.42 ns 2.42 ns 4 +replace bb to ---- by init stringa|64_cv 2.25 % 2.25 % 4 +replace bb to ---- by init stringa|256_mean 313 ns 313 ns 4 +replace bb to ---- by init stringa|256_median 310 ns 310 ns 4 +replace bb to ---- by init stringa|256_stddev 10.2 ns 10.2 ns 4 +replace bb to ---- by init stringa|256_cv 3.27 % 3.27 % 4 +replace bb to ---- by init stringa|512_mean 751 ns 751 ns 4 +replace bb to ---- by init stringa|512_median 757 ns 757 ns 4 +replace bb to ---- by init stringa|512_stddev 28.0 ns 28.0 ns 4 +replace bb to ---- by init stringa|512_cv 3.72 % 3.72 % 4 +replace bb to ---- by init stringa|1024_mean 1657 ns 1657 ns 4 +replace bb to ---- by init stringa|1024_median 1620 ns 1620 ns 4 +replace bb to ---- by init stringa|1024_stddev 105 ns 105 ns 4 +replace bb to ---- by init stringa|1024_cv 6.36 % 6.36 % 4 +replace bb to ---- by init stringa|2048_mean 3126 ns 3126 ns 4 +replace bb to ---- by init stringa|2048_median 3128 ns 3128 ns 4 +replace bb to ---- by init stringa|2048_stddev 28.8 ns 28.8 ns 4 +replace bb to ---- by init stringa|2048_cv 0.92 % 0.92 % 4 ----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to -- in std::string|64_mean 117 ns 117 ns 10 -replace bb to -- in std::string|64_median 118 ns 118 ns 10 -replace bb to -- in std::string|64_stddev 2.07 ns 2.07 ns 10 -replace bb to -- in std::string|64_cv 1.76 % 1.76 % 10 -replace bb to -- in std::string|256_mean 397 ns 397 ns 10 -replace bb to -- in std::string|256_median 394 ns 394 ns 10 -replace bb to -- in std::string|256_stddev 11.8 ns 11.8 ns 10 -replace bb to -- in std::string|256_cv 2.97 % 2.97 % 10 -replace bb to -- in std::string|512_mean 765 ns 765 ns 10 -replace bb to -- in std::string|512_median 749 ns 749 ns 10 -replace bb to -- in std::string|512_stddev 42.8 ns 42.8 ns 10 -replace bb to -- in std::string|512_cv 5.60 % 5.60 % 10 -replace bb to -- in std::string|1024_mean 1439 ns 1439 ns 10 -replace bb to -- in std::string|1024_median 1431 ns 1431 ns 10 -replace bb to -- in std::string|1024_stddev 25.0 ns 25.0 ns 10 -replace bb to -- in std::string|1024_cv 1.74 % 1.74 % 10 -replace bb to -- in std::string|2048_mean 2951 ns 2951 ns 10 -replace bb to -- in std::string|2048_median 2922 ns 2922 ns 10 -replace bb to -- in std::string|2048_stddev 128 ns 128 ns 10 -replace bb to -- in std::string|2048_cv 4.33 % 4.33 % 10 -replace bb to -- in lstringa<8>|64_mean 105 ns 105 ns 10 -replace bb to -- in lstringa<8>|64_median 102 ns 102 ns 10 -replace bb to -- in lstringa<8>|64_stddev 9.58 ns 9.58 ns 10 -replace bb to -- in lstringa<8>|64_cv 9.15 % 9.15 % 10 -replace bb to -- in lstringa<8>|256_mean 286 ns 286 ns 10 -replace bb to -- in lstringa<8>|256_median 285 ns 285 ns 10 -replace bb to -- in lstringa<8>|256_stddev 5.91 ns 5.91 ns 10 -replace bb to -- in lstringa<8>|256_cv 2.06 % 2.06 % 10 -replace bb to -- in lstringa<8>|512_mean 537 ns 537 ns 10 -replace bb to -- in lstringa<8>|512_median 537 ns 537 ns 10 -replace bb to -- in lstringa<8>|512_stddev 5.05 ns 5.05 ns 10 -replace bb to -- in lstringa<8>|512_cv 0.94 % 0.94 % 10 -replace bb to -- in lstringa<8>|1024_mean 1098 ns 1098 ns 10 -replace bb to -- in lstringa<8>|1024_median 1095 ns 1095 ns 10 -replace bb to -- in lstringa<8>|1024_stddev 19.3 ns 19.3 ns 10 -replace bb to -- in lstringa<8>|1024_cv 1.76 % 1.76 % 10 -replace bb to -- in lstringa<8>|2048_mean 2289 ns 2289 ns 10 -replace bb to -- in lstringa<8>|2048_median 2325 ns 2325 ns 10 -replace bb to -- in lstringa<8>|2048_stddev 170 ns 170 ns 10 -replace bb to -- in lstringa<8>|2048_cv 7.40 % 7.40 % 10 -replace bb to -- by init stringa|64_mean 84.6 ns 84.6 ns 10 -replace bb to -- by init stringa|64_median 84.3 ns 84.3 ns 10 -replace bb to -- by init stringa|64_stddev 2.02 ns 2.02 ns 10 -replace bb to -- by init stringa|64_cv 2.39 % 2.39 % 10 -replace bb to -- by init stringa|256_mean 246 ns 246 ns 10 -replace bb to -- by init stringa|256_median 243 ns 243 ns 10 -replace bb to -- by init stringa|256_stddev 11.1 ns 11.1 ns 10 -replace bb to -- by init stringa|256_cv 4.51 % 4.51 % 10 -replace bb to -- by init stringa|512_mean 442 ns 442 ns 10 -replace bb to -- by init stringa|512_median 442 ns 442 ns 10 -replace bb to -- by init stringa|512_stddev 9.69 ns 9.69 ns 10 -replace bb to -- by init stringa|512_cv 2.19 % 2.19 % 10 -replace bb to -- by init stringa|1024_mean 910 ns 910 ns 10 -replace bb to -- by init stringa|1024_median 900 ns 900 ns 10 -replace bb to -- by init stringa|1024_stddev 32.9 ns 32.9 ns 10 -replace bb to -- by init stringa|1024_cv 3.61 % 3.61 % 10 -replace bb to -- by init stringa|2048_mean 1788 ns 1788 ns 10 -replace bb to -- by init stringa|2048_median 1763 ns 1763 ns 10 -replace bb to -- by init stringa|2048_stddev 120 ns 120 ns 10 -replace bb to -- by init stringa|2048_cv 6.73 % 6.73 % 10 +replace bb to -- in std::string|64_mean 120 ns 120 ns 4 +replace bb to -- in std::string|64_median 119 ns 119 ns 4 +replace bb to -- in std::string|64_stddev 7.11 ns 7.11 ns 4 +replace bb to -- in std::string|64_cv 5.91 % 5.91 % 4 +replace bb to -- in std::string|256_mean 404 ns 404 ns 4 +replace bb to -- in std::string|256_median 403 ns 403 ns 4 +replace bb to -- in std::string|256_stddev 11.8 ns 11.8 ns 4 +replace bb to -- in std::string|256_cv 2.91 % 2.91 % 4 +replace bb to -- in std::string|512_mean 761 ns 761 ns 4 +replace bb to -- in std::string|512_median 761 ns 761 ns 4 +replace bb to -- in std::string|512_stddev 7.59 ns 7.59 ns 4 +replace bb to -- in std::string|512_cv 1.00 % 1.00 % 4 +replace bb to -- in std::string|1024_mean 1606 ns 1606 ns 4 +replace bb to -- in std::string|1024_median 1588 ns 1588 ns 4 +replace bb to -- in std::string|1024_stddev 50.1 ns 50.1 ns 4 +replace bb to -- in std::string|1024_cv 3.12 % 3.12 % 4 +replace bb to -- in std::string|2048_mean 3280 ns 3280 ns 4 +replace bb to -- in std::string|2048_median 3170 ns 3170 ns 4 +replace bb to -- in std::string|2048_stddev 360 ns 360 ns 4 +replace bb to -- in std::string|2048_cv 10.99 % 10.99 % 4 +replace bb to -- in lstringa<8>|64_mean 104 ns 104 ns 4 +replace bb to -- in lstringa<8>|64_median 105 ns 105 ns 4 +replace bb to -- in lstringa<8>|64_stddev 2.19 ns 2.19 ns 4 +replace bb to -- in lstringa<8>|64_cv 2.10 % 2.10 % 4 +replace bb to -- in lstringa<8>|256_mean 312 ns 312 ns 4 +replace bb to -- in lstringa<8>|256_median 312 ns 312 ns 4 +replace bb to -- in lstringa<8>|256_stddev 4.57 ns 4.57 ns 4 +replace bb to -- in lstringa<8>|256_cv 1.46 % 1.46 % 4 +replace bb to -- in lstringa<8>|512_mean 591 ns 591 ns 4 +replace bb to -- in lstringa<8>|512_median 590 ns 590 ns 4 +replace bb to -- in lstringa<8>|512_stddev 13.8 ns 13.8 ns 4 +replace bb to -- in lstringa<8>|512_cv 2.33 % 2.33 % 4 +replace bb to -- in lstringa<8>|1024_mean 1139 ns 1139 ns 4 +replace bb to -- in lstringa<8>|1024_median 1142 ns 1142 ns 4 +replace bb to -- in lstringa<8>|1024_stddev 54.0 ns 54.0 ns 4 +replace bb to -- in lstringa<8>|1024_cv 4.75 % 4.75 % 4 +replace bb to -- in lstringa<8>|2048_mean 2679 ns 2679 ns 4 +replace bb to -- in lstringa<8>|2048_median 2623 ns 2623 ns 4 +replace bb to -- in lstringa<8>|2048_stddev 185 ns 185 ns 4 +replace bb to -- in lstringa<8>|2048_cv 6.92 % 6.92 % 4 +replace bb to -- by init stringa|64_mean 91.0 ns 91.0 ns 4 +replace bb to -- by init stringa|64_median 88.0 ns 88.0 ns 4 +replace bb to -- by init stringa|64_stddev 7.52 ns 7.52 ns 4 +replace bb to -- by init stringa|64_cv 8.26 % 8.26 % 4 +replace bb to -- by init stringa|256_mean 242 ns 242 ns 4 +replace bb to -- by init stringa|256_median 237 ns 237 ns 4 +replace bb to -- by init stringa|256_stddev 10.3 ns 10.3 ns 4 +replace bb to -- by init stringa|256_cv 4.25 % 4.25 % 4 +replace bb to -- by init stringa|512_mean 431 ns 431 ns 4 +replace bb to -- by init stringa|512_median 431 ns 431 ns 4 +replace bb to -- by init stringa|512_stddev 6.57 ns 6.57 ns 4 +replace bb to -- by init stringa|512_cv 1.52 % 1.52 % 4 +replace bb to -- by init stringa|1024_mean 914 ns 914 ns 4 +replace bb to -- by init stringa|1024_median 922 ns 922 ns 4 +replace bb to -- by init stringa|1024_stddev 26.2 ns 26.2 ns 4 +replace bb to -- by init stringa|1024_cv 2.87 % 2.87 % 4 +replace bb to -- by init stringa|2048_mean 1647 ns 1647 ns 4 +replace bb to -- by init stringa|2048_median 1640 ns 1640 ns 4 +replace bb to -- by init stringa|2048_stddev 14.5 ns 14.5 ns 4 +replace bb to -- by init stringa|2048_cv 0.88 % 0.88 % 4 ----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -hashStrMapA emplace & find stringa;_mean 3707397 ns 3707403 ns 10 -hashStrMapA emplace & find stringa;_median 3683953 ns 3683963 ns 10 -hashStrMapA emplace & find stringa;_stddev 86427 ns 86424 ns 10 -hashStrMapA emplace & find stringa;_cv 2.33 % 2.33 % 10 -std::unordered_map emplace & find std::string;_mean 3464746 ns 3464760 ns 10 -std::unordered_map emplace & find std::string;_median 3473680 ns 3473696 ns 10 -std::unordered_map emplace & find std::string;_stddev 56329 ns 56328 ns 10 -std::unordered_map emplace & find std::string;_cv 1.63 % 1.63 % 10 -hashStrMapA emplace & find ssa;_mean 3561410 ns 3561424 ns 10 -hashStrMapA emplace & find ssa;_median 3563255 ns 3563267 ns 10 -hashStrMapA emplace & find ssa;_stddev 48058 ns 48060 ns 10 -hashStrMapA emplace & find ssa;_cv 1.35 % 1.35 % 10 -std::unordered_map emplace & find std::string_view;_mean 4072390 ns 4072404 ns 10 -std::unordered_map emplace & find std::string_view;_median 4047024 ns 4047039 ns 10 -std::unordered_map emplace & find std::string_view;_stddev 100400 ns 100400 ns 10 -std::unordered_map emplace & find std::string_view;_cv 2.47 % 2.47 % 10 +hashStrMapA emplace & find stringa;_mean 3546428 ns 3546439 ns 4 +hashStrMapA emplace & find stringa;_median 3546580 ns 3546589 ns 4 +hashStrMapA emplace & find stringa;_stddev 43528 ns 43526 ns 4 +hashStrMapA emplace & find stringa;_cv 1.23 % 1.23 % 4 +std::unordered_map emplace & find std::string;_mean 3486975 ns 3486985 ns 4 +std::unordered_map emplace & find std::string;_median 3486065 ns 3486073 ns 4 +std::unordered_map emplace & find std::string;_stddev 24031 ns 24029 ns 4 +std::unordered_map emplace & find std::string;_cv 0.69 % 0.69 % 4 +hashStrMapA emplace & find ssa;_mean 3592544 ns 3592555 ns 4 +hashStrMapA emplace & find ssa;_median 3606299 ns 3606309 ns 4 +hashStrMapA emplace & find ssa;_stddev 69390 ns 69388 ns 4 +hashStrMapA emplace & find ssa;_cv 1.93 % 1.93 % 4 +std::unordered_map emplace & find std::string_view;_mean 3988653 ns 3988647 ns 4 +std::unordered_map emplace & find std::string_view;_median 3992327 ns 3992299 ns 4 +std::unordered_map emplace & find std::string_view;_stddev 57485 ns 57473 ns 4 +std::unordered_map emplace & find std::string_view;_cv 1.44 % 1.44 % 4 ----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Build func full name std::string;_mean 719 ns 719 ns 10 -Build func full name std::string;_median 711 ns 711 ns 10 -Build func full name std::string;_stddev 23.0 ns 23.0 ns 10 -Build func full name std::string;_cv 3.20 % 3.20 % 10 -Build func full name std::string 1;_mean 808 ns 808 ns 10 -Build func full name std::string 1;_median 808 ns 808 ns 10 -Build func full name std::string 1;_stddev 16.9 ns 16.9 ns 10 -Build func full name std::string 1;_cv 2.10 % 2.10 % 10 -Build func full name std::stream;_mean 2560 ns 2560 ns 10 -Build func full name std::stream;_median 2540 ns 2540 ns 10 -Build func full name std::stream;_stddev 64.5 ns 64.5 ns 10 -Build func full name std::stream;_cv 2.52 % 2.52 % 10 -Build func full name stringa;_mean 532 ns 532 ns 10 -Build func full name stringa;_median 529 ns 529 ns 10 -Build func full name stringa;_stddev 31.7 ns 31.7 ns 10 -Build func full name stringa;_cv 5.96 % 5.96 % 10 -Build func full name stringa 1;_mean 669 ns 669 ns 10 -Build func full name stringa 1;_median 645 ns 645 ns 10 -Build func full name stringa 1;_stddev 49.9 ns 49.9 ns 10 -Build func full name stringa 1;_cv 7.46 % 7.46 % 10 +Build func full name std::string;_mean 697 ns 697 ns 4 +Build func full name std::string;_median 693 ns 693 ns 4 +Build func full name std::string;_stddev 11.6 ns 11.6 ns 4 +Build func full name std::string;_cv 1.66 % 1.66 % 4 +Build func full name std::string 1;_mean 803 ns 803 ns 4 +Build func full name std::string 1;_median 807 ns 807 ns 4 +Build func full name std::string 1;_stddev 17.5 ns 17.5 ns 4 +Build func full name std::string 1;_cv 2.18 % 2.18 % 4 +Build func full name std::stream;_mean 2540 ns 2540 ns 4 +Build func full name std::stream;_median 2513 ns 2513 ns 4 +Build func full name std::stream;_stddev 72.6 ns 72.5 ns 4 +Build func full name std::stream;_cv 2.86 % 2.86 % 4 +Build func full name stringa;_mean 507 ns 507 ns 4 +Build func full name stringa;_median 506 ns 506 ns 4 +Build func full name stringa;_stddev 27.8 ns 27.8 ns 4 +Build func full name stringa;_cv 5.48 % 5.48 % 4 +Build func full name stringa 1;_mean 655 ns 655 ns 4 +Build func full name stringa 1;_median 657 ns 657 ns 4 +Build func full name stringa 1;_stddev 8.18 ns 8.18 ns 4 +Build func full name stringa 1;_cv 1.25 % 1.25 % 4 diff --git a/bench/results/001-Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13.txt b/bench/results/001-Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13.txt index c236ab9..24eebc9 100644 --- a/bench/results/001-Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13.txt +++ b/bench/results/001-Xeon E5-2682 v4, Ubuntu 22 (WSL), GCC-13.txt @@ -1,4 +1,8 @@ -2026-01-31T15:51:52+03:00 +Benchmarks of simstr, version 1.6.3 +Sources: https://github.com/orefkov/simstr +Results: https://orefkov.github.io/simstr/results.html + +2026-02-03T17:15:10+03:00 Running ./benchStr Run on (32 X 2494.22 MHz CPU s) CPU Caches: @@ -6,897 +10,914 @@ CPU Caches: L1 Instruction 32 KiB (x16) L2 Unified 256 KiB (x16) L3 Unified 40960 KiB (x1) -Load Average: 0.05, 0.01, 0.00 +Load Average: 0.24, 0.68, 0.48 ***WARNING*** ASLR is enabled, the results may have unreproducible noise in them. -------------------------------------------------------------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------------------------------------------------------------------------------------------- ----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and number by std to std::string_mean 199 ns 199 ns 10 -Concat std::string and number by std to std::string_median 198 ns 198 ns 10 -Concat std::string and number by std to std::string_stddev 4.25 ns 4.25 ns 10 -Concat std::string and number by std to std::string_cv 2.13 % 2.13 % 10 -Concat std::string and number by StrExpr to std::string_mean 94.7 ns 94.7 ns 10 -Concat std::string and number by StrExpr to std::string_median 94.1 ns 94.1 ns 10 -Concat std::string and number by StrExpr to std::string_stddev 2.48 ns 2.47 ns 10 -Concat std::string and number by StrExpr to std::string_cv 2.61 % 2.61 % 10 -Concat stringa and number by StrExpr to simstr::stringa_mean 71.6 ns 71.6 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_median 70.3 ns 70.3 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_stddev 3.32 ns 3.32 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_cv 4.63 % 4.63 % 10 -Concat stringa and number by e_concat to simstr::stringa_mean 75.7 ns 75.7 ns 10 -Concat stringa and number by e_concat to simstr::stringa_median 75.9 ns 75.9 ns 10 -Concat stringa and number by e_concat to simstr::stringa_stddev 1.50 ns 1.50 ns 10 -Concat stringa and number by e_concat to simstr::stringa_cv 1.98 % 1.98 % 10 +Concat std::string and number by std to std::string_mean 211 ns 211 ns 4 +Concat std::string and number by std to std::string_median 211 ns 211 ns 4 +Concat std::string and number by std to std::string_stddev 5.41 ns 5.41 ns 4 +Concat std::string and number by std to std::string_cv 2.56 % 2.56 % 4 +Concat std::string and number by StrExpr to std::string_mean 111 ns 111 ns 4 +Concat std::string and number by StrExpr to std::string_median 110 ns 110 ns 4 +Concat std::string and number by StrExpr to std::string_stddev 5.87 ns 5.87 ns 4 +Concat std::string and number by StrExpr to std::string_cv 5.29 % 5.29 % 4 +Concat stringa and number by StrExpr to simstr::stringa_mean 72.6 ns 72.6 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_median 72.8 ns 72.8 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_stddev 0.961 ns 0.961 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_cv 1.33 % 1.33 % 4 +Concat stringa and number by e_concat to simstr::stringa_mean 79.0 ns 79.0 ns 4 +Concat stringa and number by e_concat to simstr::stringa_median 78.6 ns 78.6 ns 4 +Concat stringa and number by e_concat to simstr::stringa_stddev 2.56 ns 2.56 ns 4 +Concat stringa and number by e_concat to simstr::stringa_cv 3.24 % 3.24 % 4 ----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and format hex number and literal to std::string_mean 643 ns 643 ns 10 -Concat std::string and format hex number and literal to std::string_median 640 ns 640 ns 10 -Concat std::string and format hex number and literal to std::string_stddev 25.1 ns 25.1 ns 10 -Concat std::string and format hex number and literal to std::string_cv 3.90 % 3.90 % 10 -std::format std::string and hex number by literal to std::string_mean 926 ns 926 ns 10 -std::format std::string and hex number by literal to std::string_median 900 ns 900 ns 10 -std::format std::string and hex number by literal to std::string_stddev 75.2 ns 75.2 ns 10 -std::format std::string and hex number by literal to std::string_cv 8.12 % 8.12 % 10 -Concat std::string and std::tochars and string to std::string_mean 175 ns 175 ns 10 -Concat std::string and std::tochars and string to std::string_median 175 ns 175 ns 10 -Concat std::string and std::tochars and string to std::string_stddev 1.43 ns 1.43 ns 10 -Concat std::string and std::tochars and string to std::string_cv 0.82 % 0.82 % 10 -Concat std::string and hex number and literal by StrExpr to std::string_mean 122 ns 122 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_median 122 ns 122 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_stddev 1.29 ns 1.29 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_cv 1.06 % 1.06 % 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 120 ns 120 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 120 ns 120 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 1.75 ns 1.75 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 1.46 % 1.46 % 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 127 ns 127 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_median 126 ns 126 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 3.36 ns 3.36 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 2.66 % 2.66 % 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_mean 181 ns 181 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_median 180 ns 180 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 17.2 ns 17.2 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_cv 9.54 % 9.54 % 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 279 ns 279 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 278 ns 278 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 4.71 ns 4.71 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.69 % 1.69 % 10 +Concat std::string and format hex number and literal to std::string_mean 653 ns 653 ns 4 +Concat std::string and format hex number and literal to std::string_median 643 ns 643 ns 4 +Concat std::string and format hex number and literal to std::string_stddev 33.4 ns 33.4 ns 4 +Concat std::string and format hex number and literal to std::string_cv 5.12 % 5.12 % 4 +std::format std::string and hex number by literal to std::string_mean 960 ns 960 ns 4 +std::format std::string and hex number by literal to std::string_median 952 ns 952 ns 4 +std::format std::string and hex number by literal to std::string_stddev 34.6 ns 34.6 ns 4 +std::format std::string and hex number by literal to std::string_cv 3.60 % 3.60 % 4 +Concat std::string and std::to_chars and string to std::string_mean 197 ns 197 ns 4 +Concat std::string and std::to_chars and string to std::string_median 196 ns 196 ns 4 +Concat std::string and std::to_chars and string to std::string_stddev 4.79 ns 4.79 ns 4 +Concat std::string and std::to_chars and string to std::string_cv 2.43 % 2.43 % 4 +Concat std::string and hex number and literal by StrExpr to std::string_mean 127 ns 127 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_median 126 ns 126 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_stddev 2.52 ns 2.52 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_cv 1.99 % 1.99 % 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 124 ns 124 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 123 ns 123 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 3.73 ns 3.73 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 3.02 % 3.02 % 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 134 ns 134 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_median 132 ns 132 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 5.89 ns 5.89 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 4.39 % 4.39 % 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_mean 173 ns 173 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_median 176 ns 176 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 8.74 ns 8.74 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_cv 5.04 % 5.04 % 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 284 ns 284 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 282 ns 282 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 8.50 ns 8.50 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 2.99 % 2.99 % 4 +----- format/vformat and subst/vsubst octal number ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_mean 145 ns 145 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_median 146 ns 146 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_stddev 6.56 ns 6.56 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_cv 4.53 % 4.53 % 4 +std::format("art {:#010o} end", i)_mean 1261 ns 1261 ns 4 +std::format("art {:#010o} end", i)_median 1253 ns 1253 ns 4 +std::format("art {:#010o} end", i)_stddev 88.7 ns 88.7 ns 4 +std::format("art {:#010o} end", i)_cv 7.04 % 7.04 % 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_mean 341 ns 341 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_median 340 ns 340 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_stddev 4.03 ns 4.03 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_cv 1.18 % 1.18 % 4 +std::vformat(pattern, std::make_format_args(i))_mean 1132 ns 1132 ns 4 +std::vformat(pattern, std::make_format_args(i))_median 1095 ns 1095 ns 4 +std::vformat(pattern, std::make_format_args(i))_stddev 91.3 ns 91.3 ns 4 +std::vformat(pattern, std::make_format_args(i))_cv 8.07 % 8.07 % 4 ----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string by std to std::string_mean 49.6 ns 49.6 ns 10 -Concat std::string by std to std::string_median 49.8 ns 49.8 ns 10 -Concat std::string by std to std::string_stddev 0.626 ns 0.626 ns 10 -Concat std::string by std to std::string_cv 1.26 % 1.26 % 10 -Concat std::string by StrExpr to std::string_mean 29.5 ns 29.5 ns 10 -Concat std::string by StrExpr to std::string_median 29.6 ns 29.6 ns 10 -Concat std::string by StrExpr to std::string_stddev 0.655 ns 0.655 ns 10 -Concat std::string by StrExpr to std::string_cv 2.22 % 2.22 % 10 -Concat stringa by StrExpr to stringa_mean 28.0 ns 28.0 ns 10 -Concat stringa by StrExpr to stringa_median 27.4 ns 27.4 ns 10 -Concat stringa by StrExpr to stringa_stddev 1.84 ns 1.84 ns 10 -Concat stringa by StrExpr to stringa_cv 6.55 % 6.55 % 10 +Concat std::string by std to std::string_mean 52.0 ns 52.0 ns 4 +Concat std::string by std to std::string_median 51.1 ns 51.1 ns 4 +Concat std::string by std to std::string_stddev 3.18 ns 3.18 ns 4 +Concat std::string by std to std::string_cv 6.11 % 6.11 % 4 +Concat std::string by StrExpr to std::string_mean 35.8 ns 35.8 ns 4 +Concat std::string by StrExpr to std::string_median 35.8 ns 35.8 ns 4 +Concat std::string by StrExpr to std::string_stddev 0.676 ns 0.676 ns 4 +Concat std::string by StrExpr to std::string_cv 1.89 % 1.89 % 4 +Concat stringa by StrExpr to stringa_mean 27.7 ns 27.7 ns 4 +Concat stringa by StrExpr to stringa_median 27.8 ns 27.8 ns 4 +Concat stringa by StrExpr to stringa_stddev 0.709 ns 0.709 ns 4 +Concat stringa by StrExpr to stringa_cv 2.56 % 2.56 % 4 ----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Find concat three std::string_mean 138 ns 138 ns 10 -Find concat three std::string_median 133 ns 133 ns 10 -Find concat three std::string_stddev 16.7 ns 16.7 ns 10 -Find concat three std::string_cv 12.11 % 12.11 % 10 -Find concat three strexpr_mean 41.0 ns 41.0 ns 10 -Find concat three strexpr_median 40.9 ns 40.9 ns 10 -Find concat three strexpr_stddev 1.02 ns 1.02 ns 10 -Find concat three strexpr_cv 2.50 % 2.50 % 10 -Find concat three simstr_mean 19.8 ns 19.8 ns 10 -Find concat three simstr_median 19.8 ns 19.8 ns 10 -Find concat three simstr_stddev 0.278 ns 0.278 ns 10 -Find concat three simstr_cv 1.40 % 1.40 % 10 +Find concat three std::string_mean 129 ns 129 ns 4 +Find concat three std::string_median 129 ns 129 ns 4 +Find concat three std::string_stddev 4.04 ns 4.04 ns 4 +Find concat three std::string_cv 3.12 % 3.12 % 4 +Find concat three strexpr_mean 54.9 ns 54.9 ns 4 +Find concat three strexpr_median 54.6 ns 54.6 ns 4 +Find concat three strexpr_stddev 0.979 ns 0.979 ns 4 +Find concat three strexpr_cv 1.78 % 1.78 % 4 +Find concat three simstr_mean 33.1 ns 33.1 ns 4 +Find concat three simstr_median 33.3 ns 33.3 ns 4 +Find concat three simstr_stddev 0.512 ns 0.512 ns 4 +Find concat three simstr_cv 1.55 % 1.55 % 4 ----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -BuildTypeNameStr 0/0_mean 12.1 ns 12.1 ns 10 -BuildTypeNameStr 0/0_median 11.6 ns 11.6 ns 10 -BuildTypeNameStr 0/0_stddev 1.43 ns 1.43 ns 10 -BuildTypeNameStr 0/0_cv 11.83 % 11.83 % 10 -BuildTypeNameExp 0/0_mean 6.35 ns 6.35 ns 10 -BuildTypeNameExp 0/0_median 6.34 ns 6.34 ns 10 -BuildTypeNameExp 0/0_stddev 0.074 ns 0.074 ns 10 -BuildTypeNameExp 0/0_cv 1.17 % 1.17 % 10 -BuildTypeNameSim 0/0_mean 5.22 ns 5.22 ns 10 -BuildTypeNameSim 0/0_median 5.16 ns 5.16 ns 10 -BuildTypeNameSim 0/0_stddev 0.216 ns 0.216 ns 10 -BuildTypeNameSim 0/0_cv 4.13 % 4.13 % 10 -BuildTypeNameStr 10/10_mean 84.2 ns 84.2 ns 10 -BuildTypeNameStr 10/10_median 84.1 ns 84.1 ns 10 -BuildTypeNameStr 10/10_stddev 1.04 ns 1.04 ns 10 -BuildTypeNameStr 10/10_cv 1.24 % 1.24 % 10 -BuildTypeNameExp 10/10_mean 26.9 ns 26.9 ns 10 -BuildTypeNameExp 10/10_median 26.8 ns 26.8 ns 10 -BuildTypeNameExp 10/10_stddev 0.687 ns 0.687 ns 10 -BuildTypeNameExp 10/10_cv 2.55 % 2.55 % 10 -BuildTypeNameSim 10/10_mean 23.0 ns 23.0 ns 10 -BuildTypeNameSim 10/10_median 23.0 ns 23.0 ns 10 -BuildTypeNameSim 10/10_stddev 0.351 ns 0.351 ns 10 -BuildTypeNameSim 10/10_cv 1.52 % 1.52 % 10 +BuildTypeNameStr 0/0_mean 10.2 ns 10.2 ns 4 +BuildTypeNameStr 0/0_median 10.3 ns 10.3 ns 4 +BuildTypeNameStr 0/0_stddev 0.148 ns 0.148 ns 4 +BuildTypeNameStr 0/0_cv 1.44 % 1.44 % 4 +BuildTypeNameExp 0/0_mean 6.44 ns 6.44 ns 4 +BuildTypeNameExp 0/0_median 6.44 ns 6.44 ns 4 +BuildTypeNameExp 0/0_stddev 0.052 ns 0.052 ns 4 +BuildTypeNameExp 0/0_cv 0.81 % 0.81 % 4 +BuildTypeNameSim 0/0_mean 5.14 ns 5.14 ns 4 +BuildTypeNameSim 0/0_median 5.13 ns 5.13 ns 4 +BuildTypeNameSim 0/0_stddev 0.095 ns 0.095 ns 4 +BuildTypeNameSim 0/0_cv 1.86 % 1.86 % 4 +BuildTypeNameStr 10/10_mean 85.1 ns 85.1 ns 4 +BuildTypeNameStr 10/10_median 84.0 ns 84.0 ns 4 +BuildTypeNameStr 10/10_stddev 3.42 ns 3.42 ns 4 +BuildTypeNameStr 10/10_cv 4.02 % 4.02 % 4 +BuildTypeNameExp 10/10_mean 26.5 ns 26.5 ns 4 +BuildTypeNameExp 10/10_median 26.6 ns 26.6 ns 4 +BuildTypeNameExp 10/10_stddev 0.336 ns 0.336 ns 4 +BuildTypeNameExp 10/10_cv 1.27 % 1.27 % 4 +BuildTypeNameSim 10/10_mean 22.4 ns 22.4 ns 4 +BuildTypeNameSim 10/10_median 22.4 ns 22.4 ns 4 +BuildTypeNameSim 10/10_stddev 0.549 ns 0.549 ns 4 +BuildTypeNameSim 10/10_cv 2.46 % 2.46 % 4 ----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat with replace str_mean 229 ns 229 ns 10 -Concat with replace str_median 229 ns 229 ns 10 -Concat with replace str_stddev 7.92 ns 7.92 ns 10 -Concat with replace str_cv 3.46 % 3.46 % 10 -Concat with replace exp_mean 131 ns 131 ns 10 -Concat with replace exp_median 131 ns 131 ns 10 -Concat with replace exp_stddev 3.30 ns 3.30 ns 10 -Concat with replace exp_cv 2.52 % 2.52 % 10 +Concat with replace str_mean 228 ns 228 ns 4 +Concat with replace str_median 228 ns 228 ns 4 +Concat with replace str_stddev 3.16 ns 3.16 ns 4 +Concat with replace str_cv 1.39 % 1.39 % 4 +Concat with replace exp_mean 133 ns 133 ns 4 +Concat with replace exp_median 135 ns 135 ns 4 +Concat with replace exp_stddev 4.33 ns 4.33 ns 4 +Concat with replace exp_cv 3.25 % 3.25 % 4 ----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e;_mean 1.13 ns 1.13 ns 10 -std::string e;_median 1.10 ns 1.10 ns 10 -std::string e;_stddev 0.095 ns 0.095 ns 10 -std::string e;_cv 8.36 % 8.36 % 10 -std::string_view e;_mean 0.750 ns 0.750 ns 10 -std::string_view e;_median 0.736 ns 0.736 ns 10 -std::string_view e;_stddev 0.038 ns 0.038 ns 10 -std::string_view e;_cv 5.04 % 5.04 % 10 -ssa e;_mean 0.181 ns 0.181 ns 10 -ssa e;_median 0.182 ns 0.182 ns 10 -ssa e;_stddev 0.002 ns 0.002 ns 10 -ssa e;_cv 1.33 % 1.33 % 10 -stringa e;_mean 0.731 ns 0.731 ns 10 -stringa e;_median 0.734 ns 0.734 ns 10 -stringa e;_stddev 0.010 ns 0.010 ns 10 -stringa e;_cv 1.41 % 1.41 % 10 -lstringa<20> e;_mean 1.11 ns 1.11 ns 10 -lstringa<20> e;_median 1.10 ns 1.10 ns 10 -lstringa<20> e;_stddev 0.032 ns 0.032 ns 10 -lstringa<20> e;_cv 2.84 % 2.84 % 10 -lstringa<40> e;_mean 1.11 ns 1.11 ns 10 -lstringa<40> e;_median 1.10 ns 1.10 ns 10 -lstringa<40> e;_stddev 0.031 ns 0.031 ns 10 -lstringa<40> e;_cv 2.81 % 2.81 % 10 +std::string e;_mean 1.11 ns 1.11 ns 4 +std::string e;_median 1.12 ns 1.12 ns 4 +std::string e;_stddev 0.025 ns 0.025 ns 4 +std::string e;_cv 2.21 % 2.21 % 4 +std::string_view e;_mean 0.733 ns 0.733 ns 4 +std::string_view e;_median 0.733 ns 0.733 ns 4 +std::string_view e;_stddev 0.012 ns 0.012 ns 4 +std::string_view e;_cv 1.58 % 1.58 % 4 +ssa e;_mean 0.182 ns 0.182 ns 4 +ssa e;_median 0.182 ns 0.182 ns 4 +ssa e;_stddev 0.003 ns 0.003 ns 4 +ssa e;_cv 1.59 % 1.59 % 4 +stringa e;_mean 0.738 ns 0.738 ns 4 +stringa e;_median 0.734 ns 0.734 ns 4 +stringa e;_stddev 0.009 ns 0.009 ns 4 +stringa e;_cv 1.16 % 1.16 % 4 +lstringa<20> e;_mean 1.12 ns 1.12 ns 4 +lstringa<20> e;_median 1.12 ns 1.12 ns 4 +lstringa<20> e;_stddev 0.004 ns 0.004 ns 4 +lstringa<20> e;_cv 0.33 % 0.33 % 4 +lstringa<40> e;_mean 1.12 ns 1.12 ns 4 +lstringa<40> e;_median 1.13 ns 1.13 ns 4 +lstringa<40> e;_stddev 0.016 ns 0.016 ns 4 +lstringa<40> e;_cv 1.44 % 1.44 % 4 ----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text";_mean 1.87 ns 1.87 ns 10 -std::string e = "Test text";_median 1.83 ns 1.83 ns 10 -std::string e = "Test text";_stddev 0.092 ns 0.092 ns 10 -std::string e = "Test text";_cv 4.94 % 4.94 % 10 -std::string_view e = "Test text";_mean 0.734 ns 0.734 ns 10 -std::string_view e = "Test text";_median 0.731 ns 0.731 ns 10 -std::string_view e = "Test text";_stddev 0.012 ns 0.012 ns 10 -std::string_view e = "Test text";_cv 1.63 % 1.63 % 10 -ssa e = "Test text";_mean 0.735 ns 0.735 ns 10 -ssa e = "Test text";_median 0.728 ns 0.728 ns 10 -ssa e = "Test text";_stddev 0.024 ns 0.024 ns 10 -ssa e = "Test text";_cv 3.32 % 3.32 % 10 -stringa e = "Test text";_mean 1.14 ns 1.14 ns 10 -stringa e = "Test text";_median 1.12 ns 1.12 ns 10 -stringa e = "Test text";_stddev 0.053 ns 0.053 ns 10 -stringa e = "Test text";_cv 4.65 % 4.65 % 10 -lstringa<20> e = "Test text";_mean 1.88 ns 1.88 ns 10 -lstringa<20> e = "Test text";_median 1.85 ns 1.85 ns 10 -lstringa<20> e = "Test text";_stddev 0.092 ns 0.092 ns 10 -lstringa<20> e = "Test text";_cv 4.93 % 4.93 % 10 -lstringa<40> e = "Test text";_mean 1.83 ns 1.83 ns 10 -lstringa<40> e = "Test text";_median 1.83 ns 1.83 ns 10 -lstringa<40> e = "Test text";_stddev 0.014 ns 0.014 ns 10 -lstringa<40> e = "Test text";_cv 0.76 % 0.76 % 10 +std::string e = "Test text";_mean 1.99 ns 1.99 ns 4 +std::string e = "Test text";_median 1.94 ns 1.94 ns 4 +std::string e = "Test text";_stddev 0.169 ns 0.169 ns 4 +std::string e = "Test text";_cv 8.49 % 8.49 % 4 +std::string_view e = "Test text";_mean 0.778 ns 0.778 ns 4 +std::string_view e = "Test text";_median 0.777 ns 0.777 ns 4 +std::string_view e = "Test text";_stddev 0.033 ns 0.033 ns 4 +std::string_view e = "Test text";_cv 4.24 % 4.24 % 4 +ssa e = "Test text";_mean 0.747 ns 0.747 ns 4 +ssa e = "Test text";_median 0.738 ns 0.738 ns 4 +ssa e = "Test text";_stddev 0.034 ns 0.034 ns 4 +ssa e = "Test text";_cv 4.53 % 4.53 % 4 +stringa e = "Test text";_mean 1.09 ns 1.09 ns 4 +stringa e = "Test text";_median 1.09 ns 1.09 ns 4 +stringa e = "Test text";_stddev 0.027 ns 0.027 ns 4 +stringa e = "Test text";_cv 2.49 % 2.49 % 4 +lstringa<20> e = "Test text";_mean 1.83 ns 1.83 ns 4 +lstringa<20> e = "Test text";_median 1.83 ns 1.83 ns 4 +lstringa<20> e = "Test text";_stddev 0.017 ns 0.017 ns 4 +lstringa<20> e = "Test text";_cv 0.90 % 0.90 % 4 +lstringa<40> e = "Test text";_mean 1.84 ns 1.84 ns 4 +lstringa<40> e = "Test text";_median 1.84 ns 1.84 ns 4 +lstringa<40> e = "Test text";_stddev 0.011 ns 0.011 ns 4 +lstringa<40> e = "Test text";_cv 0.60 % 0.60 % 4 ----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890";_mean 18.8 ns 18.8 ns 10 -std::string e = "123456789012345678901234567890";_median 18.8 ns 18.8 ns 10 -std::string e = "123456789012345678901234567890";_stddev 0.430 ns 0.430 ns 10 -std::string e = "123456789012345678901234567890";_cv 2.29 % 2.29 % 10 -std::string_view e = "123456789012345678901234567890";_mean 0.738 ns 0.738 ns 10 -std::string_view e = "123456789012345678901234567890";_median 0.734 ns 0.734 ns 10 -std::string_view e = "123456789012345678901234567890";_stddev 0.016 ns 0.016 ns 10 -std::string_view e = "123456789012345678901234567890";_cv 2.13 % 2.13 % 10 -ssa e = "123456789012345678901234567890";_mean 0.732 ns 0.732 ns 10 -ssa e = "123456789012345678901234567890";_median 0.731 ns 0.731 ns 10 -ssa e = "123456789012345678901234567890";_stddev 0.009 ns 0.009 ns 10 -ssa e = "123456789012345678901234567890";_cv 1.20 % 1.20 % 10 -stringa e = "123456789012345678901234567890";_mean 1.11 ns 1.11 ns 10 -stringa e = "123456789012345678901234567890";_median 1.11 ns 1.11 ns 10 -stringa e = "123456789012345678901234567890";_stddev 0.024 ns 0.024 ns 10 -stringa e = "123456789012345678901234567890";_cv 2.15 % 2.15 % 10 -lstringa<20> e = "123456789012345678901234567890";_mean 21.2 ns 21.2 ns 10 -lstringa<20> e = "123456789012345678901234567890";_median 21.5 ns 21.5 ns 10 -lstringa<20> e = "123456789012345678901234567890";_stddev 1.32 ns 1.32 ns 10 -lstringa<20> e = "123456789012345678901234567890";_cv 6.25 % 6.25 % 10 -lstringa<40> e = "123456789012345678901234567890";_mean 1.85 ns 1.85 ns 10 -lstringa<40> e = "123456789012345678901234567890";_median 1.83 ns 1.83 ns 10 -lstringa<40> e = "123456789012345678901234567890";_stddev 0.070 ns 0.070 ns 10 -lstringa<40> e = "123456789012345678901234567890";_cv 3.76 % 3.76 % 10 +std::string e = "123456789012345678901234567890";_mean 19.0 ns 19.0 ns 4 +std::string e = "123456789012345678901234567890";_median 19.0 ns 19.0 ns 4 +std::string e = "123456789012345678901234567890";_stddev 0.328 ns 0.328 ns 4 +std::string e = "123456789012345678901234567890";_cv 1.73 % 1.73 % 4 +std::string_view e = "123456789012345678901234567890";_mean 0.735 ns 0.735 ns 4 +std::string_view e = "123456789012345678901234567890";_median 0.739 ns 0.739 ns 4 +std::string_view e = "123456789012345678901234567890";_stddev 0.012 ns 0.012 ns 4 +std::string_view e = "123456789012345678901234567890";_cv 1.63 % 1.63 % 4 +ssa e = "123456789012345678901234567890";_mean 0.722 ns 0.722 ns 4 +ssa e = "123456789012345678901234567890";_median 0.722 ns 0.722 ns 4 +ssa e = "123456789012345678901234567890";_stddev 0.013 ns 0.013 ns 4 +ssa e = "123456789012345678901234567890";_cv 1.82 % 1.82 % 4 +stringa e = "123456789012345678901234567890";_mean 1.09 ns 1.09 ns 4 +stringa e = "123456789012345678901234567890";_median 1.09 ns 1.09 ns 4 +stringa e = "123456789012345678901234567890";_stddev 0.017 ns 0.017 ns 4 +stringa e = "123456789012345678901234567890";_cv 1.59 % 1.59 % 4 +lstringa<20> e = "123456789012345678901234567890";_mean 20.3 ns 20.3 ns 4 +lstringa<20> e = "123456789012345678901234567890";_median 20.3 ns 20.3 ns 4 +lstringa<20> e = "123456789012345678901234567890";_stddev 0.751 ns 0.751 ns 4 +lstringa<20> e = "123456789012345678901234567890";_cv 3.70 % 3.70 % 4 +lstringa<40> e = "123456789012345678901234567890";_mean 1.83 ns 1.83 ns 4 +lstringa<40> e = "123456789012345678901234567890";_median 1.83 ns 1.83 ns 4 +lstringa<40> e = "123456789012345678901234567890";_stddev 0.013 ns 0.013 ns 4 +lstringa<40> e = "123456789012345678901234567890";_cv 0.70 % 0.70 % 4 ----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text"; auto c{e};_mean 4.82 ns 4.82 ns 10 -std::string e = "Test text"; auto c{e};_median 4.81 ns 4.81 ns 10 -std::string e = "Test text"; auto c{e};_stddev 0.095 ns 0.095 ns 10 -std::string e = "Test text"; auto c{e};_cv 1.96 % 1.96 % 10 -std::string_view e = "Test text"; auto c{e};_mean 0.381 ns 0.381 ns 10 -std::string_view e = "Test text"; auto c{e};_median 0.381 ns 0.381 ns 10 -std::string_view e = "Test text"; auto c{e};_stddev 0.006 ns 0.006 ns 10 -std::string_view e = "Test text"; auto c{e};_cv 1.63 % 1.63 % 10 -ssa e = "Test text"; auto c{e};_mean 0.373 ns 0.373 ns 10 -ssa e = "Test text"; auto c{e};_median 0.372 ns 0.372 ns 10 -ssa e = "Test text"; auto c{e};_stddev 0.009 ns 0.009 ns 10 -ssa e = "Test text"; auto c{e};_cv 2.54 % 2.54 % 10 -stringa e = "Test text"; auto c{e};_mean 1.30 ns 1.30 ns 10 -stringa e = "Test text"; auto c{e};_median 1.29 ns 1.29 ns 10 -stringa e = "Test text"; auto c{e};_stddev 0.029 ns 0.029 ns 10 -stringa e = "Test text"; auto c{e};_cv 2.20 % 2.20 % 10 -lstringa<20> e = "Test text"; auto c{e};_mean 4.61 ns 4.61 ns 10 -lstringa<20> e = "Test text"; auto c{e};_median 4.50 ns 4.50 ns 10 -lstringa<20> e = "Test text"; auto c{e};_stddev 0.343 ns 0.343 ns 10 -lstringa<20> e = "Test text"; auto c{e};_cv 7.45 % 7.45 % 10 -lstringa<40> e = "Test text"; auto c{e};_mean 4.58 ns 4.58 ns 10 -lstringa<40> e = "Test text"; auto c{e};_median 4.45 ns 4.45 ns 10 -lstringa<40> e = "Test text"; auto c{e};_stddev 0.340 ns 0.340 ns 10 -lstringa<40> e = "Test text"; auto c{e};_cv 7.42 % 7.42 % 10 +std::string e = "Test text"; auto c{e};_mean 4.88 ns 4.88 ns 4 +std::string e = "Test text"; auto c{e};_median 4.86 ns 4.86 ns 4 +std::string e = "Test text"; auto c{e};_stddev 0.089 ns 0.089 ns 4 +std::string e = "Test text"; auto c{e};_cv 1.83 % 1.83 % 4 +std::string_view e = "Test text"; auto c{e};_mean 0.378 ns 0.378 ns 4 +std::string_view e = "Test text"; auto c{e};_median 0.376 ns 0.376 ns 4 +std::string_view e = "Test text"; auto c{e};_stddev 0.007 ns 0.007 ns 4 +std::string_view e = "Test text"; auto c{e};_cv 1.92 % 1.92 % 4 +ssa e = "Test text"; auto c{e};_mean 0.375 ns 0.375 ns 4 +ssa e = "Test text"; auto c{e};_median 0.371 ns 0.371 ns 4 +ssa e = "Test text"; auto c{e};_stddev 0.014 ns 0.014 ns 4 +ssa e = "Test text"; auto c{e};_cv 3.85 % 3.85 % 4 +stringa e = "Test text"; auto c{e};_mean 1.09 ns 1.09 ns 4 +stringa e = "Test text"; auto c{e};_median 1.09 ns 1.09 ns 4 +stringa e = "Test text"; auto c{e};_stddev 0.015 ns 0.015 ns 4 +stringa e = "Test text"; auto c{e};_cv 1.38 % 1.38 % 4 +lstringa<20> e = "Test text"; auto c{e};_mean 4.52 ns 4.52 ns 4 +lstringa<20> e = "Test text"; auto c{e};_median 4.53 ns 4.53 ns 4 +lstringa<20> e = "Test text"; auto c{e};_stddev 0.106 ns 0.106 ns 4 +lstringa<20> e = "Test text"; auto c{e};_cv 2.35 % 2.35 % 4 +lstringa<40> e = "Test text"; auto c{e};_mean 4.45 ns 4.45 ns 4 +lstringa<40> e = "Test text"; auto c{e};_median 4.44 ns 4.44 ns 4 +lstringa<40> e = "Test text"; auto c{e};_stddev 0.078 ns 0.078 ns 4 +lstringa<40> e = "Test text"; auto c{e};_cv 1.75 % 1.75 % 4 ----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890"; auto c{e};_mean 23.8 ns 23.8 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_median 23.9 ns 23.9 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.322 ns 0.322 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_cv 1.36 % 1.36 % 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.742 ns 0.742 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.732 ns 0.732 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.035 ns 0.035 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 4.71 % 4.71 % 10 -ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.742 ns 0.742 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_median 0.741 ns 0.741 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.016 ns 0.016 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.14 % 2.14 % 10 -stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.11 ns 1.11 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_median 1.11 ns 1.11 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.015 ns 0.015 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_cv 1.40 % 1.40 % 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 20.2 ns 20.2 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 20.1 ns 20.1 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.377 ns 0.377 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 1.87 % 1.87 % 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.82 ns 4.82 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.66 ns 4.66 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.467 ns 0.467 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 9.70 % 9.70 % 10 +std::string e = "123456789012345678901234567890"; auto c{e};_mean 23.5 ns 23.5 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_median 23.4 ns 23.4 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.231 ns 0.231 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_cv 0.98 % 0.98 % 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.738 ns 0.738 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.737 ns 0.737 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.017 ns 0.017 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 2.24 % 2.24 % 4 +ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.745 ns 0.745 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_median 0.746 ns 0.746 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.028 ns 0.028 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_cv 3.71 % 3.71 % 4 +stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.21 ns 1.21 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_median 1.21 ns 1.21 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.051 ns 0.051 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_cv 4.18 % 4.18 % 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 22.4 ns 22.4 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 22.7 ns 22.7 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 1.30 ns 1.30 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 5.79 % 5.79 % 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 5.09 ns 5.09 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 5.05 ns 5.05 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.663 ns 0.663 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 13.03 % 13.03 % 4 ----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find;_mean 6.82 ns 6.82 ns 10 -std::string::find;_median 6.73 ns 6.73 ns 10 -std::string::find;_stddev 0.422 ns 0.422 ns 10 -std::string::find;_cv 6.18 % 6.18 % 10 -std::string_view::find;_mean 6.76 ns 6.76 ns 10 -std::string_view::find;_median 6.66 ns 6.66 ns 10 -std::string_view::find;_stddev 0.315 ns 0.315 ns 10 -std::string_view::find;_cv 4.67 % 4.67 % 10 -ssa::find;_mean 6.29 ns 6.29 ns 10 -ssa::find;_median 6.30 ns 6.30 ns 10 -ssa::find;_stddev 0.114 ns 0.114 ns 10 -ssa::find;_cv 1.80 % 1.80 % 10 -stringa::find;_mean 6.82 ns 6.82 ns 10 -stringa::find;_median 6.73 ns 6.73 ns 10 -stringa::find;_stddev 0.278 ns 0.278 ns 10 -stringa::find;_cv 4.07 % 4.07 % 10 -lstringa<20>::find;_mean 7.09 ns 7.09 ns 10 -lstringa<20>::find;_median 7.08 ns 7.08 ns 10 -lstringa<20>::find;_stddev 0.669 ns 0.669 ns 10 -lstringa<20>::find;_cv 9.44 % 9.44 % 10 -lstringa<40>::find;_mean 6.43 ns 6.43 ns 10 -lstringa<40>::find;_median 6.39 ns 6.39 ns 10 -lstringa<40>::find;_stddev 0.242 ns 0.242 ns 10 -lstringa<40>::find;_cv 3.75 % 3.75 % 10 +std::string::find;_mean 6.94 ns 6.94 ns 4 +std::string::find;_median 6.64 ns 6.64 ns 4 +std::string::find;_stddev 0.631 ns 0.631 ns 4 +std::string::find;_cv 9.09 % 9.09 % 4 +std::string_view::find;_mean 6.66 ns 6.66 ns 4 +std::string_view::find;_median 6.67 ns 6.67 ns 4 +std::string_view::find;_stddev 0.131 ns 0.131 ns 4 +std::string_view::find;_cv 1.97 % 1.97 % 4 +ssa::find;_mean 6.57 ns 6.57 ns 4 +ssa::find;_median 6.40 ns 6.40 ns 4 +ssa::find;_stddev 0.360 ns 0.360 ns 4 +ssa::find;_cv 5.49 % 5.49 % 4 +stringa::find;_mean 6.68 ns 6.68 ns 4 +stringa::find;_median 6.68 ns 6.68 ns 4 +stringa::find;_stddev 0.049 ns 0.049 ns 4 +stringa::find;_cv 0.74 % 0.74 % 4 +lstringa<20>::find;_mean 6.60 ns 6.60 ns 4 +lstringa<20>::find;_median 6.58 ns 6.58 ns 4 +lstringa<20>::find;_stddev 0.137 ns 0.137 ns 4 +lstringa<20>::find;_cv 2.07 % 2.07 % 4 +lstringa<40>::find;_mean 6.83 ns 6.83 ns 4 +lstringa<40>::find;_median 6.79 ns 6.79 ns 4 +lstringa<40>::find;_stddev 0.288 ns 0.288 ns 4 +lstringa<40>::find;_cv 4.21 % 4.21 % 4 ------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string copy{str_with_len_N};/15_mean 4.81 ns 4.81 ns 10 -std::string copy{str_with_len_N};/15_median 4.81 ns 4.81 ns 10 -std::string copy{str_with_len_N};/15_stddev 0.076 ns 0.076 ns 10 -std::string copy{str_with_len_N};/15_cv 1.58 % 1.58 % 10 -std::string copy{str_with_len_N};/16_mean 23.2 ns 23.2 ns 10 -std::string copy{str_with_len_N};/16_median 23.1 ns 23.1 ns 10 -std::string copy{str_with_len_N};/16_stddev 0.432 ns 0.432 ns 10 -std::string copy{str_with_len_N};/16_cv 1.87 % 1.87 % 10 -std::string copy{str_with_len_N};/23_mean 23.2 ns 23.2 ns 10 -std::string copy{str_with_len_N};/23_median 22.7 ns 22.7 ns 10 -std::string copy{str_with_len_N};/23_stddev 0.762 ns 0.762 ns 10 -std::string copy{str_with_len_N};/23_cv 3.29 % 3.29 % 10 -std::string copy{str_with_len_N};/24_mean 24.7 ns 24.7 ns 10 -std::string copy{str_with_len_N};/24_median 24.0 ns 24.0 ns 10 -std::string copy{str_with_len_N};/24_stddev 2.15 ns 2.15 ns 10 -std::string copy{str_with_len_N};/24_cv 8.73 % 8.73 % 10 -std::string copy{str_with_len_N};/32_mean 22.7 ns 22.7 ns 10 -std::string copy{str_with_len_N};/32_median 22.7 ns 22.7 ns 10 -std::string copy{str_with_len_N};/32_stddev 0.396 ns 0.396 ns 10 -std::string copy{str_with_len_N};/32_cv 1.74 % 1.74 % 10 -std::string copy{str_with_len_N};/64_mean 22.5 ns 22.5 ns 10 -std::string copy{str_with_len_N};/64_median 22.5 ns 22.5 ns 10 -std::string copy{str_with_len_N};/64_stddev 0.371 ns 0.371 ns 10 -std::string copy{str_with_len_N};/64_cv 1.65 % 1.65 % 10 -std::string copy{str_with_len_N};/128_mean 24.4 ns 24.4 ns 10 -std::string copy{str_with_len_N};/128_median 24.1 ns 24.1 ns 10 -std::string copy{str_with_len_N};/128_stddev 0.748 ns 0.748 ns 10 -std::string copy{str_with_len_N};/128_cv 3.07 % 3.07 % 10 -std::string copy{str_with_len_N};/256_mean 28.2 ns 28.2 ns 10 -std::string copy{str_with_len_N};/256_median 28.2 ns 28.2 ns 10 -std::string copy{str_with_len_N};/256_stddev 0.350 ns 0.350 ns 10 -std::string copy{str_with_len_N};/256_cv 1.24 % 1.24 % 10 -std::string copy{str_with_len_N};/512_mean 28.6 ns 28.6 ns 10 -std::string copy{str_with_len_N};/512_median 28.7 ns 28.7 ns 10 -std::string copy{str_with_len_N};/512_stddev 0.512 ns 0.512 ns 10 -std::string copy{str_with_len_N};/512_cv 1.79 % 1.79 % 10 -std::string copy{str_with_len_N};/1024_mean 33.8 ns 33.8 ns 10 -std::string copy{str_with_len_N};/1024_median 33.8 ns 33.8 ns 10 -std::string copy{str_with_len_N};/1024_stddev 0.727 ns 0.727 ns 10 -std::string copy{str_with_len_N};/1024_cv 2.15 % 2.15 % 10 -std::string copy{str_with_len_N};/2048_mean 121 ns 121 ns 10 -std::string copy{str_with_len_N};/2048_median 122 ns 122 ns 10 -std::string copy{str_with_len_N};/2048_stddev 8.44 ns 8.44 ns 10 -std::string copy{str_with_len_N};/2048_cv 6.96 % 6.96 % 10 -std::string copy{str_with_len_N};/4096_mean 164 ns 164 ns 10 -std::string copy{str_with_len_N};/4096_median 161 ns 161 ns 10 -std::string copy{str_with_len_N};/4096_stddev 18.3 ns 18.3 ns 10 -std::string copy{str_with_len_N};/4096_cv 11.17 % 11.17 % 10 -stringa copy{str_with_len_N};/15_mean 1.11 ns 1.11 ns 10 -stringa copy{str_with_len_N};/15_median 1.11 ns 1.11 ns 10 -stringa copy{str_with_len_N};/15_stddev 0.022 ns 0.022 ns 10 -stringa copy{str_with_len_N};/15_cv 1.99 % 1.99 % 10 -stringa copy{str_with_len_N};/16_mean 1.12 ns 1.12 ns 10 -stringa copy{str_with_len_N};/16_median 1.12 ns 1.12 ns 10 -stringa copy{str_with_len_N};/16_stddev 0.034 ns 0.034 ns 10 -stringa copy{str_with_len_N};/16_cv 3.05 % 3.05 % 10 -stringa copy{str_with_len_N};/23_mean 1.12 ns 1.12 ns 10 -stringa copy{str_with_len_N};/23_median 1.11 ns 1.11 ns 10 -stringa copy{str_with_len_N};/23_stddev 0.050 ns 0.050 ns 10 -stringa copy{str_with_len_N};/23_cv 4.43 % 4.43 % 10 -stringa copy{str_with_len_N};/24_mean 16.4 ns 16.4 ns 10 -stringa copy{str_with_len_N};/24_median 16.3 ns 16.3 ns 10 -stringa copy{str_with_len_N};/24_stddev 0.494 ns 0.494 ns 10 -stringa copy{str_with_len_N};/24_cv 3.01 % 3.01 % 10 -stringa copy{str_with_len_N};/32_mean 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/32_median 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/32_stddev 0.107 ns 0.107 ns 10 -stringa copy{str_with_len_N};/32_cv 0.67 % 0.67 % 10 -stringa copy{str_with_len_N};/64_mean 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/64_median 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/64_stddev 0.081 ns 0.081 ns 10 -stringa copy{str_with_len_N};/64_cv 0.50 % 0.50 % 10 -stringa copy{str_with_len_N};/128_mean 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/128_median 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/128_stddev 0.132 ns 0.132 ns 10 -stringa copy{str_with_len_N};/128_cv 0.82 % 0.82 % 10 -stringa copy{str_with_len_N};/256_mean 16.3 ns 16.3 ns 10 -stringa copy{str_with_len_N};/256_median 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/256_stddev 0.513 ns 0.513 ns 10 -stringa copy{str_with_len_N};/256_cv 3.15 % 3.15 % 10 -stringa copy{str_with_len_N};/512_mean 16.4 ns 16.4 ns 10 -stringa copy{str_with_len_N};/512_median 16.2 ns 16.2 ns 10 -stringa copy{str_with_len_N};/512_stddev 0.387 ns 0.387 ns 10 -stringa copy{str_with_len_N};/512_cv 2.37 % 2.37 % 10 -stringa copy{str_with_len_N};/1024_mean 16.3 ns 16.3 ns 10 -stringa copy{str_with_len_N};/1024_median 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/1024_stddev 0.454 ns 0.454 ns 10 -stringa copy{str_with_len_N};/1024_cv 2.79 % 2.79 % 10 -stringa copy{str_with_len_N};/2048_mean 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/2048_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/2048_stddev 0.138 ns 0.138 ns 10 -stringa copy{str_with_len_N};/2048_cv 0.86 % 0.86 % 10 -stringa copy{str_with_len_N};/4096_mean 16.1 ns 16.1 ns 10 -stringa copy{str_with_len_N};/4096_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/4096_stddev 0.230 ns 0.230 ns 10 -stringa copy{str_with_len_N};/4096_cv 1.43 % 1.43 % 10 -lstringa<16> copy{str_with_len_N};/15_mean 4.55 ns 4.55 ns 10 -lstringa<16> copy{str_with_len_N};/15_median 4.50 ns 4.50 ns 10 -lstringa<16> copy{str_with_len_N};/15_stddev 0.233 ns 0.233 ns 10 -lstringa<16> copy{str_with_len_N};/15_cv 5.12 % 5.12 % 10 -lstringa<16> copy{str_with_len_N};/16_mean 4.50 ns 4.50 ns 10 -lstringa<16> copy{str_with_len_N};/16_median 4.44 ns 4.44 ns 10 -lstringa<16> copy{str_with_len_N};/16_stddev 0.213 ns 0.213 ns 10 -lstringa<16> copy{str_with_len_N};/16_cv 4.72 % 4.72 % 10 -lstringa<16> copy{str_with_len_N};/23_mean 4.44 ns 4.44 ns 10 -lstringa<16> copy{str_with_len_N};/23_median 4.43 ns 4.43 ns 10 -lstringa<16> copy{str_with_len_N};/23_stddev 0.066 ns 0.066 ns 10 -lstringa<16> copy{str_with_len_N};/23_cv 1.47 % 1.47 % 10 -lstringa<16> copy{str_with_len_N};/24_mean 24.5 ns 24.5 ns 10 -lstringa<16> copy{str_with_len_N};/24_median 24.6 ns 24.6 ns 10 -lstringa<16> copy{str_with_len_N};/24_stddev 0.440 ns 0.440 ns 10 -lstringa<16> copy{str_with_len_N};/24_cv 1.79 % 1.79 % 10 -lstringa<16> copy{str_with_len_N};/32_mean 24.4 ns 24.4 ns 10 -lstringa<16> copy{str_with_len_N};/32_median 23.9 ns 23.9 ns 10 -lstringa<16> copy{str_with_len_N};/32_stddev 1.15 ns 1.15 ns 10 -lstringa<16> copy{str_with_len_N};/32_cv 4.70 % 4.70 % 10 -lstringa<16> copy{str_with_len_N};/64_mean 26.5 ns 26.5 ns 10 -lstringa<16> copy{str_with_len_N};/64_median 26.3 ns 26.3 ns 10 -lstringa<16> copy{str_with_len_N};/64_stddev 0.998 ns 0.998 ns 10 -lstringa<16> copy{str_with_len_N};/64_cv 3.77 % 3.77 % 10 -lstringa<16> copy{str_with_len_N};/128_mean 26.6 ns 26.6 ns 10 -lstringa<16> copy{str_with_len_N};/128_median 26.0 ns 26.0 ns 10 -lstringa<16> copy{str_with_len_N};/128_stddev 1.56 ns 1.56 ns 10 -lstringa<16> copy{str_with_len_N};/128_cv 5.85 % 5.85 % 10 -lstringa<16> copy{str_with_len_N};/256_mean 29.7 ns 29.7 ns 10 -lstringa<16> copy{str_with_len_N};/256_median 28.5 ns 28.5 ns 10 -lstringa<16> copy{str_with_len_N};/256_stddev 2.99 ns 2.99 ns 10 -lstringa<16> copy{str_with_len_N};/256_cv 10.04 % 10.04 % 10 -lstringa<16> copy{str_with_len_N};/512_mean 30.8 ns 30.8 ns 10 -lstringa<16> copy{str_with_len_N};/512_median 29.9 ns 29.9 ns 10 -lstringa<16> copy{str_with_len_N};/512_stddev 2.19 ns 2.19 ns 10 -lstringa<16> copy{str_with_len_N};/512_cv 7.13 % 7.13 % 10 -lstringa<16> copy{str_with_len_N};/1024_mean 93.8 ns 93.8 ns 10 -lstringa<16> copy{str_with_len_N};/1024_median 93.8 ns 93.8 ns 10 -lstringa<16> copy{str_with_len_N};/1024_stddev 9.69 ns 9.69 ns 10 -lstringa<16> copy{str_with_len_N};/1024_cv 10.33 % 10.33 % 10 -lstringa<16> copy{str_with_len_N};/2048_mean 124 ns 124 ns 10 -lstringa<16> copy{str_with_len_N};/2048_median 118 ns 118 ns 10 -lstringa<16> copy{str_with_len_N};/2048_stddev 20.6 ns 20.6 ns 10 -lstringa<16> copy{str_with_len_N};/2048_cv 16.55 % 16.55 % 10 -lstringa<16> copy{str_with_len_N};/4096_mean 128 ns 128 ns 10 -lstringa<16> copy{str_with_len_N};/4096_median 128 ns 128 ns 10 -lstringa<16> copy{str_with_len_N};/4096_stddev 9.50 ns 9.50 ns 10 -lstringa<16> copy{str_with_len_N};/4096_cv 7.44 % 7.44 % 10 -lstringa<512> copy{str_with_len_N};/15_mean 5.79 ns 5.79 ns 10 -lstringa<512> copy{str_with_len_N};/15_median 5.75 ns 5.75 ns 10 -lstringa<512> copy{str_with_len_N};/15_stddev 0.214 ns 0.214 ns 10 -lstringa<512> copy{str_with_len_N};/15_cv 3.70 % 3.70 % 10 -lstringa<512> copy{str_with_len_N};/16_mean 6.04 ns 6.04 ns 10 -lstringa<512> copy{str_with_len_N};/16_median 5.78 ns 5.78 ns 10 -lstringa<512> copy{str_with_len_N};/16_stddev 0.517 ns 0.517 ns 10 -lstringa<512> copy{str_with_len_N};/16_cv 8.57 % 8.57 % 10 -lstringa<512> copy{str_with_len_N};/23_mean 5.66 ns 5.66 ns 10 -lstringa<512> copy{str_with_len_N};/23_median 5.66 ns 5.66 ns 10 -lstringa<512> copy{str_with_len_N};/23_stddev 0.105 ns 0.105 ns 10 -lstringa<512> copy{str_with_len_N};/23_cv 1.86 % 1.86 % 10 -lstringa<512> copy{str_with_len_N};/24_mean 5.74 ns 5.74 ns 10 -lstringa<512> copy{str_with_len_N};/24_median 5.71 ns 5.71 ns 10 -lstringa<512> copy{str_with_len_N};/24_stddev 0.145 ns 0.145 ns 10 -lstringa<512> copy{str_with_len_N};/24_cv 2.52 % 2.52 % 10 -lstringa<512> copy{str_with_len_N};/32_mean 5.34 ns 5.34 ns 10 -lstringa<512> copy{str_with_len_N};/32_median 5.30 ns 5.30 ns 10 -lstringa<512> copy{str_with_len_N};/32_stddev 0.134 ns 0.134 ns 10 -lstringa<512> copy{str_with_len_N};/32_cv 2.51 % 2.51 % 10 -lstringa<512> copy{str_with_len_N};/64_mean 6.83 ns 6.83 ns 10 -lstringa<512> copy{str_with_len_N};/64_median 6.77 ns 6.77 ns 10 -lstringa<512> copy{str_with_len_N};/64_stddev 0.146 ns 0.146 ns 10 -lstringa<512> copy{str_with_len_N};/64_cv 2.14 % 2.14 % 10 -lstringa<512> copy{str_with_len_N};/128_mean 6.97 ns 6.97 ns 10 -lstringa<512> copy{str_with_len_N};/128_median 6.96 ns 6.96 ns 10 -lstringa<512> copy{str_with_len_N};/128_stddev 0.096 ns 0.096 ns 10 -lstringa<512> copy{str_with_len_N};/128_cv 1.37 % 1.37 % 10 -lstringa<512> copy{str_with_len_N};/256_mean 7.83 ns 7.83 ns 10 -lstringa<512> copy{str_with_len_N};/256_median 7.81 ns 7.81 ns 10 -lstringa<512> copy{str_with_len_N};/256_stddev 0.095 ns 0.095 ns 10 -lstringa<512> copy{str_with_len_N};/256_cv 1.22 % 1.22 % 10 -lstringa<512> copy{str_with_len_N};/512_mean 10.6 ns 10.6 ns 10 -lstringa<512> copy{str_with_len_N};/512_median 10.4 ns 10.4 ns 10 -lstringa<512> copy{str_with_len_N};/512_stddev 0.577 ns 0.577 ns 10 -lstringa<512> copy{str_with_len_N};/512_cv 5.44 % 5.44 % 10 -lstringa<512> copy{str_with_len_N};/1024_mean 94.8 ns 94.8 ns 10 -lstringa<512> copy{str_with_len_N};/1024_median 96.1 ns 96.1 ns 10 -lstringa<512> copy{str_with_len_N};/1024_stddev 11.1 ns 11.1 ns 10 -lstringa<512> copy{str_with_len_N};/1024_cv 11.71 % 11.71 % 10 -lstringa<512> copy{str_with_len_N};/2048_mean 114 ns 114 ns 10 -lstringa<512> copy{str_with_len_N};/2048_median 114 ns 114 ns 10 -lstringa<512> copy{str_with_len_N};/2048_stddev 11.0 ns 11.0 ns 10 -lstringa<512> copy{str_with_len_N};/2048_cv 9.68 % 9.68 % 10 -lstringa<512> copy{str_with_len_N};/4096_mean 128 ns 128 ns 10 -lstringa<512> copy{str_with_len_N};/4096_median 130 ns 130 ns 10 -lstringa<512> copy{str_with_len_N};/4096_stddev 7.49 ns 7.49 ns 10 -lstringa<512> copy{str_with_len_N};/4096_cv 5.86 % 5.86 % 10 +std::string copy{str_with_len_N};/15_mean 5.53 ns 5.53 ns 4 +std::string copy{str_with_len_N};/15_median 5.59 ns 5.59 ns 4 +std::string copy{str_with_len_N};/15_stddev 0.167 ns 0.167 ns 4 +std::string copy{str_with_len_N};/15_cv 3.01 % 3.01 % 4 +std::string copy{str_with_len_N};/16_mean 23.7 ns 23.7 ns 4 +std::string copy{str_with_len_N};/16_median 23.3 ns 23.3 ns 4 +std::string copy{str_with_len_N};/16_stddev 1.12 ns 1.12 ns 4 +std::string copy{str_with_len_N};/16_cv 4.72 % 4.72 % 4 +std::string copy{str_with_len_N};/23_mean 23.4 ns 23.4 ns 4 +std::string copy{str_with_len_N};/23_median 23.3 ns 23.3 ns 4 +std::string copy{str_with_len_N};/23_stddev 0.437 ns 0.437 ns 4 +std::string copy{str_with_len_N};/23_cv 1.87 % 1.87 % 4 +std::string copy{str_with_len_N};/24_mean 23.2 ns 23.2 ns 4 +std::string copy{str_with_len_N};/24_median 23.0 ns 23.0 ns 4 +std::string copy{str_with_len_N};/24_stddev 0.860 ns 0.860 ns 4 +std::string copy{str_with_len_N};/24_cv 3.70 % 3.70 % 4 +std::string copy{str_with_len_N};/32_mean 23.4 ns 23.4 ns 4 +std::string copy{str_with_len_N};/32_median 22.3 ns 22.3 ns 4 +std::string copy{str_with_len_N};/32_stddev 2.37 ns 2.37 ns 4 +std::string copy{str_with_len_N};/32_cv 10.13 % 10.13 % 4 +std::string copy{str_with_len_N};/64_mean 22.4 ns 22.4 ns 4 +std::string copy{str_with_len_N};/64_median 22.5 ns 22.5 ns 4 +std::string copy{str_with_len_N};/64_stddev 0.454 ns 0.454 ns 4 +std::string copy{str_with_len_N};/64_cv 2.02 % 2.02 % 4 +std::string copy{str_with_len_N};/128_mean 26.9 ns 26.9 ns 4 +std::string copy{str_with_len_N};/128_median 26.9 ns 26.9 ns 4 +std::string copy{str_with_len_N};/128_stddev 2.76 ns 2.76 ns 4 +std::string copy{str_with_len_N};/128_cv 10.25 % 10.25 % 4 +std::string copy{str_with_len_N};/256_mean 24.8 ns 24.8 ns 4 +std::string copy{str_with_len_N};/256_median 24.9 ns 24.9 ns 4 +std::string copy{str_with_len_N};/256_stddev 0.469 ns 0.469 ns 4 +std::string copy{str_with_len_N};/256_cv 1.89 % 1.89 % 4 +std::string copy{str_with_len_N};/512_mean 28.5 ns 28.5 ns 4 +std::string copy{str_with_len_N};/512_median 28.6 ns 28.6 ns 4 +std::string copy{str_with_len_N};/512_stddev 0.746 ns 0.746 ns 4 +std::string copy{str_with_len_N};/512_cv 2.62 % 2.62 % 4 +std::string copy{str_with_len_N};/1024_mean 46.7 ns 46.7 ns 4 +std::string copy{str_with_len_N};/1024_median 46.4 ns 46.4 ns 4 +std::string copy{str_with_len_N};/1024_stddev 1.72 ns 1.72 ns 4 +std::string copy{str_with_len_N};/1024_cv 3.67 % 3.67 % 4 +std::string copy{str_with_len_N};/2048_mean 127 ns 127 ns 4 +std::string copy{str_with_len_N};/2048_median 125 ns 125 ns 4 +std::string copy{str_with_len_N};/2048_stddev 11.0 ns 11.0 ns 4 +std::string copy{str_with_len_N};/2048_cv 8.73 % 8.73 % 4 +std::string copy{str_with_len_N};/4096_mean 155 ns 155 ns 4 +std::string copy{str_with_len_N};/4096_median 149 ns 149 ns 4 +std::string copy{str_with_len_N};/4096_stddev 14.0 ns 14.0 ns 4 +std::string copy{str_with_len_N};/4096_cv 9.05 % 9.05 % 4 +stringa copy{str_with_len_N};/15_mean 1.14 ns 1.14 ns 4 +stringa copy{str_with_len_N};/15_median 1.13 ns 1.13 ns 4 +stringa copy{str_with_len_N};/15_stddev 0.038 ns 0.038 ns 4 +stringa copy{str_with_len_N};/15_cv 3.32 % 3.32 % 4 +stringa copy{str_with_len_N};/16_mean 1.14 ns 1.14 ns 4 +stringa copy{str_with_len_N};/16_median 1.12 ns 1.12 ns 4 +stringa copy{str_with_len_N};/16_stddev 0.058 ns 0.058 ns 4 +stringa copy{str_with_len_N};/16_cv 5.13 % 5.13 % 4 +stringa copy{str_with_len_N};/23_mean 1.12 ns 1.12 ns 4 +stringa copy{str_with_len_N};/23_median 1.11 ns 1.11 ns 4 +stringa copy{str_with_len_N};/23_stddev 0.029 ns 0.029 ns 4 +stringa copy{str_with_len_N};/23_cv 2.62 % 2.62 % 4 +stringa copy{str_with_len_N};/24_mean 16.1 ns 16.1 ns 4 +stringa copy{str_with_len_N};/24_median 16.1 ns 16.1 ns 4 +stringa copy{str_with_len_N};/24_stddev 0.186 ns 0.186 ns 4 +stringa copy{str_with_len_N};/24_cv 1.15 % 1.15 % 4 +stringa copy{str_with_len_N};/32_mean 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/32_median 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/32_stddev 0.131 ns 0.131 ns 4 +stringa copy{str_with_len_N};/32_cv 0.82 % 0.82 % 4 +stringa copy{str_with_len_N};/64_mean 16.1 ns 16.1 ns 4 +stringa copy{str_with_len_N};/64_median 16.1 ns 16.1 ns 4 +stringa copy{str_with_len_N};/64_stddev 0.138 ns 0.138 ns 4 +stringa copy{str_with_len_N};/64_cv 0.86 % 0.86 % 4 +stringa copy{str_with_len_N};/128_mean 16.2 ns 16.2 ns 4 +stringa copy{str_with_len_N};/128_median 16.2 ns 16.2 ns 4 +stringa copy{str_with_len_N};/128_stddev 0.115 ns 0.115 ns 4 +stringa copy{str_with_len_N};/128_cv 0.71 % 0.71 % 4 +stringa copy{str_with_len_N};/256_mean 16.1 ns 16.1 ns 4 +stringa copy{str_with_len_N};/256_median 16.1 ns 16.1 ns 4 +stringa copy{str_with_len_N};/256_stddev 0.135 ns 0.135 ns 4 +stringa copy{str_with_len_N};/256_cv 0.84 % 0.84 % 4 +stringa copy{str_with_len_N};/512_mean 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/512_median 16.3 ns 16.3 ns 4 +stringa copy{str_with_len_N};/512_stddev 0.142 ns 0.142 ns 4 +stringa copy{str_with_len_N};/512_cv 0.87 % 0.87 % 4 +stringa copy{str_with_len_N};/1024_mean 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/1024_median 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/1024_stddev 0.118 ns 0.118 ns 4 +stringa copy{str_with_len_N};/1024_cv 0.74 % 0.74 % 4 +stringa copy{str_with_len_N};/2048_mean 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/2048_median 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/2048_stddev 0.113 ns 0.113 ns 4 +stringa copy{str_with_len_N};/2048_cv 0.70 % 0.70 % 4 +stringa copy{str_with_len_N};/4096_mean 16.2 ns 16.2 ns 4 +stringa copy{str_with_len_N};/4096_median 16.1 ns 16.1 ns 4 +stringa copy{str_with_len_N};/4096_stddev 0.177 ns 0.177 ns 4 +stringa copy{str_with_len_N};/4096_cv 1.09 % 1.09 % 4 +lstringa<16> copy{str_with_len_N};/15_mean 4.48 ns 4.48 ns 4 +lstringa<16> copy{str_with_len_N};/15_median 4.37 ns 4.37 ns 4 +lstringa<16> copy{str_with_len_N};/15_stddev 0.299 ns 0.299 ns 4 +lstringa<16> copy{str_with_len_N};/15_cv 6.67 % 6.67 % 4 +lstringa<16> copy{str_with_len_N};/16_mean 4.40 ns 4.40 ns 4 +lstringa<16> copy{str_with_len_N};/16_median 4.41 ns 4.41 ns 4 +lstringa<16> copy{str_with_len_N};/16_stddev 0.065 ns 0.065 ns 4 +lstringa<16> copy{str_with_len_N};/16_cv 1.48 % 1.48 % 4 +lstringa<16> copy{str_with_len_N};/23_mean 4.56 ns 4.56 ns 4 +lstringa<16> copy{str_with_len_N};/23_median 4.55 ns 4.55 ns 4 +lstringa<16> copy{str_with_len_N};/23_stddev 0.118 ns 0.118 ns 4 +lstringa<16> copy{str_with_len_N};/23_cv 2.58 % 2.58 % 4 +lstringa<16> copy{str_with_len_N};/24_mean 23.7 ns 23.7 ns 4 +lstringa<16> copy{str_with_len_N};/24_median 23.7 ns 23.7 ns 4 +lstringa<16> copy{str_with_len_N};/24_stddev 0.219 ns 0.219 ns 4 +lstringa<16> copy{str_with_len_N};/24_cv 0.92 % 0.92 % 4 +lstringa<16> copy{str_with_len_N};/32_mean 23.4 ns 23.4 ns 4 +lstringa<16> copy{str_with_len_N};/32_median 23.4 ns 23.4 ns 4 +lstringa<16> copy{str_with_len_N};/32_stddev 0.256 ns 0.256 ns 4 +lstringa<16> copy{str_with_len_N};/32_cv 1.09 % 1.09 % 4 +lstringa<16> copy{str_with_len_N};/64_mean 25.3 ns 25.3 ns 4 +lstringa<16> copy{str_with_len_N};/64_median 25.3 ns 25.3 ns 4 +lstringa<16> copy{str_with_len_N};/64_stddev 0.264 ns 0.264 ns 4 +lstringa<16> copy{str_with_len_N};/64_cv 1.04 % 1.04 % 4 +lstringa<16> copy{str_with_len_N};/128_mean 26.6 ns 26.6 ns 4 +lstringa<16> copy{str_with_len_N};/128_median 26.4 ns 26.4 ns 4 +lstringa<16> copy{str_with_len_N};/128_stddev 1.27 ns 1.27 ns 4 +lstringa<16> copy{str_with_len_N};/128_cv 4.78 % 4.78 % 4 +lstringa<16> copy{str_with_len_N};/256_mean 28.2 ns 28.2 ns 4 +lstringa<16> copy{str_with_len_N};/256_median 28.0 ns 28.0 ns 4 +lstringa<16> copy{str_with_len_N};/256_stddev 1.92 ns 1.92 ns 4 +lstringa<16> copy{str_with_len_N};/256_cv 6.79 % 6.79 % 4 +lstringa<16> copy{str_with_len_N};/512_mean 31.9 ns 31.9 ns 4 +lstringa<16> copy{str_with_len_N};/512_median 31.4 ns 31.4 ns 4 +lstringa<16> copy{str_with_len_N};/512_stddev 2.44 ns 2.44 ns 4 +lstringa<16> copy{str_with_len_N};/512_cv 7.65 % 7.65 % 4 +lstringa<16> copy{str_with_len_N};/1024_mean 96.4 ns 96.4 ns 4 +lstringa<16> copy{str_with_len_N};/1024_median 95.9 ns 95.9 ns 4 +lstringa<16> copy{str_with_len_N};/1024_stddev 3.30 ns 3.30 ns 4 +lstringa<16> copy{str_with_len_N};/1024_cv 3.42 % 3.42 % 4 +lstringa<16> copy{str_with_len_N};/2048_mean 107 ns 107 ns 4 +lstringa<16> copy{str_with_len_N};/2048_median 108 ns 108 ns 4 +lstringa<16> copy{str_with_len_N};/2048_stddev 3.59 ns 3.59 ns 4 +lstringa<16> copy{str_with_len_N};/2048_cv 3.36 % 3.36 % 4 +lstringa<16> copy{str_with_len_N};/4096_mean 126 ns 126 ns 4 +lstringa<16> copy{str_with_len_N};/4096_median 125 ns 125 ns 4 +lstringa<16> copy{str_with_len_N};/4096_stddev 2.08 ns 2.08 ns 4 +lstringa<16> copy{str_with_len_N};/4096_cv 1.66 % 1.66 % 4 +lstringa<512> copy{str_with_len_N};/15_mean 5.38 ns 5.38 ns 4 +lstringa<512> copy{str_with_len_N};/15_median 5.38 ns 5.38 ns 4 +lstringa<512> copy{str_with_len_N};/15_stddev 0.113 ns 0.113 ns 4 +lstringa<512> copy{str_with_len_N};/15_cv 2.10 % 2.10 % 4 +lstringa<512> copy{str_with_len_N};/16_mean 5.51 ns 5.51 ns 4 +lstringa<512> copy{str_with_len_N};/16_median 5.54 ns 5.54 ns 4 +lstringa<512> copy{str_with_len_N};/16_stddev 0.116 ns 0.116 ns 4 +lstringa<512> copy{str_with_len_N};/16_cv 2.11 % 2.11 % 4 +lstringa<512> copy{str_with_len_N};/23_mean 5.67 ns 5.67 ns 4 +lstringa<512> copy{str_with_len_N};/23_median 5.40 ns 5.40 ns 4 +lstringa<512> copy{str_with_len_N};/23_stddev 0.696 ns 0.696 ns 4 +lstringa<512> copy{str_with_len_N};/23_cv 12.26 % 12.26 % 4 +lstringa<512> copy{str_with_len_N};/24_mean 5.45 ns 5.45 ns 4 +lstringa<512> copy{str_with_len_N};/24_median 5.42 ns 5.42 ns 4 +lstringa<512> copy{str_with_len_N};/24_stddev 0.238 ns 0.238 ns 4 +lstringa<512> copy{str_with_len_N};/24_cv 4.38 % 4.38 % 4 +lstringa<512> copy{str_with_len_N};/32_mean 5.07 ns 5.07 ns 4 +lstringa<512> copy{str_with_len_N};/32_median 5.08 ns 5.08 ns 4 +lstringa<512> copy{str_with_len_N};/32_stddev 0.087 ns 0.087 ns 4 +lstringa<512> copy{str_with_len_N};/32_cv 1.72 % 1.72 % 4 +lstringa<512> copy{str_with_len_N};/64_mean 6.54 ns 6.54 ns 4 +lstringa<512> copy{str_with_len_N};/64_median 6.49 ns 6.49 ns 4 +lstringa<512> copy{str_with_len_N};/64_stddev 0.221 ns 0.221 ns 4 +lstringa<512> copy{str_with_len_N};/64_cv 3.38 % 3.38 % 4 +lstringa<512> copy{str_with_len_N};/128_mean 7.26 ns 7.26 ns 4 +lstringa<512> copy{str_with_len_N};/128_median 7.24 ns 7.24 ns 4 +lstringa<512> copy{str_with_len_N};/128_stddev 0.083 ns 0.083 ns 4 +lstringa<512> copy{str_with_len_N};/128_cv 1.15 % 1.15 % 4 +lstringa<512> copy{str_with_len_N};/256_mean 8.60 ns 8.60 ns 4 +lstringa<512> copy{str_with_len_N};/256_median 8.59 ns 8.59 ns 4 +lstringa<512> copy{str_with_len_N};/256_stddev 0.160 ns 0.160 ns 4 +lstringa<512> copy{str_with_len_N};/256_cv 1.86 % 1.86 % 4 +lstringa<512> copy{str_with_len_N};/512_mean 11.5 ns 11.5 ns 4 +lstringa<512> copy{str_with_len_N};/512_median 11.7 ns 11.7 ns 4 +lstringa<512> copy{str_with_len_N};/512_stddev 0.714 ns 0.714 ns 4 +lstringa<512> copy{str_with_len_N};/512_cv 6.23 % 6.23 % 4 +lstringa<512> copy{str_with_len_N};/1024_mean 108 ns 108 ns 4 +lstringa<512> copy{str_with_len_N};/1024_median 106 ns 106 ns 4 +lstringa<512> copy{str_with_len_N};/1024_stddev 9.58 ns 9.58 ns 4 +lstringa<512> copy{str_with_len_N};/1024_cv 8.87 % 8.87 % 4 +lstringa<512> copy{str_with_len_N};/2048_mean 110 ns 110 ns 4 +lstringa<512> copy{str_with_len_N};/2048_median 109 ns 109 ns 4 +lstringa<512> copy{str_with_len_N};/2048_stddev 4.35 ns 4.35 ns 4 +lstringa<512> copy{str_with_len_N};/2048_cv 3.97 % 3.97 % 4 +lstringa<512> copy{str_with_len_N};/4096_mean 135 ns 135 ns 4 +lstringa<512> copy{str_with_len_N};/4096_median 137 ns 137 ns 4 +lstringa<512> copy{str_with_len_N};/4096_stddev 6.11 ns 6.11 ns 4 +lstringa<512> copy{str_with_len_N};/4096_cv 4.53 % 4.53 % 4 ----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 27.0 ns 27.0 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 26.8 ns 26.8 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.718 ns 0.718 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.66 % 2.66 % 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 12.1 ns 12.1 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 11.8 ns 11.8 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.910 ns 0.910 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 7.53 % 7.53 % 10 -stringa s = "123456789"; int res = s.to_int_mean 8.11 ns 8.11 ns 10 -stringa s = "123456789"; int res = s.to_int_median 8.09 ns 8.09 ns 10 -stringa s = "123456789"; int res = s.to_int_stddev 0.161 ns 0.161 ns 10 -stringa s = "123456789"; int res = s.to_int_cv 1.98 % 1.98 % 10 -ssa s = "123456789"; int res = s.to_int_mean 8.22 ns 8.22 ns 10 -ssa s = "123456789"; int res = s.to_int_median 8.21 ns 8.21 ns 10 -ssa s = "123456789"; int res = s.to_int_stddev 0.250 ns 0.250 ns 10 -ssa s = "123456789"; int res = s.to_int_cv 3.04 % 3.04 % 10 -lstringa<20> s = "123456789"; int res = s.to_int_mean 8.07 ns 8.07 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_median 8.06 ns 8.06 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.080 ns 0.080 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_cv 0.99 % 0.99 % 10 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 27.9 ns 27.9 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 28.1 ns 28.1 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.637 ns 0.637 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.28 % 2.28 % 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 12.5 ns 12.5 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 12.5 ns 12.5 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.354 ns 0.354 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.82 % 2.82 % 4 +stringa s = "123456789"; int res = s.to_int_mean 8.32 ns 8.32 ns 4 +stringa s = "123456789"; int res = s.to_int_median 8.29 ns 8.29 ns 4 +stringa s = "123456789"; int res = s.to_int_stddev 0.159 ns 0.159 ns 4 +stringa s = "123456789"; int res = s.to_int_cv 1.91 % 1.91 % 4 +ssa s = "123456789"; int res = s.to_int_mean 7.92 ns 7.92 ns 4 +ssa s = "123456789"; int res = s.to_int_median 7.88 ns 7.88 ns 4 +ssa s = "123456789"; int res = s.to_int_stddev 0.135 ns 0.135 ns 4 +ssa s = "123456789"; int res = s.to_int_cv 1.70 % 1.70 % 4 +lstringa<20> s = "123456789"; int res = s.to_int_mean 8.46 ns 8.46 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_median 8.44 ns 8.44 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.132 ns 0.132 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_cv 1.56 % 1.56 % 4 ----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 23.2 ns 23.2 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 23.2 ns 23.2 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.416 ns 0.416 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 1.79 % 1.79 % 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 10.5 ns 10.5 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 10.4 ns 10.4 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.522 ns 0.522 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 4.97 % 4.97 % 10 -stringa s = "abcDef"; int res = s.to_int_mean 8.08 ns 8.08 ns 10 -stringa s = "abcDef"; int res = s.to_int_median 8.06 ns 8.06 ns 10 -stringa s = "abcDef"; int res = s.to_int_stddev 0.104 ns 0.104 ns 10 -stringa s = "abcDef"; int res = s.to_int_cv 1.28 % 1.28 % 10 -ssa s = "abcDef"; int res = s.to_int_mean 8.13 ns 8.13 ns 10 -ssa s = "abcDef"; int res = s.to_int_median 8.11 ns 8.11 ns 10 -ssa s = "abcDef"; int res = s.to_int_stddev 0.180 ns 0.180 ns 10 -ssa s = "abcDef"; int res = s.to_int_cv 2.22 % 2.22 % 10 -lstringa<20> s = "abcDef"; int res = s.to_int_mean 7.77 ns 7.77 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_median 7.71 ns 7.71 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.247 ns 0.247 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_cv 3.17 % 3.17 % 10 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 25.5 ns 25.5 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 26.1 ns 26.1 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 1.62 ns 1.62 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 6.33 % 6.33 % 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 10.3 ns 10.3 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 10.2 ns 10.2 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.477 ns 0.477 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 4.64 % 4.64 % 4 +stringa s = "abcDef"; int res = s.to_int_mean 8.23 ns 8.23 ns 4 +stringa s = "abcDef"; int res = s.to_int_median 8.17 ns 8.17 ns 4 +stringa s = "abcDef"; int res = s.to_int_stddev 0.241 ns 0.241 ns 4 +stringa s = "abcDef"; int res = s.to_int_cv 2.93 % 2.93 % 4 +ssa s = "abcDef"; int res = s.to_int_mean 7.99 ns 7.99 ns 4 +ssa s = "abcDef"; int res = s.to_int_median 7.87 ns 7.87 ns 4 +ssa s = "abcDef"; int res = s.to_int_stddev 0.332 ns 0.332 ns 4 +ssa s = "abcDef"; int res = s.to_int_cv 4.15 % 4.15 % 4 +lstringa<20> s = "abcDef"; int res = s.to_int_mean 8.36 ns 8.36 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_median 8.38 ns 8.38 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.139 ns 0.139 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.66 % 1.66 % 4 ----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 28.0 ns 28.0 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 27.9 ns 27.9 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.574 ns 0.574 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 2.05 % 2.05 % 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 14.8 ns 14.8 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 14.8 ns 14.8 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.186 ns 0.186 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 1.25 % 1.25 % 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 13.7 ns 13.7 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 13.7 ns 13.7 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.305 ns 0.305 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 2.22 % 2.22 % 10 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 28.8 ns 28.8 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 28.7 ns 28.7 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.875 ns 0.876 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 3.04 % 3.04 % 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 15.1 ns 15.1 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 15.1 ns 15.1 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.221 ns 0.221 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 1.47 % 1.47 % 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 10.6 ns 10.6 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 10.7 ns 10.7 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.155 ns 0.155 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 1.46 % 1.46 % 4 ----- Convert to double '1234.567e10' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 63.6 ns 63.6 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 63.1 ns 63.1 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 2.33 ns 2.33 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 3.66 % 3.66 % 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 23.9 ns 23.9 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 23.9 ns 23.9 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.343 ns 0.343 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.43 % 1.43 % 10 -ssa s = "1234.567e10"; double res = *s.to_double()_mean 24.6 ns 24.6 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_median 24.4 ns 24.4 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.832 ns 0.832 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_cv 3.38 % 3.38 % 10 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 65.1 ns 65.1 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 64.7 ns 64.7 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 3.90 ns 3.90 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 5.98 % 5.98 % 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 23.8 ns 23.8 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 23.9 ns 23.9 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.473 ns 0.473 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.99 % 1.99 % 4 +ssa s = "1234.567e10"; double res = *s.to_double()_mean 24.7 ns 24.7 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_median 24.7 ns 24.7 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_stddev 1.13 ns 1.13 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_cv 4.58 % 4.58 % 4 -- Append const literal of 16 bytes 64 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << "abbaabbaabbaabba";_mean 1440 ns 1440 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_median 1448 ns 1448 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 94.7 ns 94.7 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_cv 6.58 % 6.58 % 10 -std::string str; ... str += "abbaabbaabbaabba";_mean 389 ns 389 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_median 385 ns 385 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_stddev 37.7 ns 37.7 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_cv 9.70 % 9.70 % 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 398 ns 398 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_median 400 ns 400 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 14.4 ns 14.4 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 3.61 % 3.61 % 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 259 ns 259 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_median 250 ns 250 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 18.0 ns 18.0 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 6.97 % 6.97 % 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 242 ns 242 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_median 234 ns 234 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 17.2 ns 17.2 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 7.10 % 7.10 % 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 141 ns 141 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 140 ns 140 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 5.52 ns 5.52 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 3.91 % 3.91 % 10 +std::stringstream str; ... str << "abbaabbaabbaabba";_mean 1335 ns 1335 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_median 1331 ns 1331 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 12.5 ns 12.5 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_cv 0.94 % 0.94 % 4 +std::string str; ... str += "abbaabbaabbaabba";_mean 380 ns 380 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_median 382 ns 382 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_stddev 6.16 ns 6.16 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_cv 1.62 % 1.62 % 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 394 ns 394 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_median 397 ns 397 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 9.24 ns 9.24 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 2.35 % 2.35 % 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 272 ns 272 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_median 277 ns 277 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 16.7 ns 16.7 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 6.15 % 6.15 % 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 250 ns 250 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_median 255 ns 255 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 16.2 ns 16.2 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 6.48 % 6.48 % 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 140 ns 140 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 139 ns 139 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 2.94 ns 2.94 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.09 % 2.09 % 4 -- Append string of 16 bytes and const literal of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 1360 ns 1360 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1336 ns 1336 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 69.5 ns 69.5 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 5.11 % 5.11 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1352 ns 1352 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1338 ns 1338 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 107 ns 107 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 7.90 % 7.90 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 432 ns 432 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 432 ns 432 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 17.2 ns 17.2 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.99 % 3.99 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 402 ns 402 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 409 ns 409 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 44.6 ns 44.6 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 11.08 % 11.08 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 326 ns 326 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 315 ns 315 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 19.2 ns 19.2 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.88 % 5.88 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 253 ns 253 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 248 ns 248 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 13.3 ns 13.3 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.26 % 5.26 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 1363 ns 1363 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1369 ns 1369 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 49.0 ns 49.0 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 3.59 % 3.59 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1255 ns 1255 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1230 ns 1230 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 59.0 ns 59.0 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 4.70 % 4.70 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 484 ns 484 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 489 ns 489 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.6 ns 18.6 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.84 % 3.84 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 459 ns 459 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 475 ns 475 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 79.4 ns 79.4 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 17.31 % 17.31 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 354 ns 354 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 365 ns 365 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 39.6 ns 39.6 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 11.18 % 11.18 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 245 ns 245 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 245 ns 245 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 2.86 ns 2.85 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.16 % 1.16 % 4 -- Append string of 16 bytes and const literal of 16 bytes 2048 times, 65536 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 73241 ns 73241 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 73277 ns 73278 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 907 ns 907 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 1.24 % 1.24 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 72618 ns 72618 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 72421 ns 72421 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1242 ns 1242 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.71 % 1.71 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 19903 ns 19903 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 19899 ns 19899 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 333 ns 333 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.68 % 1.68 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17505 ns 17505 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17237 ns 17237 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 902 ns 902 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.15 % 5.15 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17272 ns 17272 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17246 ns 17247 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 473 ns 473 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.74 % 2.74 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17201 ns 17201 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17089 ns 17089 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 702 ns 702 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.08 % 4.08 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 73412 ns 73412 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 73498 ns 73498 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 837 ns 837 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 1.14 % 1.14 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 71780 ns 71780 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 71835 ns 71836 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1441 ns 1441 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.01 % 2.01 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 21248 ns 21248 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 19854 ns 19854 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 3343 ns 3343 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 15.74 % 15.74 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17315 ns 17315 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17245 ns 17245 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 377 ns 377 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.18 % 2.18 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17550 ns 17550 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17561 ns 17561 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 223 ns 223 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.27 % 1.27 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17182 ns 17182 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17107 ns 17107 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 251 ns 251 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.46 % 1.46 % 4 -- Append 2 string of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var1 << str_var2;_mean 1469 ns 1469 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_median 1446 ns 1446 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_stddev 155 ns 155 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_cv 10.55 % 10.55 % 10 -std::string str; ... str += str_var1 + str_var2;_mean 1346 ns 1346 ns 10 -std::string str; ... str += str_var1 + str_var2;_median 1343 ns 1343 ns 10 -std::string str; ... str += str_var1 + str_var2;_stddev 25.5 ns 25.5 ns 10 -std::string str; ... str += str_var1 + str_var2;_cv 1.90 % 1.90 % 10 -lstringa<16> str; ... str += str_var1 + str_var2;_mean 512 ns 512 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_median 514 ns 514 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_stddev 10.4 ns 10.4 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_cv 2.04 % 2.04 % 10 -lstringa<128> str; ... str += str_var1 + str_var2;_mean 442 ns 442 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_median 435 ns 435 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_stddev 24.9 ns 24.9 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_cv 5.63 % 5.63 % 10 -lstringa<512> str; ... str += str_var1 + str_var2;_mean 395 ns 395 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_median 386 ns 386 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_stddev 21.4 ns 21.4 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_cv 5.41 % 5.41 % 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_mean 338 ns 338 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_median 334 ns 334 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 24.6 ns 24.6 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_cv 7.28 % 7.28 % 10 +std::stringstream str; ... str << str_var1 << str_var2;_mean 1538 ns 1538 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_median 1580 ns 1580 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_stddev 99.5 ns 99.5 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_cv 6.47 % 6.47 % 4 +std::string str; ... str += str_var1 + str_var2;_mean 1325 ns 1325 ns 4 +std::string str; ... str += str_var1 + str_var2;_median 1320 ns 1320 ns 4 +std::string str; ... str += str_var1 + str_var2;_stddev 44.1 ns 44.1 ns 4 +std::string str; ... str += str_var1 + str_var2;_cv 3.33 % 3.33 % 4 +lstringa<16> str; ... str += str_var1 + str_var2;_mean 567 ns 567 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_median 562 ns 562 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_stddev 28.8 ns 28.8 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_cv 5.08 % 5.08 % 4 +lstringa<128> str; ... str += str_var1 + str_var2;_mean 479 ns 479 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_median 483 ns 483 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_stddev 60.5 ns 60.5 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_cv 12.63 % 12.63 % 4 +lstringa<512> str; ... str += str_var1 + str_var2;_mean 412 ns 412 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_median 408 ns 408 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_stddev 35.7 ns 35.7 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_cv 8.67 % 8.67 % 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_mean 315 ns 315 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_median 315 ns 315 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 4.60 ns 4.60 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.46 % 1.46 % 4 -- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; str << "test = " << k << " times";_mean 3041 ns 3041 ns 10 -std::stringstream str; str << "test = " << k << " times";_median 3025 ns 3025 ns 10 -std::stringstream str; str << "test = " << k << " times";_stddev 62.7 ns 62.7 ns 10 -std::stringstream str; str << "test = " << k << " times";_cv 2.06 % 2.06 % 10 -std::string str = "test = " + std::to_string(k) + " times";_mean 439 ns 439 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_median 438 ns 438 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_stddev 12.1 ns 12.1 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_cv 2.75 % 2.75 % 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1458 ns 1458 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1463 ns 1463 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 31.0 ns 31.0 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.13 % 2.13 % 10 -std::string str = std::format("test = {} times", k);_mean 1251 ns 1251 ns 10 -std::string str = std::format("test = {} times", k);_median 1239 ns 1239 ns 10 -std::string str = std::format("test = {} times", k);_stddev 40.8 ns 40.8 ns 10 -std::string str = std::format("test = {} times", k);_cv 3.27 % 3.27 % 10 -lstringa<8> str; str.format("test = {} times", k);_mean 1668 ns 1668 ns 10 -lstringa<8> str; str.format("test = {} times", k);_median 1655 ns 1655 ns 10 -lstringa<8> str; str.format("test = {} times", k);_stddev 40.6 ns 40.6 ns 10 -lstringa<8> str; str.format("test = {} times", k);_cv 2.43 % 2.43 % 10 -lstringa<32> str; str.format("test = {} times", k);_mean 1103 ns 1103 ns 10 -lstringa<32> str; str.format("test = {} times", k);_median 1085 ns 1085 ns 10 -lstringa<32> str; str.format("test = {} times", k);_stddev 84.2 ns 84.2 ns 10 -lstringa<32> str; str.format("test = {} times", k);_cv 7.64 % 7.64 % 10 -lstringa<8> str = "test = " + k + " times";_mean 313 ns 313 ns 10 -lstringa<8> str = "test = " + k + " times";_median 307 ns 307 ns 10 -lstringa<8> str = "test = " + k + " times";_stddev 20.2 ns 20.2 ns 10 -lstringa<8> str = "test = " + k + " times";_cv 6.44 % 6.44 % 10 -lstringa<32> str = "test = " + k + " times";_mean 148 ns 148 ns 10 -lstringa<32> str = "test = " + k + " times";_median 147 ns 147 ns 10 -lstringa<32> str = "test = " + k + " times";_stddev 4.11 ns 4.11 ns 10 -lstringa<32> str = "test = " + k + " times";_cv 2.77 % 2.77 % 10 -stringa str = "test = " + k + " times";_mean 162 ns 162 ns 10 -stringa str = "test = " + k + " times";_median 161 ns 161 ns 10 -stringa str = "test = " + k + " times";_stddev 4.77 ns 4.77 ns 10 -stringa str = "test = " + k + " times";_cv 2.94 % 2.94 % 10 +std::stringstream str; str << "test = " << k << " times";_mean 3323 ns 3323 ns 4 +std::stringstream str; str << "test = " << k << " times";_median 3341 ns 3341 ns 4 +std::stringstream str; str << "test = " << k << " times";_stddev 238 ns 238 ns 4 +std::stringstream str; str << "test = " << k << " times";_cv 7.17 % 7.17 % 4 +std::string str = "test = " + std::to_string(k) + " times";_mean 474 ns 474 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_median 471 ns 471 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_stddev 37.8 ns 37.8 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_cv 7.98 % 7.98 % 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1486 ns 1486 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1486 ns 1486 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 43.8 ns 43.8 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.95 % 2.95 % 4 +std::string str = std::format("test = {} times", k);_mean 1312 ns 1312 ns 4 +std::string str = std::format("test = {} times", k);_median 1318 ns 1318 ns 4 +std::string str = std::format("test = {} times", k);_stddev 16.7 ns 16.7 ns 4 +std::string str = std::format("test = {} times", k);_cv 1.27 % 1.27 % 4 +lstringa<8> str; str.format("test = {} times", k);_mean 1646 ns 1646 ns 4 +lstringa<8> str; str.format("test = {} times", k);_median 1639 ns 1639 ns 4 +lstringa<8> str; str.format("test = {} times", k);_stddev 22.4 ns 22.4 ns 4 +lstringa<8> str; str.format("test = {} times", k);_cv 1.36 % 1.36 % 4 +lstringa<32> str; str.format("test = {} times", k);_mean 1116 ns 1116 ns 4 +lstringa<32> str; str.format("test = {} times", k);_median 1111 ns 1111 ns 4 +lstringa<32> str; str.format("test = {} times", k);_stddev 23.8 ns 23.8 ns 4 +lstringa<32> str; str.format("test = {} times", k);_cv 2.13 % 2.13 % 4 +lstringa<8> str = "test = " + k + " times";_mean 301 ns 301 ns 4 +lstringa<8> str = "test = " + k + " times";_median 302 ns 302 ns 4 +lstringa<8> str = "test = " + k + " times";_stddev 4.54 ns 4.54 ns 4 +lstringa<8> str = "test = " + k + " times";_cv 1.51 % 1.51 % 4 +lstringa<32> str = "test = " + k + " times";_mean 146 ns 146 ns 4 +lstringa<32> str = "test = " + k + " times";_median 147 ns 147 ns 4 +lstringa<32> str = "test = " + k + " times";_stddev 3.21 ns 3.21 ns 4 +lstringa<32> str = "test = " + k + " times";_cv 2.19 % 2.19 % 4 +stringa str = "test = " + k + " times";_mean 163 ns 163 ns 4 +stringa str = "test = " + k + " times";_median 162 ns 162 ns 4 +stringa str = "test = " + k + " times";_stddev 1.98 ns 1.98 ns 4 +stringa str = "test = " + k + " times";_cv 1.22 % 1.22 % 4 -- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find + substr + std::strtol_mean 279 ns 279 ns 10 -std::string::find + substr + std::strtol_median 277 ns 277 ns 10 -std::string::find + substr + std::strtol_stddev 8.03 ns 8.03 ns 10 -std::string::find + substr + std::strtol_cv 2.88 % 2.88 % 10 -ssa::splitter + ssa::as_int_mean 144 ns 144 ns 10 -ssa::splitter + ssa::as_int_median 145 ns 145 ns 10 -ssa::splitter + ssa::as_int_stddev 10.2 ns 10.2 ns 10 -ssa::splitter + ssa::as_int_cv 7.08 % 7.08 % 10 -ssa::splitf + functor_mean 130 ns 130 ns 10 -ssa::splitf + functor_median 127 ns 127 ns 10 -ssa::splitf + functor_stddev 7.98 ns 7.98 ns 10 -ssa::splitf + functor_cv 6.14 % 6.14 % 10 +std::string::find + substr + std::strtol_mean 278 ns 278 ns 4 +std::string::find + substr + std::strtol_median 278 ns 278 ns 4 +std::string::find + substr + std::strtol_stddev 3.95 ns 3.95 ns 4 +std::string::find + substr + std::strtol_cv 1.42 % 1.42 % 4 +ssa::splitter + ssa::as_int_mean 139 ns 139 ns 4 +ssa::splitter + ssa::as_int_median 137 ns 137 ns 4 +ssa::splitter + ssa::as_int_stddev 5.52 ns 5.52 ns 4 +ssa::splitter + ssa::as_int_cv 3.98 % 3.98 % 4 +ssa::splitf + functor_mean 126 ns 126 ns 4 +ssa::splitf + functor_median 125 ns 125 ns 4 +ssa::splitf + functor_stddev 2.40 ns 2.40 ns 4 +ssa::splitf + functor_cv 1.90 % 1.90 % 4 -- Replace symbols in text ~400 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Naive (and wrong) replace symbols with std::string find + replace_mean 827 ns 827 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_median 828 ns 828 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_stddev 16.4 ns 16.4 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_cv 1.98 % 1.98 % 10 -replace symbols with std::string find_first_of + replace_mean 2391 ns 2391 ns 10 -replace symbols with std::string find_first_of + replace_median 2335 ns 2335 ns 10 -replace symbols with std::string find_first_of + replace_stddev 188 ns 188 ns 10 -replace symbols with std::string find_first_of + replace_cv 7.86 % 7.86 % 10 -replace symbols with std::string_view find_first_of + copy_mean 1089 ns 1089 ns 10 -replace symbols with std::string_view find_first_of + copy_median 1077 ns 1077 ns 10 -replace symbols with std::string_view find_first_of + copy_stddev 85.4 ns 85.4 ns 10 -replace symbols with std::string_view find_first_of + copy_cv 7.84 % 7.84 % 10 -replace runtime symbols with string expressions and without remembering all search results_mean 1478 ns 1478 ns 10 -replace runtime symbols with string expressions and without remembering all search results_median 1430 ns 1430 ns 10 -replace runtime symbols with string expressions and without remembering all search results_stddev 129 ns 129 ns 10 -replace runtime symbols with string expressions and without remembering all search results_cv 8.74 % 8.74 % 10 -replace runtime symbols with simstr and memorization of all search results_mean 1013 ns 1013 ns 10 -replace runtime symbols with simstr and memorization of all search results_median 1011 ns 1011 ns 10 -replace runtime symbols with simstr and memorization of all search results_stddev 15.1 ns 15.1 ns 10 -replace runtime symbols with simstr and memorization of all search results_cv 1.49 % 1.49 % 10 -replace const symbols with string expressions and without remembering all search results_mean 1247 ns 1247 ns 10 -replace const symbols with string expressions and without remembering all search results_median 1231 ns 1231 ns 10 -replace const symbols with string expressions and without remembering all search results_stddev 61.9 ns 61.9 ns 10 -replace const symbols with string expressions and without remembering all search results_cv 4.96 % 4.96 % 10 -replace const symbols with string expressions and memorization of all search results_mean 897 ns 897 ns 10 -replace const symbols with string expressions and memorization of all search results_median 870 ns 870 ns 10 -replace const symbols with string expressions and memorization of all search results_stddev 61.0 ns 61.0 ns 10 -replace const symbols with string expressions and memorization of all search results_cv 6.80 % 6.80 % 10 +Naive (and wrong) replace symbols with std::string find + replace_mean 826 ns 826 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_median 826 ns 826 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_stddev 8.57 ns 8.57 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_cv 1.04 % 1.04 % 4 +replace symbols with std::string find_first_of + replace_mean 2461 ns 2461 ns 4 +replace symbols with std::string find_first_of + replace_median 2474 ns 2474 ns 4 +replace symbols with std::string find_first_of + replace_stddev 42.3 ns 42.3 ns 4 +replace symbols with std::string find_first_of + replace_cv 1.72 % 1.72 % 4 +replace symbols with std::string_view find_first_of + copy_mean 1030 ns 1030 ns 4 +replace symbols with std::string_view find_first_of + copy_median 1026 ns 1026 ns 4 +replace symbols with std::string_view find_first_of + copy_stddev 20.6 ns 20.6 ns 4 +replace symbols with std::string_view find_first_of + copy_cv 2.00 % 2.00 % 4 +replace runtime symbols with string expressions and without remembering all search results_mean 1459 ns 1459 ns 4 +replace runtime symbols with string expressions and without remembering all search results_median 1421 ns 1421 ns 4 +replace runtime symbols with string expressions and without remembering all search results_stddev 87.5 ns 87.5 ns 4 +replace runtime symbols with string expressions and without remembering all search results_cv 6.00 % 6.00 % 4 +replace runtime symbols with simstr and memorization of all search results_mean 1014 ns 1014 ns 4 +replace runtime symbols with simstr and memorization of all search results_median 1020 ns 1020 ns 4 +replace runtime symbols with simstr and memorization of all search results_stddev 19.7 ns 19.7 ns 4 +replace runtime symbols with simstr and memorization of all search results_cv 1.94 % 1.94 % 4 +replace const symbols with string expressions and without remembering all search results_mean 1221 ns 1221 ns 4 +replace const symbols with string expressions and without remembering all search results_median 1220 ns 1220 ns 4 +replace const symbols with string expressions and without remembering all search results_stddev 7.67 ns 7.67 ns 4 +replace const symbols with string expressions and without remembering all search results_cv 0.63 % 0.63 % 4 +replace const symbols with string expressions and memorization of all search results_mean 855 ns 855 ns 4 +replace const symbols with string expressions and memorization of all search results_median 853 ns 853 ns 4 +replace const symbols with string expressions and memorization of all search results_stddev 13.8 ns 13.8 ns 4 +replace const symbols with string expressions and memorization of all search results_cv 1.62 % 1.62 % 4 -- Replace symbols in text ~40 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Short Naive (and wrong) replace symbols with std::string find + replace_mean 162 ns 162 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_median 161 ns 161 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_stddev 7.18 ns 7.18 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_cv 4.42 % 4.42 % 10 -Short replace symbols with std::string find_first_of + replace_mean 302 ns 302 ns 10 -Short replace symbols with std::string find_first_of + replace_median 302 ns 302 ns 10 -Short replace symbols with std::string find_first_of + replace_stddev 4.21 ns 4.21 ns 10 -Short replace symbols with std::string find_first_of + replace_cv 1.40 % 1.40 % 10 -Short replace symbols with std::string_view find_first_of + copy_mean 159 ns 159 ns 10 -Short replace symbols with std::string_view find_first_of + copy_median 159 ns 159 ns 10 -Short replace symbols with std::string_view find_first_of + copy_stddev 3.05 ns 3.05 ns 10 -Short replace symbols with std::string_view find_first_of + copy_cv 1.92 % 1.92 % 10 -Short replace runtime symbols with string expressions and without remembering all search results_mean 190 ns 190 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_median 188 ns 188 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_stddev 7.04 ns 7.04 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_cv 3.70 % 3.70 % 10 -Short replace runtime symbols with simstr and memorization of all search results_mean 196 ns 196 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_median 193 ns 193 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_stddev 6.63 ns 6.63 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_cv 3.39 % 3.39 % 10 -Short replace const symbols with string expressions and without remembering all search results_mean 162 ns 162 ns 10 -Short replace const symbols with string expressions and without remembering all search results_median 161 ns 161 ns 10 -Short replace const symbols with string expressions and without remembering all search results_stddev 1.96 ns 1.96 ns 10 -Short replace const symbols with string expressions and without remembering all search results_cv 1.21 % 1.21 % 10 -Short replace const symbols with string expressions and memorization of all search results_mean 165 ns 165 ns 10 -Short replace const symbols with string expressions and memorization of all search results_median 164 ns 164 ns 10 -Short replace const symbols with string expressions and memorization of all search results_stddev 4.58 ns 4.58 ns 10 -Short replace const symbols with string expressions and memorization of all search results_cv 2.77 % 2.77 % 10 +Short Naive (and wrong) replace symbols with std::string find + replace_mean 161 ns 161 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_median 159 ns 159 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_stddev 3.74 ns 3.74 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.33 % 2.33 % 4 +Short replace symbols with std::string find_first_of + replace_mean 353 ns 353 ns 4 +Short replace symbols with std::string find_first_of + replace_median 344 ns 344 ns 4 +Short replace symbols with std::string find_first_of + replace_stddev 22.3 ns 22.3 ns 4 +Short replace symbols with std::string find_first_of + replace_cv 6.32 % 6.32 % 4 +Short replace symbols with std::string_view find_first_of + copy_mean 171 ns 171 ns 4 +Short replace symbols with std::string_view find_first_of + copy_median 170 ns 170 ns 4 +Short replace symbols with std::string_view find_first_of + copy_stddev 4.52 ns 4.52 ns 4 +Short replace symbols with std::string_view find_first_of + copy_cv 2.65 % 2.65 % 4 +Short replace runtime symbols with string expressions and without remembering all search results_mean 192 ns 192 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_median 192 ns 192 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_stddev 3.58 ns 3.58 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_cv 1.86 % 1.86 % 4 +Short replace runtime symbols with simstr and memorization of all search results_mean 195 ns 195 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_median 192 ns 192 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_stddev 13.9 ns 13.9 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_cv 7.14 % 7.14 % 4 +Short replace const symbols with string expressions and without remembering all search results_mean 178 ns 178 ns 4 +Short replace const symbols with string expressions and without remembering all search results_median 172 ns 172 ns 4 +Short replace const symbols with string expressions and without remembering all search results_stddev 15.9 ns 15.9 ns 4 +Short replace const symbols with string expressions and without remembering all search results_cv 8.97 % 8.97 % 4 +Short replace const symbols with string expressions and memorization of all search results_mean 181 ns 181 ns 4 +Short replace const symbols with string expressions and memorization of all search results_median 180 ns 180 ns 4 +Short replace const symbols with string expressions and memorization of all search results_stddev 22.7 ns 22.7 ns 4 +Short replace const symbols with string expressions and memorization of all search results_cv 12.58 % 12.58 % 4 ----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to ---- in std::string|64_mean 174 ns 174 ns 10 -replace bb to ---- in std::string|64_median 168 ns 168 ns 10 -replace bb to ---- in std::string|64_stddev 18.8 ns 18.8 ns 10 -replace bb to ---- in std::string|64_cv 10.80 % 10.80 % 10 -replace bb to ---- in std::string|256_mean 524 ns 524 ns 10 -replace bb to ---- in std::string|256_median 499 ns 499 ns 10 -replace bb to ---- in std::string|256_stddev 49.1 ns 49.1 ns 10 -replace bb to ---- in std::string|256_cv 9.36 % 9.36 % 10 -replace bb to ---- in std::string|512_mean 949 ns 949 ns 10 -replace bb to ---- in std::string|512_median 945 ns 945 ns 10 -replace bb to ---- in std::string|512_stddev 28.0 ns 28.0 ns 10 -replace bb to ---- in std::string|512_cv 2.95 % 2.95 % 10 -replace bb to ---- in std::string|1024_mean 2201 ns 2201 ns 10 -replace bb to ---- in std::string|1024_median 2211 ns 2211 ns 10 -replace bb to ---- in std::string|1024_stddev 54.2 ns 54.2 ns 10 -replace bb to ---- in std::string|1024_cv 2.46 % 2.46 % 10 -replace bb to ---- in std::string|2048_mean 5758 ns 5758 ns 10 -replace bb to ---- in std::string|2048_median 5680 ns 5680 ns 10 -replace bb to ---- in std::string|2048_stddev 271 ns 271 ns 10 -replace bb to ---- in std::string|2048_cv 4.71 % 4.71 % 10 -replace bb to ---- in lstringa<8>|64_mean 156 ns 156 ns 10 -replace bb to ---- in lstringa<8>|64_median 153 ns 153 ns 10 -replace bb to ---- in lstringa<8>|64_stddev 6.50 ns 6.50 ns 10 -replace bb to ---- in lstringa<8>|64_cv 4.18 % 4.18 % 10 -replace bb to ---- in lstringa<8>|256_mean 493 ns 493 ns 10 -replace bb to ---- in lstringa<8>|256_median 488 ns 488 ns 10 -replace bb to ---- in lstringa<8>|256_stddev 18.6 ns 18.6 ns 10 -replace bb to ---- in lstringa<8>|256_cv 3.77 % 3.77 % 10 -replace bb to ---- in lstringa<8>|512_mean 979 ns 979 ns 10 -replace bb to ---- in lstringa<8>|512_median 937 ns 937 ns 10 -replace bb to ---- in lstringa<8>|512_stddev 94.5 ns 94.5 ns 10 -replace bb to ---- in lstringa<8>|512_cv 9.65 % 9.65 % 10 -replace bb to ---- in lstringa<8>|1024_mean 1881 ns 1881 ns 10 -replace bb to ---- in lstringa<8>|1024_median 1870 ns 1870 ns 10 -replace bb to ---- in lstringa<8>|1024_stddev 78.3 ns 78.3 ns 10 -replace bb to ---- in lstringa<8>|1024_cv 4.16 % 4.16 % 10 -replace bb to ---- in lstringa<8>|2048_mean 3456 ns 3456 ns 10 -replace bb to ---- in lstringa<8>|2048_median 3432 ns 3432 ns 10 -replace bb to ---- in lstringa<8>|2048_stddev 169 ns 169 ns 10 -replace bb to ---- in lstringa<8>|2048_cv 4.89 % 4.89 % 10 -replace bb to ---- by init stringa|64_mean 100.0 ns 100.0 ns 10 -replace bb to ---- by init stringa|64_median 99.1 ns 99.1 ns 10 -replace bb to ---- by init stringa|64_stddev 3.23 ns 3.23 ns 10 -replace bb to ---- by init stringa|64_cv 3.23 % 3.23 % 10 -replace bb to ---- by init stringa|256_mean 306 ns 306 ns 10 -replace bb to ---- by init stringa|256_median 303 ns 303 ns 10 -replace bb to ---- by init stringa|256_stddev 11.3 ns 11.3 ns 10 -replace bb to ---- by init stringa|256_cv 3.69 % 3.69 % 10 -replace bb to ---- by init stringa|512_mean 728 ns 728 ns 10 -replace bb to ---- by init stringa|512_median 726 ns 726 ns 10 -replace bb to ---- by init stringa|512_stddev 12.7 ns 12.7 ns 10 -replace bb to ---- by init stringa|512_cv 1.75 % 1.75 % 10 -replace bb to ---- by init stringa|1024_mean 1640 ns 1640 ns 10 -replace bb to ---- by init stringa|1024_median 1625 ns 1625 ns 10 -replace bb to ---- by init stringa|1024_stddev 48.9 ns 48.9 ns 10 -replace bb to ---- by init stringa|1024_cv 2.98 % 2.98 % 10 -replace bb to ---- by init stringa|2048_mean 3320 ns 3320 ns 10 -replace bb to ---- by init stringa|2048_median 3316 ns 3316 ns 10 -replace bb to ---- by init stringa|2048_stddev 60.1 ns 60.1 ns 10 -replace bb to ---- by init stringa|2048_cv 1.81 % 1.81 % 10 +replace bb to ---- in std::string|64_mean 183 ns 183 ns 4 +replace bb to ---- in std::string|64_median 166 ns 166 ns 4 +replace bb to ---- in std::string|64_stddev 40.4 ns 40.4 ns 4 +replace bb to ---- in std::string|64_cv 22.11 % 22.11 % 4 +replace bb to ---- in std::string|256_mean 499 ns 499 ns 4 +replace bb to ---- in std::string|256_median 498 ns 498 ns 4 +replace bb to ---- in std::string|256_stddev 10.6 ns 10.6 ns 4 +replace bb to ---- in std::string|256_cv 2.13 % 2.13 % 4 +replace bb to ---- in std::string|512_mean 1012 ns 1012 ns 4 +replace bb to ---- in std::string|512_median 1019 ns 1019 ns 4 +replace bb to ---- in std::string|512_stddev 61.5 ns 61.5 ns 4 +replace bb to ---- in std::string|512_cv 6.08 % 6.08 % 4 +replace bb to ---- in std::string|1024_mean 2304 ns 2304 ns 4 +replace bb to ---- in std::string|1024_median 2267 ns 2267 ns 4 +replace bb to ---- in std::string|1024_stddev 192 ns 192 ns 4 +replace bb to ---- in std::string|1024_cv 8.32 % 8.32 % 4 +replace bb to ---- in std::string|2048_mean 5796 ns 5796 ns 4 +replace bb to ---- in std::string|2048_median 5843 ns 5843 ns 4 +replace bb to ---- in std::string|2048_stddev 149 ns 149 ns 4 +replace bb to ---- in std::string|2048_cv 2.58 % 2.58 % 4 +replace bb to ---- in lstringa<8>|64_mean 154 ns 154 ns 4 +replace bb to ---- in lstringa<8>|64_median 153 ns 153 ns 4 +replace bb to ---- in lstringa<8>|64_stddev 2.02 ns 2.02 ns 4 +replace bb to ---- in lstringa<8>|64_cv 1.32 % 1.32 % 4 +replace bb to ---- in lstringa<8>|256_mean 484 ns 484 ns 4 +replace bb to ---- in lstringa<8>|256_median 483 ns 483 ns 4 +replace bb to ---- in lstringa<8>|256_stddev 2.28 ns 2.28 ns 4 +replace bb to ---- in lstringa<8>|256_cv 0.47 % 0.47 % 4 +replace bb to ---- in lstringa<8>|512_mean 886 ns 886 ns 4 +replace bb to ---- in lstringa<8>|512_median 889 ns 889 ns 4 +replace bb to ---- in lstringa<8>|512_stddev 13.6 ns 13.6 ns 4 +replace bb to ---- in lstringa<8>|512_cv 1.54 % 1.54 % 4 +replace bb to ---- in lstringa<8>|1024_mean 1917 ns 1917 ns 4 +replace bb to ---- in lstringa<8>|1024_median 1909 ns 1909 ns 4 +replace bb to ---- in lstringa<8>|1024_stddev 69.2 ns 69.2 ns 4 +replace bb to ---- in lstringa<8>|1024_cv 3.61 % 3.61 % 4 +replace bb to ---- in lstringa<8>|2048_mean 3636 ns 3636 ns 4 +replace bb to ---- in lstringa<8>|2048_median 3504 ns 3504 ns 4 +replace bb to ---- in lstringa<8>|2048_stddev 298 ns 298 ns 4 +replace bb to ---- in lstringa<8>|2048_cv 8.20 % 8.20 % 4 +replace bb to ---- by init stringa|64_mean 99.5 ns 99.5 ns 4 +replace bb to ---- by init stringa|64_median 99.1 ns 99.1 ns 4 +replace bb to ---- by init stringa|64_stddev 2.32 ns 2.32 ns 4 +replace bb to ---- by init stringa|64_cv 2.33 % 2.33 % 4 +replace bb to ---- by init stringa|256_mean 297 ns 297 ns 4 +replace bb to ---- by init stringa|256_median 298 ns 298 ns 4 +replace bb to ---- by init stringa|256_stddev 4.13 ns 4.13 ns 4 +replace bb to ---- by init stringa|256_cv 1.39 % 1.39 % 4 +replace bb to ---- by init stringa|512_mean 717 ns 717 ns 4 +replace bb to ---- by init stringa|512_median 718 ns 718 ns 4 +replace bb to ---- by init stringa|512_stddev 5.27 ns 5.27 ns 4 +replace bb to ---- by init stringa|512_cv 0.73 % 0.73 % 4 +replace bb to ---- by init stringa|1024_mean 1663 ns 1663 ns 4 +replace bb to ---- by init stringa|1024_median 1655 ns 1655 ns 4 +replace bb to ---- by init stringa|1024_stddev 52.2 ns 52.2 ns 4 +replace bb to ---- by init stringa|1024_cv 3.14 % 3.14 % 4 +replace bb to ---- by init stringa|2048_mean 3325 ns 3325 ns 4 +replace bb to ---- by init stringa|2048_median 3327 ns 3327 ns 4 +replace bb to ---- by init stringa|2048_stddev 75.7 ns 75.7 ns 4 +replace bb to ---- by init stringa|2048_cv 2.28 % 2.28 % 4 ----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to -- in std::string|64_mean 123 ns 123 ns 10 -replace bb to -- in std::string|64_median 123 ns 123 ns 10 -replace bb to -- in std::string|64_stddev 2.21 ns 2.21 ns 10 -replace bb to -- in std::string|64_cv 1.80 % 1.80 % 10 -replace bb to -- in std::string|256_mean 369 ns 369 ns 10 -replace bb to -- in std::string|256_median 367 ns 367 ns 10 -replace bb to -- in std::string|256_stddev 14.4 ns 14.4 ns 10 -replace bb to -- in std::string|256_cv 3.90 % 3.90 % 10 -replace bb to -- in std::string|512_mean 758 ns 758 ns 10 -replace bb to -- in std::string|512_median 757 ns 757 ns 10 -replace bb to -- in std::string|512_stddev 12.1 ns 12.1 ns 10 -replace bb to -- in std::string|512_cv 1.59 % 1.59 % 10 -replace bb to -- in std::string|1024_mean 1475 ns 1475 ns 10 -replace bb to -- in std::string|1024_median 1486 ns 1486 ns 10 -replace bb to -- in std::string|1024_stddev 74.8 ns 74.8 ns 10 -replace bb to -- in std::string|1024_cv 5.07 % 5.07 % 10 -replace bb to -- in std::string|2048_mean 2805 ns 2805 ns 10 -replace bb to -- in std::string|2048_median 2795 ns 2795 ns 10 -replace bb to -- in std::string|2048_stddev 55.6 ns 55.6 ns 10 -replace bb to -- in std::string|2048_cv 1.98 % 1.98 % 10 -replace bb to -- in lstringa<8>|64_mean 98.2 ns 98.2 ns 10 -replace bb to -- in lstringa<8>|64_median 98.3 ns 98.3 ns 10 -replace bb to -- in lstringa<8>|64_stddev 1.72 ns 1.72 ns 10 -replace bb to -- in lstringa<8>|64_cv 1.75 % 1.75 % 10 -replace bb to -- in lstringa<8>|256_mean 296 ns 296 ns 10 -replace bb to -- in lstringa<8>|256_median 293 ns 293 ns 10 -replace bb to -- in lstringa<8>|256_stddev 9.44 ns 9.44 ns 10 -replace bb to -- in lstringa<8>|256_cv 3.19 % 3.19 % 10 -replace bb to -- in lstringa<8>|512_mean 579 ns 579 ns 10 -replace bb to -- in lstringa<8>|512_median 564 ns 564 ns 10 -replace bb to -- in lstringa<8>|512_stddev 31.0 ns 31.0 ns 10 -replace bb to -- in lstringa<8>|512_cv 5.35 % 5.35 % 10 -replace bb to -- in lstringa<8>|1024_mean 1109 ns 1109 ns 10 -replace bb to -- in lstringa<8>|1024_median 1105 ns 1105 ns 10 -replace bb to -- in lstringa<8>|1024_stddev 35.4 ns 35.4 ns 10 -replace bb to -- in lstringa<8>|1024_cv 3.20 % 3.20 % 10 -replace bb to -- in lstringa<8>|2048_mean 2138 ns 2139 ns 10 -replace bb to -- in lstringa<8>|2048_median 2075 ns 2075 ns 10 -replace bb to -- in lstringa<8>|2048_stddev 172 ns 172 ns 10 -replace bb to -- in lstringa<8>|2048_cv 8.04 % 8.04 % 10 -replace bb to -- by init stringa|64_mean 96.7 ns 96.7 ns 10 -replace bb to -- by init stringa|64_median 96.1 ns 96.1 ns 10 -replace bb to -- by init stringa|64_stddev 2.88 ns 2.88 ns 10 -replace bb to -- by init stringa|64_cv 2.98 % 2.98 % 10 -replace bb to -- by init stringa|256_mean 279 ns 279 ns 10 -replace bb to -- by init stringa|256_median 279 ns 279 ns 10 -replace bb to -- by init stringa|256_stddev 2.87 ns 2.87 ns 10 -replace bb to -- by init stringa|256_cv 1.03 % 1.03 % 10 -replace bb to -- by init stringa|512_mean 521 ns 521 ns 10 -replace bb to -- by init stringa|512_median 518 ns 518 ns 10 -replace bb to -- by init stringa|512_stddev 8.19 ns 8.19 ns 10 -replace bb to -- by init stringa|512_cv 1.57 % 1.57 % 10 -replace bb to -- by init stringa|1024_mean 1034 ns 1034 ns 10 -replace bb to -- by init stringa|1024_median 1025 ns 1025 ns 10 -replace bb to -- by init stringa|1024_stddev 35.1 ns 35.1 ns 10 -replace bb to -- by init stringa|1024_cv 3.39 % 3.39 % 10 -replace bb to -- by init stringa|2048_mean 1964 ns 1964 ns 10 -replace bb to -- by init stringa|2048_median 1946 ns 1946 ns 10 -replace bb to -- by init stringa|2048_stddev 62.7 ns 62.7 ns 10 -replace bb to -- by init stringa|2048_cv 3.19 % 3.19 % 10 +replace bb to -- in std::string|64_mean 123 ns 123 ns 4 +replace bb to -- in std::string|64_median 122 ns 122 ns 4 +replace bb to -- in std::string|64_stddev 3.75 ns 3.75 ns 4 +replace bb to -- in std::string|64_cv 3.05 % 3.05 % 4 +replace bb to -- in std::string|256_mean 383 ns 383 ns 4 +replace bb to -- in std::string|256_median 383 ns 383 ns 4 +replace bb to -- in std::string|256_stddev 10.1 ns 10.1 ns 4 +replace bb to -- in std::string|256_cv 2.63 % 2.63 % 4 +replace bb to -- in std::string|512_mean 719 ns 719 ns 4 +replace bb to -- in std::string|512_median 718 ns 718 ns 4 +replace bb to -- in std::string|512_stddev 19.5 ns 19.5 ns 4 +replace bb to -- in std::string|512_cv 2.71 % 2.71 % 4 +replace bb to -- in std::string|1024_mean 1415 ns 1415 ns 4 +replace bb to -- in std::string|1024_median 1414 ns 1414 ns 4 +replace bb to -- in std::string|1024_stddev 19.6 ns 19.6 ns 4 +replace bb to -- in std::string|1024_cv 1.39 % 1.39 % 4 +replace bb to -- in std::string|2048_mean 2838 ns 2838 ns 4 +replace bb to -- in std::string|2048_median 2838 ns 2838 ns 4 +replace bb to -- in std::string|2048_stddev 60.4 ns 60.4 ns 4 +replace bb to -- in std::string|2048_cv 2.13 % 2.13 % 4 +replace bb to -- in lstringa<8>|64_mean 102 ns 102 ns 4 +replace bb to -- in lstringa<8>|64_median 103 ns 103 ns 4 +replace bb to -- in lstringa<8>|64_stddev 2.22 ns 2.22 ns 4 +replace bb to -- in lstringa<8>|64_cv 2.18 % 2.18 % 4 +replace bb to -- in lstringa<8>|256_mean 300 ns 300 ns 4 +replace bb to -- in lstringa<8>|256_median 299 ns 299 ns 4 +replace bb to -- in lstringa<8>|256_stddev 6.91 ns 6.91 ns 4 +replace bb to -- in lstringa<8>|256_cv 2.31 % 2.31 % 4 +replace bb to -- in lstringa<8>|512_mean 562 ns 562 ns 4 +replace bb to -- in lstringa<8>|512_median 547 ns 547 ns 4 +replace bb to -- in lstringa<8>|512_stddev 39.7 ns 39.7 ns 4 +replace bb to -- in lstringa<8>|512_cv 7.06 % 7.06 % 4 +replace bb to -- in lstringa<8>|1024_mean 1116 ns 1116 ns 4 +replace bb to -- in lstringa<8>|1024_median 1111 ns 1111 ns 4 +replace bb to -- in lstringa<8>|1024_stddev 26.2 ns 26.2 ns 4 +replace bb to -- in lstringa<8>|1024_cv 2.35 % 2.35 % 4 +replace bb to -- in lstringa<8>|2048_mean 2185 ns 2185 ns 4 +replace bb to -- in lstringa<8>|2048_median 2121 ns 2121 ns 4 +replace bb to -- in lstringa<8>|2048_stddev 153 ns 153 ns 4 +replace bb to -- in lstringa<8>|2048_cv 6.99 % 6.99 % 4 +replace bb to -- by init stringa|64_mean 97.1 ns 97.1 ns 4 +replace bb to -- by init stringa|64_median 97.0 ns 97.0 ns 4 +replace bb to -- by init stringa|64_stddev 0.731 ns 0.731 ns 4 +replace bb to -- by init stringa|64_cv 0.75 % 0.75 % 4 +replace bb to -- by init stringa|256_mean 274 ns 274 ns 4 +replace bb to -- by init stringa|256_median 267 ns 267 ns 4 +replace bb to -- by init stringa|256_stddev 15.1 ns 15.1 ns 4 +replace bb to -- by init stringa|256_cv 5.53 % 5.53 % 4 +replace bb to -- by init stringa|512_mean 544 ns 544 ns 4 +replace bb to -- by init stringa|512_median 538 ns 538 ns 4 +replace bb to -- by init stringa|512_stddev 47.8 ns 47.8 ns 4 +replace bb to -- by init stringa|512_cv 8.79 % 8.79 % 4 +replace bb to -- by init stringa|1024_mean 1481 ns 1481 ns 4 +replace bb to -- by init stringa|1024_median 1468 ns 1468 ns 4 +replace bb to -- by init stringa|1024_stddev 49.7 ns 49.7 ns 4 +replace bb to -- by init stringa|1024_cv 3.36 % 3.36 % 4 +replace bb to -- by init stringa|2048_mean 2397 ns 2397 ns 4 +replace bb to -- by init stringa|2048_median 2334 ns 2334 ns 4 +replace bb to -- by init stringa|2048_stddev 504 ns 504 ns 4 +replace bb to -- by init stringa|2048_cv 21.02 % 21.02 % 4 ----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -hashStrMapA emplace & find stringa;_mean 3720534 ns 3720548 ns 10 -hashStrMapA emplace & find stringa;_median 3693681 ns 3693692 ns 10 -hashStrMapA emplace & find stringa;_stddev 83091 ns 83091 ns 10 -hashStrMapA emplace & find stringa;_cv 2.23 % 2.23 % 10 -std::unordered_map emplace & find std::string;_mean 3566994 ns 3567006 ns 10 -std::unordered_map emplace & find std::string;_median 3549509 ns 3549523 ns 10 -std::unordered_map emplace & find std::string;_stddev 96378 ns 96376 ns 10 -std::unordered_map emplace & find std::string;_cv 2.70 % 2.70 % 10 -hashStrMapA emplace & find ssa;_mean 3767835 ns 3767848 ns 10 -hashStrMapA emplace & find ssa;_median 3720436 ns 3720451 ns 10 -hashStrMapA emplace & find ssa;_stddev 138770 ns 138769 ns 10 -hashStrMapA emplace & find ssa;_cv 3.68 % 3.68 % 10 -std::unordered_map emplace & find std::string_view;_mean 4195628 ns 4195640 ns 10 -std::unordered_map emplace & find std::string_view;_median 4120244 ns 4120262 ns 10 -std::unordered_map emplace & find std::string_view;_stddev 303735 ns 303734 ns 10 -std::unordered_map emplace & find std::string_view;_cv 7.24 % 7.24 % 10 +hashStrMapA emplace & find stringa;_mean 3640422 ns 3640436 ns 4 +hashStrMapA emplace & find stringa;_median 3644936 ns 3644950 ns 4 +hashStrMapA emplace & find stringa;_stddev 32127 ns 32126 ns 4 +hashStrMapA emplace & find stringa;_cv 0.88 % 0.88 % 4 +std::unordered_map emplace & find std::string;_mean 3537855 ns 3537865 ns 4 +std::unordered_map emplace & find std::string;_median 3520687 ns 3520696 ns 4 +std::unordered_map emplace & find std::string;_stddev 63067 ns 63067 ns 4 +std::unordered_map emplace & find std::string;_cv 1.78 % 1.78 % 4 +hashStrMapA emplace & find ssa;_mean 3721221 ns 3721234 ns 4 +hashStrMapA emplace & find ssa;_median 3723511 ns 3723522 ns 4 +hashStrMapA emplace & find ssa;_stddev 46546 ns 46546 ns 4 +hashStrMapA emplace & find ssa;_cv 1.25 % 1.25 % 4 +std::unordered_map emplace & find std::string_view;_mean 3973701 ns 3973710 ns 4 +std::unordered_map emplace & find std::string_view;_median 3959340 ns 3959349 ns 4 +std::unordered_map emplace & find std::string_view;_stddev 117238 ns 117239 ns 4 +std::unordered_map emplace & find std::string_view;_cv 2.95 % 2.95 % 4 ----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Build func full name std::string;_mean 1049 ns 1049 ns 10 -Build func full name std::string;_median 1024 ns 1024 ns 10 -Build func full name std::string;_stddev 123 ns 123 ns 10 -Build func full name std::string;_cv 11.68 % 11.68 % 10 -Build func full name std::string 1;_mean 1016 ns 1016 ns 10 -Build func full name std::string 1;_median 1013 ns 1013 ns 10 -Build func full name std::string 1;_stddev 19.8 ns 19.8 ns 10 -Build func full name std::string 1;_cv 1.95 % 1.95 % 10 -Build func full name std::stream;_mean 2568 ns 2568 ns 10 -Build func full name std::stream;_median 2537 ns 2537 ns 10 -Build func full name std::stream;_stddev 90.0 ns 90.0 ns 10 -Build func full name std::stream;_cv 3.50 % 3.50 % 10 -Build func full name stringa;_mean 460 ns 460 ns 10 -Build func full name stringa;_median 458 ns 458 ns 10 -Build func full name stringa;_stddev 14.4 ns 14.4 ns 10 -Build func full name stringa;_cv 3.14 % 3.14 % 10 -Build func full name stringa 1;_mean 682 ns 682 ns 10 -Build func full name stringa 1;_median 673 ns 673 ns 10 -Build func full name stringa 1;_stddev 26.1 ns 26.1 ns 10 -Build func full name stringa 1;_cv 3.84 % 3.84 % 10 +Build func full name std::string;_mean 916 ns 916 ns 4 +Build func full name std::string;_median 910 ns 910 ns 4 +Build func full name std::string;_stddev 21.5 ns 21.5 ns 4 +Build func full name std::string;_cv 2.35 % 2.35 % 4 +Build func full name std::string 1;_mean 1081 ns 1081 ns 4 +Build func full name std::string 1;_median 1017 ns 1017 ns 4 +Build func full name std::string 1;_stddev 134 ns 134 ns 4 +Build func full name std::string 1;_cv 12.40 % 12.40 % 4 +Build func full name std::stream;_mean 2581 ns 2581 ns 4 +Build func full name std::stream;_median 2562 ns 2562 ns 4 +Build func full name std::stream;_stddev 61.9 ns 61.9 ns 4 +Build func full name std::stream;_cv 2.40 % 2.40 % 4 +Build func full name stringa;_mean 478 ns 478 ns 4 +Build func full name stringa;_median 479 ns 479 ns 4 +Build func full name stringa;_stddev 29.9 ns 29.9 ns 4 +Build func full name stringa;_cv 6.25 % 6.25 % 4 +Build func full name stringa 1;_mean 710 ns 710 ns 4 +Build func full name stringa 1;_median 705 ns 705 ns 4 +Build func full name stringa 1;_stddev 31.5 ns 31.5 ns 4 +Build func full name stringa 1;_cv 4.44 % 4.44 % 4 diff --git a/bench/results/002-Xeon E5-2682 v4, Windows 10, Clang-19.txt b/bench/results/002-Xeon E5-2682 v4, Windows 10, Clang-19.txt index 64ea4a7..aa72af0 100644 --- a/bench/results/002-Xeon E5-2682 v4, Windows 10, Clang-19.txt +++ b/bench/results/002-Xeon E5-2682 v4, Windows 10, Clang-19.txt @@ -1,4 +1,8 @@ -2026-01-31T14:22:37+03:00 +Benchmarks of simstr, version 1.6.3 +Sources: https://github.com/orefkov/simstr +Results: https://orefkov.github.io/simstr/results.html + +2026-02-03T16:39:37+03:00 Running benchStr.exe Run on (32 X 2494 MHz CPU s) CPU Caches: @@ -10,891 +14,908 @@ CPU Caches: Benchmark Time CPU Iterations -------------------------------------------------------------------------------------------------------------------------------------------------------- ----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and number by std to std::string_mean 268 ns 267 ns 10 -Concat std::string and number by std to std::string_median 265 ns 264 ns 10 -Concat std::string and number by std to std::string_stddev 15.6 ns 17.1 ns 10 -Concat std::string and number by std to std::string_cv 5.82 % 6.38 % 10 -Concat std::string and number by StrExpr to std::string_mean 154 ns 154 ns 10 -Concat std::string and number by StrExpr to std::string_median 153 ns 154 ns 10 -Concat std::string and number by StrExpr to std::string_stddev 2.54 ns 3.31 ns 10 -Concat std::string and number by StrExpr to std::string_cv 1.65 % 2.15 % 10 -Concat stringa and number by StrExpr to simstr::stringa_mean 66.0 ns 65.7 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_median 66.2 ns 66.3 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_stddev 0.935 ns 1.18 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_cv 1.42 % 1.79 % 10 -Concat stringa and number by e_concat to simstr::stringa_mean 76.6 ns 76.5 ns 10 -Concat stringa and number by e_concat to simstr::stringa_median 75.3 ns 75.3 ns 10 -Concat stringa and number by e_concat to simstr::stringa_stddev 4.88 ns 4.30 ns 10 -Concat stringa and number by e_concat to simstr::stringa_cv 6.38 % 5.63 % 10 +Concat std::string and number by std to std::string_mean 266 ns 265 ns 4 +Concat std::string and number by std to std::string_median 266 ns 264 ns 4 +Concat std::string and number by std to std::string_stddev 2.52 ns 3.14 ns 4 +Concat std::string and number by std to std::string_cv 0.95 % 1.18 % 4 +Concat std::string and number by StrExpr to std::string_mean 159 ns 159 ns 4 +Concat std::string and number by StrExpr to std::string_median 157 ns 157 ns 4 +Concat std::string and number by StrExpr to std::string_stddev 11.1 ns 9.23 ns 4 +Concat std::string and number by StrExpr to std::string_cv 6.95 % 5.81 % 4 +Concat stringa and number by StrExpr to simstr::stringa_mean 67.5 ns 67.5 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_median 67.1 ns 67.0 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_stddev 1.68 ns 1.05 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_cv 2.48 % 1.55 % 4 +Concat stringa and number by e_concat to simstr::stringa_mean 75.4 ns 75.4 ns 4 +Concat stringa and number by e_concat to simstr::stringa_median 73.8 ns 74.1 ns 4 +Concat stringa and number by e_concat to simstr::stringa_stddev 3.63 ns 3.30 ns 4 +Concat stringa and number by e_concat to simstr::stringa_cv 4.82 % 4.38 % 4 ----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and format hex number and literal to std::string_mean 741 ns 732 ns 10 -Concat std::string and format hex number and literal to std::string_median 728 ns 732 ns 10 -Concat std::string and format hex number and literal to std::string_stddev 53.2 ns 38.2 ns 10 -Concat std::string and format hex number and literal to std::string_cv 7.18 % 5.22 % 10 -std::format std::string and hex number by literal to std::string_mean 1538 ns 1534 ns 10 -std::format std::string and hex number by literal to std::string_median 1519 ns 1497 ns 10 -std::format std::string and hex number by literal to std::string_stddev 67.1 ns 78.0 ns 10 -std::format std::string and hex number by literal to std::string_cv 4.36 % 5.09 % 10 -Concat std::string and std::tochars and string to std::string_mean 195 ns 195 ns 10 -Concat std::string and std::tochars and string to std::string_median 192 ns 193 ns 10 -Concat std::string and std::tochars and string to std::string_stddev 10.2 ns 9.91 ns 10 -Concat std::string and std::tochars and string to std::string_cv 5.20 % 5.09 % 10 -Concat std::string and hex number and literal by StrExpr to std::string_mean 80.1 ns 80.0 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_median 79.4 ns 78.5 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_stddev 3.41 ns 3.90 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_cv 4.25 % 4.87 % 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 72.4 ns 72.0 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 71.3 ns 71.1 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 2.06 ns 2.48 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 2.84 % 3.44 % 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 87.1 ns 87.0 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_median 85.6 ns 84.6 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 8.19 ns 8.52 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 9.40 % 9.79 % 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_mean 149 ns 148 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_median 147 ns 148 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 4.57 ns 5.69 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_cv 3.08 % 3.84 % 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 263 ns 264 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 264 ns 264 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 3.37 ns 3.12 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.28 % 1.18 % 10 +Concat std::string and format hex number and literal to std::string_mean 731 ns 728 ns 4 +Concat std::string and format hex number and literal to std::string_median 731 ns 724 ns 4 +Concat std::string and format hex number and literal to std::string_stddev 12.3 ns 16.7 ns 4 +Concat std::string and format hex number and literal to std::string_cv 1.68 % 2.29 % 4 +std::format std::string and hex number by literal to std::string_mean 1524 ns 1526 ns 4 +std::format std::string and hex number by literal to std::string_median 1486 ns 1482 ns 4 +std::format std::string and hex number by literal to std::string_stddev 108 ns 125 ns 4 +std::format std::string and hex number by literal to std::string_cv 7.11 % 8.21 % 4 +Concat std::string and std::to_chars and string to std::string_mean 191 ns 190 ns 4 +Concat std::string and std::to_chars and string to std::string_median 192 ns 188 ns 4 +Concat std::string and std::to_chars and string to std::string_stddev 3.67 ns 4.19 ns 4 +Concat std::string and std::to_chars and string to std::string_cv 1.92 % 2.20 % 4 +Concat std::string and hex number and literal by StrExpr to std::string_mean 80.0 ns 79.8 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_median 79.1 ns 78.5 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_stddev 2.50 ns 2.62 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_cv 3.13 % 3.28 % 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 75.0 ns 74.6 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 74.2 ns 73.9 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 5.57 ns 6.19 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 7.42 % 8.29 % 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 80.4 ns 80.7 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_median 80.9 ns 81.1 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 1.25 ns 1.67 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.56 % 2.07 % 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_mean 148 ns 148 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_median 147 ns 148 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 4.28 ns 4.71 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_cv 2.88 % 3.17 % 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 295 ns 295 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 294 ns 295 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 2.85 ns 5.13 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 0.97 % 1.74 % 4 +----- format/vformat and subst/vsubst octal number ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_mean 162 ns 162 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_median 156 ns 157 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_stddev 13.8 ns 12.9 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_cv 8.48 % 7.95 % 4 +std::format("art {:#010o} end", i)_mean 1369 ns 1374 ns 4 +std::format("art {:#010o} end", i)_median 1369 ns 1367 ns 4 +std::format("art {:#010o} end", i)_stddev 35.8 ns 41.9 ns 4 +std::format("art {:#010o} end", i)_cv 2.62 % 3.05 % 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_mean 305 ns 307 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_median 304 ns 309 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_stddev 6.35 ns 7.68 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_cv 2.08 % 2.50 % 4 +std::vformat(pattern, std::make_format_args(i))_mean 1373 ns 1374 ns 4 +std::vformat(pattern, std::make_format_args(i))_median 1362 ns 1367 ns 4 +std::vformat(pattern, std::make_format_args(i))_stddev 33.3 ns 35.1 ns 4 +std::vformat(pattern, std::make_format_args(i))_cv 2.43 % 2.55 % 4 ----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string by std to std::string_mean 40.1 ns 40.1 ns 10 -Concat std::string by std to std::string_median 39.7 ns 39.9 ns 10 -Concat std::string by std to std::string_stddev 1.00 ns 1.03 ns 10 -Concat std::string by std to std::string_cv 2.50 % 2.57 % 10 -Concat std::string by StrExpr to std::string_mean 38.9 ns 38.8 ns 10 -Concat std::string by StrExpr to std::string_median 39.1 ns 39.2 ns 10 -Concat std::string by StrExpr to std::string_stddev 1.03 ns 1.32 ns 10 -Concat std::string by StrExpr to std::string_cv 2.65 % 3.39 % 10 -Concat stringa by StrExpr to stringa_mean 29.2 ns 29.1 ns 10 -Concat stringa by StrExpr to stringa_median 28.8 ns 28.9 ns 10 -Concat stringa by StrExpr to stringa_stddev 1.04 ns 1.19 ns 10 -Concat stringa by StrExpr to stringa_cv 3.58 % 4.08 % 10 +Concat std::string by std to std::string_mean 40.9 ns 41.0 ns 4 +Concat std::string by std to std::string_median 40.8 ns 41.0 ns 4 +Concat std::string by std to std::string_stddev 0.654 ns 0.544 ns 4 +Concat std::string by std to std::string_cv 1.60 % 1.33 % 4 +Concat std::string by StrExpr to std::string_mean 40.7 ns 40.8 ns 4 +Concat std::string by StrExpr to std::string_median 40.3 ns 40.8 ns 4 +Concat std::string by StrExpr to std::string_stddev 1.70 ns 2.22 ns 4 +Concat std::string by StrExpr to std::string_cv 4.19 % 5.44 % 4 +Concat stringa by StrExpr to stringa_mean 29.0 ns 29.0 ns 4 +Concat stringa by StrExpr to stringa_median 29.0 ns 28.8 ns 4 +Concat stringa by StrExpr to stringa_stddev 0.238 ns 0.634 ns 4 +Concat stringa by StrExpr to stringa_cv 0.82 % 2.19 % 4 ----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Find concat three std::string_mean 214 ns 213 ns 10 -Find concat three std::string_median 214 ns 214 ns 10 -Find concat three std::string_stddev 11.0 ns 12.0 ns 10 -Find concat three std::string_cv 5.15 % 5.64 % 10 -Find concat three strexpr_mean 115 ns 115 ns 10 -Find concat three strexpr_median 115 ns 115 ns 10 -Find concat three strexpr_stddev 1.90 ns 2.30 ns 10 -Find concat three strexpr_cv 1.65 % 2.01 % 10 -Find concat three simstr_mean 29.9 ns 29.9 ns 10 -Find concat three simstr_median 29.9 ns 29.8 ns 10 -Find concat three simstr_stddev 0.585 ns 0.659 ns 10 -Find concat three simstr_cv 1.96 % 2.20 % 10 +Find concat three std::string_mean 204 ns 204 ns 4 +Find concat three std::string_median 206 ns 205 ns 4 +Find concat three std::string_stddev 5.12 ns 5.27 ns 4 +Find concat three std::string_cv 2.51 % 2.58 % 4 +Find concat three strexpr_mean 113 ns 113 ns 4 +Find concat three strexpr_median 113 ns 112 ns 4 +Find concat three strexpr_stddev 2.49 ns 1.22 ns 4 +Find concat three strexpr_cv 2.20 % 1.08 % 4 +Find concat three simstr_mean 21.3 ns 21.2 ns 4 +Find concat three simstr_median 21.3 ns 21.2 ns 4 +Find concat three simstr_stddev 0.208 ns 0.282 ns 4 +Find concat three simstr_cv 0.98 % 1.33 % 4 ----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -BuildTypeNameStr 0/0_mean 8.10 ns 8.10 ns 10 -BuildTypeNameStr 0/0_median 8.11 ns 8.16 ns 10 -BuildTypeNameStr 0/0_stddev 0.164 ns 0.141 ns 10 -BuildTypeNameStr 0/0_cv 2.02 % 1.74 % 10 -BuildTypeNameExp 0/0_mean 7.52 ns 7.52 ns 10 -BuildTypeNameExp 0/0_median 7.47 ns 7.53 ns 10 -BuildTypeNameExp 0/0_stddev 0.185 ns 0.191 ns 10 -BuildTypeNameExp 0/0_cv 2.46 % 2.54 % 10 -BuildTypeNameSim 0/0_mean 8.42 ns 8.42 ns 10 -BuildTypeNameSim 0/0_median 8.16 ns 8.20 ns 10 -BuildTypeNameSim 0/0_stddev 0.714 ns 0.722 ns 10 -BuildTypeNameSim 0/0_cv 8.47 % 8.57 % 10 -BuildTypeNameStr 10/10_mean 59.1 ns 59.1 ns 10 -BuildTypeNameStr 10/10_median 59.0 ns 59.4 ns 10 -BuildTypeNameStr 10/10_stddev 0.627 ns 0.988 ns 10 -BuildTypeNameStr 10/10_cv 1.06 % 1.67 % 10 -BuildTypeNameExp 10/10_mean 36.1 ns 36.1 ns 10 -BuildTypeNameExp 10/10_median 35.7 ns 35.4 ns 10 -BuildTypeNameExp 10/10_stddev 2.79 ns 2.70 ns 10 -BuildTypeNameExp 10/10_cv 7.73 % 7.47 % 10 -BuildTypeNameSim 10/10_mean 26.5 ns 26.5 ns 10 -BuildTypeNameSim 10/10_median 26.0 ns 26.4 ns 10 -BuildTypeNameSim 10/10_stddev 1.90 ns 1.87 ns 10 -BuildTypeNameSim 10/10_cv 7.18 % 7.05 % 10 +BuildTypeNameStr 0/0_mean 8.16 ns 8.16 ns 4 +BuildTypeNameStr 0/0_median 8.20 ns 8.16 ns 4 +BuildTypeNameStr 0/0_stddev 0.075 ns 0.000 ns 4 +BuildTypeNameStr 0/0_cv 0.91 % 0.00 % 4 +BuildTypeNameExp 0/0_mean 7.66 ns 7.67 ns 4 +BuildTypeNameExp 0/0_median 7.64 ns 7.67 ns 4 +BuildTypeNameExp 0/0_stddev 0.100 ns 0.142 ns 4 +BuildTypeNameExp 0/0_cv 1.31 % 1.86 % 4 +BuildTypeNameSim 0/0_mean 7.73 ns 7.72 ns 4 +BuildTypeNameSim 0/0_median 7.75 ns 7.67 ns 4 +BuildTypeNameSim 0/0_stddev 0.075 ns 0.087 ns 4 +BuildTypeNameSim 0/0_cv 0.97 % 1.13 % 4 +BuildTypeNameStr 10/10_mean 59.7 ns 59.6 ns 4 +BuildTypeNameStr 10/10_median 59.6 ns 59.3 ns 4 +BuildTypeNameStr 10/10_stddev 0.699 ns 1.34 ns 4 +BuildTypeNameStr 10/10_cv 1.17 % 2.24 % 4 +BuildTypeNameExp 10/10_mean 32.4 ns 32.4 ns 4 +BuildTypeNameExp 10/10_median 32.5 ns 32.8 ns 4 +BuildTypeNameExp 10/10_stddev 0.647 ns 0.698 ns 4 +BuildTypeNameExp 10/10_cv 2.00 % 2.15 % 4 +BuildTypeNameSim 10/10_mean 25.6 ns 25.5 ns 4 +BuildTypeNameSim 10/10_median 24.9 ns 24.9 ns 4 +BuildTypeNameSim 10/10_stddev 1.85 ns 1.58 ns 4 +BuildTypeNameSim 10/10_cv 7.22 % 6.18 % 4 ----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat with replace str_mean 317 ns 315 ns 10 -Concat with replace str_median 317 ns 314 ns 10 -Concat with replace str_stddev 6.66 ns 7.92 ns 10 -Concat with replace str_cv 2.10 % 2.51 % 10 -Concat with replace exp_mean 210 ns 210 ns 10 -Concat with replace exp_median 210 ns 211 ns 10 -Concat with replace exp_stddev 6.44 ns 8.01 ns 10 -Concat with replace exp_cv 3.07 % 3.82 % 10 +Concat with replace str_mean 349 ns 348 ns 4 +Concat with replace str_median 356 ns 358 ns 4 +Concat with replace str_stddev 25.1 ns 28.3 ns 4 +Concat with replace str_cv 7.19 % 8.12 % 4 +Concat with replace exp_mean 229 ns 229 ns 4 +Concat with replace exp_median 227 ns 227 ns 4 +Concat with replace exp_stddev 16.0 ns 16.8 ns 4 +Concat with replace exp_cv 6.97 % 7.32 % 4 ----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e;_mean 1.11 ns 1.09 ns 10 -std::string e;_median 1.09 ns 1.10 ns 10 -std::string e;_stddev 0.051 ns 0.016 ns 10 -std::string e;_cv 4.58 % 1.51 % 10 -std::string_view e;_mean 0.362 ns 0.359 ns 10 -std::string_view e;_median 0.360 ns 0.358 ns 10 -std::string_view e;_stddev 0.006 ns 0.006 ns 10 -std::string_view e;_cv 1.58 % 1.77 % 10 -ssa e;_mean 0.371 ns 0.370 ns 10 -ssa e;_median 0.368 ns 0.366 ns 10 -ssa e;_stddev 0.013 ns 0.016 ns 10 -ssa e;_cv 3.62 % 4.33 % 10 -stringa e;_mean 0.763 ns 0.763 ns 10 -stringa e;_median 0.746 ns 0.753 ns 10 -stringa e;_stddev 0.039 ns 0.041 ns 10 -stringa e;_cv 5.14 % 5.32 % 10 -lstringa<20> e;_mean 1.12 ns 1.12 ns 10 -lstringa<20> e;_median 1.14 ns 1.14 ns 10 -lstringa<20> e;_stddev 0.034 ns 0.041 ns 10 -lstringa<20> e;_cv 3.04 % 3.62 % 10 -lstringa<40> e;_mean 1.12 ns 1.12 ns 10 -lstringa<40> e;_median 1.10 ns 1.12 ns 10 -lstringa<40> e;_stddev 0.044 ns 0.035 ns 10 -lstringa<40> e;_cv 3.93 % 3.12 % 10 +std::string e;_mean 1.13 ns 1.12 ns 4 +std::string e;_median 1.13 ns 1.12 ns 4 +std::string e;_stddev 0.024 ns 0.040 ns 4 +std::string e;_cv 2.11 % 3.55 % 4 +std::string_view e;_mean 0.364 ns 0.362 ns 4 +std::string_view e;_median 0.365 ns 0.360 ns 4 +std::string_view e;_stddev 0.006 ns 0.004 ns 4 +std::string_view e;_cv 1.61 % 1.16 % 4 +ssa e;_mean 0.357 ns 0.357 ns 4 +ssa e;_median 0.357 ns 0.357 ns 4 +ssa e;_stddev 0.003 ns 0.005 ns 4 +ssa e;_cv 0.83 % 1.30 % 4 +stringa e;_mean 0.742 ns 0.741 ns 4 +stringa e;_median 0.740 ns 0.732 ns 4 +stringa e;_stddev 0.010 ns 0.017 ns 4 +stringa e;_cv 1.36 % 2.35 % 4 +lstringa<20> e;_mean 1.11 ns 1.10 ns 4 +lstringa<20> e;_median 1.12 ns 1.10 ns 4 +lstringa<20> e;_stddev 0.026 ns 0.020 ns 4 +lstringa<20> e;_cv 2.35 % 1.81 % 4 +lstringa<40> e;_mean 1.11 ns 1.11 ns 4 +lstringa<40> e;_median 1.12 ns 1.11 ns 4 +lstringa<40> e;_stddev 0.025 ns 0.032 ns 4 +lstringa<40> e;_cv 2.20 % 2.84 % 4 ----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text";_mean 1.82 ns 1.81 ns 10 -std::string e = "Test text";_median 1.81 ns 1.80 ns 10 -std::string e = "Test text";_stddev 0.027 ns 0.028 ns 10 -std::string e = "Test text";_cv 1.51 % 1.56 % 10 -std::string_view e = "Test text";_mean 0.732 ns 0.728 ns 10 -std::string_view e = "Test text";_median 0.735 ns 0.725 ns 10 -std::string_view e = "Test text";_stddev 0.009 ns 0.011 ns 10 -std::string_view e = "Test text";_cv 1.17 % 1.51 % 10 -ssa e = "Test text";_mean 0.362 ns 0.363 ns 10 -ssa e = "Test text";_median 0.363 ns 0.365 ns 10 -ssa e = "Test text";_stddev 0.006 ns 0.007 ns 10 -ssa e = "Test text";_cv 1.65 % 2.03 % 10 -stringa e = "Test text";_mean 1.10 ns 1.10 ns 10 -stringa e = "Test text";_median 1.09 ns 1.10 ns 10 -stringa e = "Test text";_stddev 0.034 ns 0.030 ns 10 -stringa e = "Test text";_cv 3.08 % 2.77 % 10 -lstringa<20> e = "Test text";_mean 1.88 ns 1.86 ns 10 -lstringa<20> e = "Test text";_median 1.84 ns 1.84 ns 10 -lstringa<20> e = "Test text";_stddev 0.070 ns 0.052 ns 10 -lstringa<20> e = "Test text";_cv 3.72 % 2.79 % 10 -lstringa<40> e = "Test text";_mean 1.86 ns 1.85 ns 10 -lstringa<40> e = "Test text";_median 1.83 ns 1.83 ns 10 -lstringa<40> e = "Test text";_stddev 0.096 ns 0.114 ns 10 -lstringa<40> e = "Test text";_cv 5.15 % 6.13 % 10 +std::string e = "Test text";_mean 1.80 ns 1.80 ns 4 +std::string e = "Test text";_median 1.79 ns 1.78 ns 4 +std::string e = "Test text";_stddev 0.039 ns 0.059 ns 4 +std::string e = "Test text";_cv 2.19 % 3.29 % 4 +std::string_view e = "Test text";_mean 0.730 ns 0.732 ns 4 +std::string_view e = "Test text";_median 0.731 ns 0.732 ns 4 +std::string_view e = "Test text";_stddev 0.010 ns 0.008 ns 4 +std::string_view e = "Test text";_cv 1.42 % 1.10 % 4 +ssa e = "Test text";_mean 0.368 ns 0.367 ns 4 +ssa e = "Test text";_median 0.362 ns 0.361 ns 4 +ssa e = "Test text";_stddev 0.017 ns 0.018 ns 4 +ssa e = "Test text";_cv 4.68 % 4.85 % 4 +stringa e = "Test text";_mean 1.11 ns 1.10 ns 4 +stringa e = "Test text";_median 1.10 ns 1.09 ns 4 +stringa e = "Test text";_stddev 0.030 ns 0.035 ns 4 +stringa e = "Test text";_cv 2.70 % 3.14 % 4 +lstringa<20> e = "Test text";_mean 1.84 ns 1.84 ns 4 +lstringa<20> e = "Test text";_median 1.84 ns 1.86 ns 4 +lstringa<20> e = "Test text";_stddev 0.048 ns 0.059 ns 4 +lstringa<20> e = "Test text";_cv 2.60 % 3.21 % 4 +lstringa<40> e = "Test text";_mean 1.83 ns 1.82 ns 4 +lstringa<40> e = "Test text";_median 1.83 ns 1.82 ns 4 +lstringa<40> e = "Test text";_stddev 0.009 ns 0.022 ns 4 +lstringa<40> e = "Test text";_cv 0.49 % 1.22 % 4 ----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890";_mean 79.3 ns 79.0 ns 10 -std::string e = "123456789012345678901234567890";_median 78.4 ns 78.5 ns 10 -std::string e = "123456789012345678901234567890";_stddev 1.87 ns 1.65 ns 10 -std::string e = "123456789012345678901234567890";_cv 2.36 % 2.09 % 10 -std::string_view e = "123456789012345678901234567890";_mean 0.726 ns 0.724 ns 10 -std::string_view e = "123456789012345678901234567890";_median 0.728 ns 0.732 ns 10 -std::string_view e = "123456789012345678901234567890";_stddev 0.007 ns 0.012 ns 10 -std::string_view e = "123456789012345678901234567890";_cv 0.93 % 1.70 % 10 -ssa e = "123456789012345678901234567890";_mean 0.364 ns 0.364 ns 10 -ssa e = "123456789012345678901234567890";_median 0.363 ns 0.361 ns 10 -ssa e = "123456789012345678901234567890";_stddev 0.006 ns 0.007 ns 10 -ssa e = "123456789012345678901234567890";_cv 1.69 % 1.86 % 10 -stringa e = "123456789012345678901234567890";_mean 1.11 ns 1.11 ns 10 -stringa e = "123456789012345678901234567890";_median 1.10 ns 1.10 ns 10 -stringa e = "123456789012345678901234567890";_stddev 0.027 ns 0.027 ns 10 -stringa e = "123456789012345678901234567890";_cv 2.48 % 2.43 % 10 -lstringa<20> e = "123456789012345678901234567890";_mean 75.7 ns 75.8 ns 10 -lstringa<20> e = "123456789012345678901234567890";_median 75.4 ns 75.3 ns 10 -lstringa<20> e = "123456789012345678901234567890";_stddev 1.38 ns 1.62 ns 10 -lstringa<20> e = "123456789012345678901234567890";_cv 1.82 % 2.14 % 10 -lstringa<40> e = "123456789012345678901234567890";_mean 2.53 ns 2.53 ns 10 -lstringa<40> e = "123456789012345678901234567890";_median 2.53 ns 2.49 ns 10 -lstringa<40> e = "123456789012345678901234567890";_stddev 0.035 ns 0.050 ns 10 -lstringa<40> e = "123456789012345678901234567890";_cv 1.40 % 1.98 % 10 +std::string e = "123456789012345678901234567890";_mean 70.1 ns 70.1 ns 4 +std::string e = "123456789012345678901234567890";_median 70.4 ns 70.5 ns 4 +std::string e = "123456789012345678901234567890";_stddev 1.35 ns 2.38 ns 4 +std::string e = "123456789012345678901234567890";_cv 1.93 % 3.40 % 4 +std::string_view e = "123456789012345678901234567890";_mean 0.757 ns 0.760 ns 4 +std::string_view e = "123456789012345678901234567890";_median 0.757 ns 0.760 ns 4 +std::string_view e = "123456789012345678901234567890";_stddev 0.027 ns 0.033 ns 4 +std::string_view e = "123456789012345678901234567890";_cv 3.50 % 4.37 % 4 +ssa e = "123456789012345678901234567890";_mean 0.391 ns 0.391 ns 4 +ssa e = "123456789012345678901234567890";_median 0.397 ns 0.398 ns 4 +ssa e = "123456789012345678901234567890";_stddev 0.019 ns 0.022 ns 4 +ssa e = "123456789012345678901234567890";_cv 4.74 % 5.63 % 4 +stringa e = "123456789012345678901234567890";_mean 1.12 ns 1.12 ns 4 +stringa e = "123456789012345678901234567890";_median 1.13 ns 1.12 ns 4 +stringa e = "123456789012345678901234567890";_stddev 0.040 ns 0.031 ns 4 +stringa e = "123456789012345678901234567890";_cv 3.57 % 2.75 % 4 +lstringa<20> e = "123456789012345678901234567890";_mean 76.9 ns 77.2 ns 4 +lstringa<20> e = "123456789012345678901234567890";_median 76.8 ns 77.6 ns 4 +lstringa<20> e = "123456789012345678901234567890";_stddev 1.59 ns 1.67 ns 4 +lstringa<20> e = "123456789012345678901234567890";_cv 2.07 % 2.16 % 4 +lstringa<40> e = "123456789012345678901234567890";_mean 2.56 ns 2.55 ns 4 +lstringa<40> e = "123456789012345678901234567890";_median 2.53 ns 2.55 ns 4 +lstringa<40> e = "123456789012345678901234567890";_stddev 0.064 ns 0.048 ns 4 +lstringa<40> e = "123456789012345678901234567890";_cv 2.50 % 1.90 % 4 ----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text"; auto c{e};_mean 1.88 ns 1.88 ns 10 -std::string e = "Test text"; auto c{e};_median 1.86 ns 1.86 ns 10 -std::string e = "Test text"; auto c{e};_stddev 0.063 ns 0.071 ns 10 -std::string e = "Test text"; auto c{e};_cv 3.36 % 3.78 % 10 -std::string_view e = "Test text"; auto c{e};_mean 0.371 ns 0.370 ns 10 -std::string_view e = "Test text"; auto c{e};_median 0.367 ns 0.369 ns 10 -std::string_view e = "Test text"; auto c{e};_stddev 0.010 ns 0.010 ns 10 -std::string_view e = "Test text"; auto c{e};_cv 2.77 % 2.79 % 10 -ssa e = "Test text"; auto c{e};_mean 0.376 ns 0.374 ns 10 -ssa e = "Test text"; auto c{e};_median 0.367 ns 0.367 ns 10 -ssa e = "Test text"; auto c{e};_stddev 0.019 ns 0.015 ns 10 -ssa e = "Test text"; auto c{e};_cv 4.96 % 3.93 % 10 -stringa e = "Test text"; auto c{e};_mean 1.28 ns 1.28 ns 10 -stringa e = "Test text"; auto c{e};_median 1.28 ns 1.27 ns 10 -stringa e = "Test text"; auto c{e};_stddev 0.026 ns 0.023 ns 10 -stringa e = "Test text"; auto c{e};_cv 2.05 % 1.80 % 10 -lstringa<20> e = "Test text"; auto c{e};_mean 5.11 ns 5.12 ns 10 -lstringa<20> e = "Test text"; auto c{e};_median 5.05 ns 5.02 ns 10 -lstringa<20> e = "Test text"; auto c{e};_stddev 0.166 ns 0.198 ns 10 -lstringa<20> e = "Test text"; auto c{e};_cv 3.24 % 3.86 % 10 -lstringa<40> e = "Test text"; auto c{e};_mean 5.11 ns 5.11 ns 10 -lstringa<40> e = "Test text"; auto c{e};_median 5.10 ns 5.16 ns 10 -lstringa<40> e = "Test text"; auto c{e};_stddev 0.050 ns 0.075 ns 10 -lstringa<40> e = "Test text"; auto c{e};_cv 0.98 % 1.48 % 10 +std::string e = "Test text"; auto c{e};_mean 1.82 ns 1.82 ns 4 +std::string e = "Test text"; auto c{e};_median 1.81 ns 1.82 ns 4 +std::string e = "Test text"; auto c{e};_stddev 0.021 ns 0.024 ns 4 +std::string e = "Test text"; auto c{e};_cv 1.18 % 1.33 % 4 +std::string_view e = "Test text"; auto c{e};_mean 0.369 ns 0.369 ns 4 +std::string_view e = "Test text"; auto c{e};_median 0.362 ns 0.361 ns 4 +std::string_view e = "Test text"; auto c{e};_stddev 0.019 ns 0.016 ns 4 +std::string_view e = "Test text"; auto c{e};_cv 5.17 % 4.35 % 4 +ssa e = "Test text"; auto c{e};_mean 0.365 ns 0.365 ns 4 +ssa e = "Test text"; auto c{e};_median 0.361 ns 0.361 ns 4 +ssa e = "Test text"; auto c{e};_stddev 0.009 ns 0.008 ns 4 +ssa e = "Test text"; auto c{e};_cv 2.50 % 2.20 % 4 +stringa e = "Test text"; auto c{e};_mean 1.28 ns 1.28 ns 4 +stringa e = "Test text"; auto c{e};_median 1.29 ns 1.28 ns 4 +stringa e = "Test text"; auto c{e};_stddev 0.019 ns 0.023 ns 4 +stringa e = "Test text"; auto c{e};_cv 1.50 % 1.77 % 4 +lstringa<20> e = "Test text"; auto c{e};_mean 4.77 ns 4.73 ns 4 +lstringa<20> e = "Test text"; auto c{e};_median 4.81 ns 4.76 ns 4 +lstringa<20> e = "Test text"; auto c{e};_stddev 0.109 ns 0.100 ns 4 +lstringa<20> e = "Test text"; auto c{e};_cv 2.29 % 2.12 % 4 +lstringa<40> e = "Test text"; auto c{e};_mean 4.89 ns 4.84 ns 4 +lstringa<40> e = "Test text"; auto c{e};_median 4.88 ns 4.81 ns 4 +lstringa<40> e = "Test text"; auto c{e};_stddev 0.192 ns 0.223 ns 4 +lstringa<40> e = "Test text"; auto c{e};_cv 3.93 % 4.61 % 4 ----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890"; auto c{e};_mean 77.2 ns 76.8 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_median 77.0 ns 77.4 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_stddev 2.34 ns 2.22 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_cv 3.03 % 2.89 % 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.731 ns 0.731 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.729 ns 0.725 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.011 ns 0.012 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.50 % 1.61 % 10 -ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.364 ns 0.362 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_median 0.363 ns 0.362 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.005 ns 0.005 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.28 % 1.27 % 10 -stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.86 ns 1.85 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_median 1.84 ns 1.84 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.047 ns 0.048 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_cv 2.53 % 2.59 % 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 78.6 ns 78.6 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 78.5 ns 78.1 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 4.25 ns 4.28 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 5.41 % 5.44 % 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.78 ns 4.77 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.77 ns 4.76 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.055 ns 0.080 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.15 % 1.67 % 10 +std::string e = "123456789012345678901234567890"; auto c{e};_mean 70.6 ns 70.5 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_median 69.9 ns 69.8 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_stddev 1.36 ns 1.40 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_cv 1.93 % 1.98 % 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.726 ns 0.719 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.726 ns 0.715 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.009 ns 0.009 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.24 % 1.21 % 4 +ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.362 ns 0.363 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_median 0.361 ns 0.365 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.005 ns 0.008 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.50 % 2.12 % 4 +stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.82 ns 1.82 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_median 1.81 ns 1.82 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.044 ns 0.054 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_cv 2.40 % 2.97 % 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 77.5 ns 77.8 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 77.6 ns 77.4 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.891 ns 1.34 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 1.15 % 1.72 % 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.61 ns 4.61 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.61 ns 4.64 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.183 ns 0.167 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 3.98 % 3.61 % 4 ----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find;_mean 38.3 ns 38.3 ns 10 -std::string::find;_median 38.3 ns 38.4 ns 10 -std::string::find;_stddev 0.351 ns 0.495 ns 10 -std::string::find;_cv 0.92 % 1.29 % 10 -std::string_view::find;_mean 38.8 ns 38.3 ns 10 -std::string_view::find;_median 38.4 ns 38.1 ns 10 -std::string_view::find;_stddev 1.25 ns 0.865 ns 10 -std::string_view::find;_cv 3.24 % 2.26 % 10 -ssa::find;_mean 17.4 ns 17.5 ns 10 -ssa::find;_median 17.5 ns 17.5 ns 10 -ssa::find;_stddev 0.301 ns 0.326 ns 10 -ssa::find;_cv 1.73 % 1.87 % 10 -stringa::find;_mean 18.3 ns 18.3 ns 10 -stringa::find;_median 18.3 ns 18.4 ns 10 -stringa::find;_stddev 0.343 ns 0.345 ns 10 -stringa::find;_cv 1.87 % 1.88 % 10 -lstringa<20>::find;_mean 17.5 ns 17.5 ns 10 -lstringa<20>::find;_median 17.6 ns 17.6 ns 10 -lstringa<20>::find;_stddev 0.383 ns 0.450 ns 10 -lstringa<20>::find;_cv 2.18 % 2.57 % 10 -lstringa<40>::find;_mean 17.8 ns 17.9 ns 10 -lstringa<40>::find;_median 17.9 ns 17.8 ns 10 -lstringa<40>::find;_stddev 0.199 ns 0.275 ns 10 -lstringa<40>::find;_cv 1.12 % 1.54 % 10 +std::string::find;_mean 40.9 ns 41.0 ns 4 +std::string::find;_median 40.0 ns 39.9 ns 4 +std::string::find;_stddev 2.46 ns 2.41 ns 4 +std::string::find;_cv 6.00 % 5.89 % 4 +std::string_view::find;_mean 38.2 ns 38.3 ns 4 +std::string_view::find;_median 38.2 ns 38.1 ns 4 +std::string_view::find;_stddev 0.813 ns 0.801 ns 4 +std::string_view::find;_cv 2.13 % 2.09 % 4 +ssa::find;_mean 19.1 ns 19.0 ns 4 +ssa::find;_median 18.4 ns 18.4 ns 4 +ssa::find;_stddev 1.88 ns 1.89 ns 4 +ssa::find;_cv 9.83 % 9.91 % 4 +stringa::find;_mean 17.5 ns 17.6 ns 4 +stringa::find;_median 17.5 ns 17.6 ns 4 +stringa::find;_stddev 0.091 ns 0.000 ns 4 +stringa::find;_cv 0.52 % 0.00 % 4 +lstringa<20>::find;_mean 18.2 ns 18.2 ns 4 +lstringa<20>::find;_median 18.1 ns 18.0 ns 4 +lstringa<20>::find;_stddev 0.937 ns 0.735 ns 4 +lstringa<20>::find;_cv 5.14 % 4.03 % 4 +lstringa<40>::find;_mean 17.4 ns 17.4 ns 4 +lstringa<40>::find;_median 17.4 ns 17.3 ns 4 +lstringa<40>::find;_stddev 0.188 ns 0.192 ns 4 +lstringa<40>::find;_cv 1.08 % 1.10 % 4 ------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string copy{str_with_len_N};/15_mean 1.92 ns 1.92 ns 10 -std::string copy{str_with_len_N};/15_median 1.89 ns 1.90 ns 10 -std::string copy{str_with_len_N};/15_stddev 0.108 ns 0.083 ns 10 -std::string copy{str_with_len_N};/15_cv 5.61 % 4.32 % 10 -std::string copy{str_with_len_N};/16_mean 79.1 ns 79.2 ns 10 -std::string copy{str_with_len_N};/16_median 79.2 ns 79.3 ns 10 -std::string copy{str_with_len_N};/16_stddev 1.30 ns 1.68 ns 10 -std::string copy{str_with_len_N};/16_cv 1.65 % 2.13 % 10 -std::string copy{str_with_len_N};/23_mean 80.3 ns 80.1 ns 10 -std::string copy{str_with_len_N};/23_median 79.7 ns 79.5 ns 10 -std::string copy{str_with_len_N};/23_stddev 2.21 ns 2.30 ns 10 -std::string copy{str_with_len_N};/23_cv 2.75 % 2.87 % 10 -std::string copy{str_with_len_N};/24_mean 79.5 ns 79.4 ns 10 -std::string copy{str_with_len_N};/24_median 79.3 ns 79.5 ns 10 -std::string copy{str_with_len_N};/24_stddev 1.05 ns 1.54 ns 10 -std::string copy{str_with_len_N};/24_cv 1.32 % 1.93 % 10 -std::string copy{str_with_len_N};/32_mean 81.8 ns 81.6 ns 10 -std::string copy{str_with_len_N};/32_median 81.1 ns 81.1 ns 10 -std::string copy{str_with_len_N};/32_stddev 1.83 ns 1.80 ns 10 -std::string copy{str_with_len_N};/32_cv 2.24 % 2.21 % 10 -std::string copy{str_with_len_N};/64_mean 81.2 ns 81.3 ns 10 -std::string copy{str_with_len_N};/64_median 79.8 ns 80.2 ns 10 -std::string copy{str_with_len_N};/64_stddev 3.38 ns 3.20 ns 10 -std::string copy{str_with_len_N};/64_cv 4.15 % 3.94 % 10 -std::string copy{str_with_len_N};/128_mean 84.4 ns 84.3 ns 10 -std::string copy{str_with_len_N};/128_median 84.4 ns 83.7 ns 10 -std::string copy{str_with_len_N};/128_stddev 5.15 ns 5.32 ns 10 -std::string copy{str_with_len_N};/128_cv 6.10 % 6.30 % 10 -std::string copy{str_with_len_N};/256_mean 87.2 ns 87.2 ns 10 -std::string copy{str_with_len_N};/256_median 84.4 ns 84.2 ns 10 -std::string copy{str_with_len_N};/256_stddev 10.4 ns 9.77 ns 10 -std::string copy{str_with_len_N};/256_cv 11.87 % 11.21 % 10 -std::string copy{str_with_len_N};/512_mean 84.9 ns 84.9 ns 10 -std::string copy{str_with_len_N};/512_median 84.8 ns 85.4 ns 10 -std::string copy{str_with_len_N};/512_stddev 1.78 ns 2.02 ns 10 -std::string copy{str_with_len_N};/512_cv 2.09 % 2.38 % 10 -std::string copy{str_with_len_N};/1024_mean 96.5 ns 96.5 ns 10 -std::string copy{str_with_len_N};/1024_median 97.9 ns 98.4 ns 10 -std::string copy{str_with_len_N};/1024_stddev 5.98 ns 6.04 ns 10 -std::string copy{str_with_len_N};/1024_cv 6.19 % 6.26 % 10 -std::string copy{str_with_len_N};/2048_mean 129 ns 129 ns 10 -std::string copy{str_with_len_N};/2048_median 128 ns 128 ns 10 -std::string copy{str_with_len_N};/2048_stddev 7.55 ns 7.49 ns 10 -std::string copy{str_with_len_N};/2048_cv 5.87 % 5.83 % 10 -std::string copy{str_with_len_N};/4096_mean 172 ns 171 ns 10 -std::string copy{str_with_len_N};/4096_median 171 ns 171 ns 10 -std::string copy{str_with_len_N};/4096_stddev 5.86 ns 4.14 ns 10 -std::string copy{str_with_len_N};/4096_cv 3.42 % 2.43 % 10 -stringa copy{str_with_len_N};/15_mean 1.28 ns 1.27 ns 10 -stringa copy{str_with_len_N};/15_median 1.28 ns 1.29 ns 10 -stringa copy{str_with_len_N};/15_stddev 0.030 ns 0.034 ns 10 -stringa copy{str_with_len_N};/15_cv 2.37 % 2.65 % 10 -stringa copy{str_with_len_N};/16_mean 1.28 ns 1.28 ns 10 -stringa copy{str_with_len_N};/16_median 1.29 ns 1.26 ns 10 -stringa copy{str_with_len_N};/16_stddev 0.036 ns 0.043 ns 10 -stringa copy{str_with_len_N};/16_cv 2.84 % 3.38 % 10 -stringa copy{str_with_len_N};/23_mean 1.29 ns 1.29 ns 10 -stringa copy{str_with_len_N};/23_median 1.28 ns 1.28 ns 10 -stringa copy{str_with_len_N};/23_stddev 0.025 ns 0.026 ns 10 -stringa copy{str_with_len_N};/23_cv 1.93 % 1.99 % 10 -stringa copy{str_with_len_N};/24_mean 15.9 ns 15.8 ns 10 -stringa copy{str_with_len_N};/24_median 15.8 ns 15.7 ns 10 -stringa copy{str_with_len_N};/24_stddev 0.168 ns 0.180 ns 10 -stringa copy{str_with_len_N};/24_cv 1.06 % 1.14 % 10 -stringa copy{str_with_len_N};/32_mean 16.0 ns 15.9 ns 10 -stringa copy{str_with_len_N};/32_median 15.9 ns 15.9 ns 10 -stringa copy{str_with_len_N};/32_stddev 0.239 ns 0.202 ns 10 -stringa copy{str_with_len_N};/32_cv 1.50 % 1.27 % 10 -stringa copy{str_with_len_N};/64_mean 16.7 ns 16.7 ns 10 -stringa copy{str_with_len_N};/64_median 16.0 ns 16.0 ns 10 -stringa copy{str_with_len_N};/64_stddev 2.23 ns 2.23 ns 10 -stringa copy{str_with_len_N};/64_cv 13.34 % 13.33 % 10 -stringa copy{str_with_len_N};/128_mean 15.8 ns 15.8 ns 10 -stringa copy{str_with_len_N};/128_median 15.8 ns 15.7 ns 10 -stringa copy{str_with_len_N};/128_stddev 0.086 ns 0.168 ns 10 -stringa copy{str_with_len_N};/128_cv 0.55 % 1.07 % 10 -stringa copy{str_with_len_N};/256_mean 15.8 ns 15.8 ns 10 -stringa copy{str_with_len_N};/256_median 15.8 ns 15.7 ns 10 -stringa copy{str_with_len_N};/256_stddev 0.154 ns 0.168 ns 10 -stringa copy{str_with_len_N};/256_cv 0.98 % 1.07 % 10 -stringa copy{str_with_len_N};/512_mean 15.8 ns 15.8 ns 10 -stringa copy{str_with_len_N};/512_median 15.8 ns 15.7 ns 10 -stringa copy{str_with_len_N};/512_stddev 0.091 ns 0.168 ns 10 -stringa copy{str_with_len_N};/512_cv 0.57 % 1.07 % 10 -stringa copy{str_with_len_N};/1024_mean 15.8 ns 15.8 ns 10 -stringa copy{str_with_len_N};/1024_median 15.8 ns 15.7 ns 10 -stringa copy{str_with_len_N};/1024_stddev 0.099 ns 0.235 ns 10 -stringa copy{str_with_len_N};/1024_cv 0.62 % 1.49 % 10 -stringa copy{str_with_len_N};/2048_mean 15.8 ns 15.7 ns 10 -stringa copy{str_with_len_N};/2048_median 15.7 ns 15.7 ns 10 -stringa copy{str_with_len_N};/2048_stddev 0.047 ns 0.198 ns 10 -stringa copy{str_with_len_N};/2048_cv 0.30 % 1.26 % 10 -stringa copy{str_with_len_N};/4096_mean 15.8 ns 15.8 ns 10 -stringa copy{str_with_len_N};/4096_median 15.8 ns 15.7 ns 10 -stringa copy{str_with_len_N};/4096_stddev 0.048 ns 0.147 ns 10 -stringa copy{str_with_len_N};/4096_cv 0.30 % 0.93 % 10 -lstringa<16> copy{str_with_len_N};/15_mean 4.78 ns 4.77 ns 10 -lstringa<16> copy{str_with_len_N};/15_median 4.72 ns 4.71 ns 10 -lstringa<16> copy{str_with_len_N};/15_stddev 0.161 ns 0.165 ns 10 -lstringa<16> copy{str_with_len_N};/15_cv 3.37 % 3.46 % 10 -lstringa<16> copy{str_with_len_N};/16_mean 5.32 ns 5.32 ns 10 -lstringa<16> copy{str_with_len_N};/16_median 5.37 ns 5.30 ns 10 -lstringa<16> copy{str_with_len_N};/16_stddev 0.388 ns 0.397 ns 10 -lstringa<16> copy{str_with_len_N};/16_cv 7.30 % 7.47 % 10 -lstringa<16> copy{str_with_len_N};/23_mean 5.12 ns 5.11 ns 10 -lstringa<16> copy{str_with_len_N};/23_median 4.95 ns 5.00 ns 10 -lstringa<16> copy{str_with_len_N};/23_stddev 0.491 ns 0.505 ns 10 -lstringa<16> copy{str_with_len_N};/23_cv 9.59 % 9.89 % 10 -lstringa<16> copy{str_with_len_N};/24_mean 79.7 ns 79.5 ns 10 -lstringa<16> copy{str_with_len_N};/24_median 78.9 ns 79.5 ns 10 -lstringa<16> copy{str_with_len_N};/24_stddev 2.94 ns 2.42 ns 10 -lstringa<16> copy{str_with_len_N};/24_cv 3.68 % 3.04 % 10 -lstringa<16> copy{str_with_len_N};/32_mean 81.5 ns 81.2 ns 10 -lstringa<16> copy{str_with_len_N};/32_median 81.6 ns 81.6 ns 10 -lstringa<16> copy{str_with_len_N};/32_stddev 1.63 ns 1.65 ns 10 -lstringa<16> copy{str_with_len_N};/32_cv 2.00 % 2.03 % 10 -lstringa<16> copy{str_with_len_N};/64_mean 78.6 ns 78.5 ns 10 -lstringa<16> copy{str_with_len_N};/64_median 78.2 ns 77.6 ns 10 -lstringa<16> copy{str_with_len_N};/64_stddev 2.45 ns 2.33 ns 10 -lstringa<16> copy{str_with_len_N};/64_cv 3.12 % 2.96 % 10 -lstringa<16> copy{str_with_len_N};/128_mean 82.0 ns 82.0 ns 10 -lstringa<16> copy{str_with_len_N};/128_median 81.5 ns 81.6 ns 10 -lstringa<16> copy{str_with_len_N};/128_stddev 2.90 ns 3.09 ns 10 -lstringa<16> copy{str_with_len_N};/128_cv 3.54 % 3.76 % 10 -lstringa<16> copy{str_with_len_N};/256_mean 83.4 ns 83.4 ns 10 -lstringa<16> copy{str_with_len_N};/256_median 82.8 ns 82.8 ns 10 -lstringa<16> copy{str_with_len_N};/256_stddev 2.04 ns 2.14 ns 10 -lstringa<16> copy{str_with_len_N};/256_cv 2.44 % 2.57 % 10 -lstringa<16> copy{str_with_len_N};/512_mean 85.2 ns 84.8 ns 10 -lstringa<16> copy{str_with_len_N};/512_median 85.2 ns 85.4 ns 10 -lstringa<16> copy{str_with_len_N};/512_stddev 1.15 ns 0.901 ns 10 -lstringa<16> copy{str_with_len_N};/512_cv 1.35 % 1.06 % 10 -lstringa<16> copy{str_with_len_N};/1024_mean 96.3 ns 96.1 ns 10 -lstringa<16> copy{str_with_len_N};/1024_median 97.3 ns 97.3 ns 10 -lstringa<16> copy{str_with_len_N};/1024_stddev 4.47 ns 4.88 ns 10 -lstringa<16> copy{str_with_len_N};/1024_cv 4.65 % 5.08 % 10 -lstringa<16> copy{str_with_len_N};/2048_mean 124 ns 124 ns 10 -lstringa<16> copy{str_with_len_N};/2048_median 124 ns 124 ns 10 -lstringa<16> copy{str_with_len_N};/2048_stddev 4.04 ns 4.96 ns 10 -lstringa<16> copy{str_with_len_N};/2048_cv 3.25 % 4.00 % 10 -lstringa<16> copy{str_with_len_N};/4096_mean 181 ns 180 ns 10 -lstringa<16> copy{str_with_len_N};/4096_median 180 ns 180 ns 10 -lstringa<16> copy{str_with_len_N};/4096_stddev 2.14 ns 2.38 ns 10 -lstringa<16> copy{str_with_len_N};/4096_cv 1.18 % 1.32 % 10 -lstringa<512> copy{str_with_len_N};/15_mean 5.22 ns 5.20 ns 10 -lstringa<512> copy{str_with_len_N};/15_median 5.11 ns 5.00 ns 10 -lstringa<512> copy{str_with_len_N};/15_stddev 0.406 ns 0.423 ns 10 -lstringa<512> copy{str_with_len_N};/15_cv 7.79 % 8.14 % 10 -lstringa<512> copy{str_with_len_N};/16_mean 5.27 ns 5.27 ns 10 -lstringa<512> copy{str_with_len_N};/16_median 5.13 ns 5.16 ns 10 -lstringa<512> copy{str_with_len_N};/16_stddev 0.409 ns 0.445 ns 10 -lstringa<512> copy{str_with_len_N};/16_cv 7.75 % 8.44 % 10 -lstringa<512> copy{str_with_len_N};/23_mean 5.42 ns 5.42 ns 10 -lstringa<512> copy{str_with_len_N};/23_median 5.26 ns 5.23 ns 10 -lstringa<512> copy{str_with_len_N};/23_stddev 0.317 ns 0.354 ns 10 -lstringa<512> copy{str_with_len_N};/23_cv 5.85 % 6.52 % 10 -lstringa<512> copy{str_with_len_N};/24_mean 5.13 ns 5.09 ns 10 -lstringa<512> copy{str_with_len_N};/24_median 5.06 ns 5.00 ns 10 -lstringa<512> copy{str_with_len_N};/24_stddev 0.195 ns 0.257 ns 10 -lstringa<512> copy{str_with_len_N};/24_cv 3.79 % 5.05 % 10 -lstringa<512> copy{str_with_len_N};/32_mean 7.99 ns 7.99 ns 10 -lstringa<512> copy{str_with_len_N};/32_median 7.93 ns 7.93 ns 10 -lstringa<512> copy{str_with_len_N};/32_stddev 0.148 ns 0.198 ns 10 -lstringa<512> copy{str_with_len_N};/32_cv 1.86 % 2.48 % 10 -lstringa<512> copy{str_with_len_N};/64_mean 8.09 ns 8.07 ns 10 -lstringa<512> copy{str_with_len_N};/64_median 8.05 ns 8.02 ns 10 -lstringa<512> copy{str_with_len_N};/64_stddev 0.166 ns 0.218 ns 10 -lstringa<512> copy{str_with_len_N};/64_cv 2.06 % 2.70 % 10 -lstringa<512> copy{str_with_len_N};/128_mean 8.40 ns 8.39 ns 10 -lstringa<512> copy{str_with_len_N};/128_median 8.36 ns 8.37 ns 10 -lstringa<512> copy{str_with_len_N};/128_stddev 0.202 ns 0.239 ns 10 -lstringa<512> copy{str_with_len_N};/128_cv 2.40 % 2.85 % 10 -lstringa<512> copy{str_with_len_N};/256_mean 9.69 ns 9.69 ns 10 -lstringa<512> copy{str_with_len_N};/256_median 9.62 ns 9.52 ns 10 -lstringa<512> copy{str_with_len_N};/256_stddev 0.580 ns 0.592 ns 10 -lstringa<512> copy{str_with_len_N};/256_cv 5.98 % 6.11 % 10 -lstringa<512> copy{str_with_len_N};/512_mean 11.4 ns 11.3 ns 10 -lstringa<512> copy{str_with_len_N};/512_median 11.1 ns 11.0 ns 10 -lstringa<512> copy{str_with_len_N};/512_stddev 0.916 ns 0.918 ns 10 -lstringa<512> copy{str_with_len_N};/512_cv 8.07 % 8.10 % 10 -lstringa<512> copy{str_with_len_N};/1024_mean 98.1 ns 97.7 ns 10 -lstringa<512> copy{str_with_len_N};/1024_median 94.6 ns 94.2 ns 10 -lstringa<512> copy{str_with_len_N};/1024_stddev 10.2 ns 10.2 ns 10 -lstringa<512> copy{str_with_len_N};/1024_cv 10.43 % 10.40 % 10 -lstringa<512> copy{str_with_len_N};/2048_mean 129 ns 129 ns 10 -lstringa<512> copy{str_with_len_N};/2048_median 126 ns 126 ns 10 -lstringa<512> copy{str_with_len_N};/2048_stddev 7.85 ns 7.52 ns 10 -lstringa<512> copy{str_with_len_N};/2048_cv 6.07 % 5.81 % 10 -lstringa<512> copy{str_with_len_N};/4096_mean 185 ns 184 ns 10 -lstringa<512> copy{str_with_len_N};/4096_median 182 ns 184 ns 10 -lstringa<512> copy{str_with_len_N};/4096_stddev 6.15 ns 5.39 ns 10 -lstringa<512> copy{str_with_len_N};/4096_cv 3.33 % 2.93 % 10 +std::string copy{str_with_len_N};/15_mean 1.84 ns 1.83 ns 4 +std::string copy{str_with_len_N};/15_median 1.79 ns 1.76 ns 4 +std::string copy{str_with_len_N};/15_stddev 0.110 ns 0.134 ns 4 +std::string copy{str_with_len_N};/15_cv 5.99 % 7.33 % 4 +std::string copy{str_with_len_N};/16_mean 79.1 ns 78.9 ns 4 +std::string copy{str_with_len_N};/16_median 77.5 ns 77.6 ns 4 +std::string copy{str_with_len_N};/16_stddev 4.26 ns 4.59 ns 4 +std::string copy{str_with_len_N};/16_cv 5.39 % 5.81 % 4 +std::string copy{str_with_len_N};/23_mean 78.4 ns 78.5 ns 4 +std::string copy{str_with_len_N};/23_median 77.8 ns 78.5 ns 4 +std::string copy{str_with_len_N};/23_stddev 1.57 ns 1.42 ns 4 +std::string copy{str_with_len_N};/23_cv 2.00 % 1.81 % 4 +std::string copy{str_with_len_N};/24_mean 78.1 ns 78.0 ns 4 +std::string copy{str_with_len_N};/24_median 77.0 ns 76.7 ns 4 +std::string copy{str_with_len_N};/24_stddev 5.27 ns 5.40 ns 4 +std::string copy{str_with_len_N};/24_cv 6.75 % 6.92 % 4 +std::string copy{str_with_len_N};/32_mean 79.2 ns 79.3 ns 4 +std::string copy{str_with_len_N};/32_median 78.8 ns 79.3 ns 4 +std::string copy{str_with_len_N};/32_stddev 1.18 ns 1.01 ns 4 +std::string copy{str_with_len_N};/32_cv 1.48 % 1.27 % 4 +std::string copy{str_with_len_N};/64_mean 80.3 ns 80.7 ns 4 +std::string copy{str_with_len_N};/64_median 80.0 ns 80.2 ns 4 +std::string copy{str_with_len_N};/64_stddev 1.43 ns 0.872 ns 4 +std::string copy{str_with_len_N};/64_cv 1.78 % 1.08 % 4 +std::string copy{str_with_len_N};/128_mean 83.2 ns 82.8 ns 4 +std::string copy{str_with_len_N};/128_median 83.2 ns 82.0 ns 4 +std::string copy{str_with_len_N};/128_stddev 1.38 ns 1.74 ns 4 +std::string copy{str_with_len_N};/128_cv 1.65 % 2.11 % 4 +std::string copy{str_with_len_N};/256_mean 86.7 ns 86.8 ns 4 +std::string copy{str_with_len_N};/256_median 86.8 ns 87.2 ns 4 +std::string copy{str_with_len_N};/256_stddev 2.38 ns 2.62 ns 4 +std::string copy{str_with_len_N};/256_cv 2.75 % 3.02 % 4 +std::string copy{str_with_len_N};/512_mean 87.1 ns 86.8 ns 4 +std::string copy{str_with_len_N};/512_median 87.0 ns 86.8 ns 4 +std::string copy{str_with_len_N};/512_stddev 0.370 ns 1.21 ns 4 +std::string copy{str_with_len_N};/512_cv 0.43 % 1.39 % 4 +std::string copy{str_with_len_N};/1024_mean 98.2 ns 97.8 ns 4 +std::string copy{str_with_len_N};/1024_median 98.9 ns 98.4 ns 4 +std::string copy{str_with_len_N};/1024_stddev 1.63 ns 1.05 ns 4 +std::string copy{str_with_len_N};/1024_cv 1.66 % 1.07 % 4 +std::string copy{str_with_len_N};/2048_mean 131 ns 130 ns 4 +std::string copy{str_with_len_N};/2048_median 131 ns 130 ns 4 +std::string copy{str_with_len_N};/2048_stddev 4.54 ns 4.77 ns 4 +std::string copy{str_with_len_N};/2048_cv 3.47 % 3.65 % 4 +std::string copy{str_with_len_N};/4096_mean 178 ns 178 ns 4 +std::string copy{str_with_len_N};/4096_median 179 ns 178 ns 4 +std::string copy{str_with_len_N};/4096_stddev 2.20 ns 2.22 ns 4 +std::string copy{str_with_len_N};/4096_cv 1.23 % 1.24 % 4 +stringa copy{str_with_len_N};/15_mean 1.40 ns 1.40 ns 4 +stringa copy{str_with_len_N};/15_median 1.41 ns 1.41 ns 4 +stringa copy{str_with_len_N};/15_stddev 0.075 ns 0.090 ns 4 +stringa copy{str_with_len_N};/15_cv 5.35 % 6.42 % 4 +stringa copy{str_with_len_N};/16_mean 1.38 ns 1.37 ns 4 +stringa copy{str_with_len_N};/16_median 1.38 ns 1.37 ns 4 +stringa copy{str_with_len_N};/16_stddev 0.068 ns 0.086 ns 4 +stringa copy{str_with_len_N};/16_cv 4.90 % 6.29 % 4 +stringa copy{str_with_len_N};/23_mean 1.31 ns 1.31 ns 4 +stringa copy{str_with_len_N};/23_median 1.31 ns 1.30 ns 4 +stringa copy{str_with_len_N};/23_stddev 0.028 ns 0.039 ns 4 +stringa copy{str_with_len_N};/23_cv 2.13 % 3.01 % 4 +stringa copy{str_with_len_N};/24_mean 15.8 ns 15.8 ns 4 +stringa copy{str_with_len_N};/24_median 15.8 ns 15.7 ns 4 +stringa copy{str_with_len_N};/24_stddev 0.089 ns 0.174 ns 4 +stringa copy{str_with_len_N};/24_cv 0.56 % 1.10 % 4 +stringa copy{str_with_len_N};/32_mean 15.9 ns 15.9 ns 4 +stringa copy{str_with_len_N};/32_median 15.9 ns 15.9 ns 4 +stringa copy{str_with_len_N};/32_stddev 0.216 ns 0.201 ns 4 +stringa copy{str_with_len_N};/32_cv 1.36 % 1.27 % 4 +stringa copy{str_with_len_N};/64_mean 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/64_median 15.9 ns 15.9 ns 4 +stringa copy{str_with_len_N};/64_stddev 0.370 ns 0.367 ns 4 +stringa copy{str_with_len_N};/64_cv 2.31 % 2.29 % 4 +stringa copy{str_with_len_N};/128_mean 15.9 ns 15.9 ns 4 +stringa copy{str_with_len_N};/128_median 15.9 ns 15.9 ns 4 +stringa copy{str_with_len_N};/128_stddev 0.061 ns 0.201 ns 4 +stringa copy{str_with_len_N};/128_cv 0.38 % 1.27 % 4 +stringa copy{str_with_len_N};/256_mean 15.8 ns 15.7 ns 4 +stringa copy{str_with_len_N};/256_median 15.8 ns 15.7 ns 4 +stringa copy{str_with_len_N};/256_stddev 0.071 ns 0.000 ns 4 +stringa copy{str_with_len_N};/256_cv 0.45 % 0.00 % 4 +stringa copy{str_with_len_N};/512_mean 15.8 ns 15.8 ns 4 +stringa copy{str_with_len_N};/512_median 15.8 ns 15.9 ns 4 +stringa copy{str_with_len_N};/512_stddev 0.133 ns 0.334 ns 4 +stringa copy{str_with_len_N};/512_cv 0.84 % 2.12 % 4 +stringa copy{str_with_len_N};/1024_mean 15.8 ns 15.8 ns 4 +stringa copy{str_with_len_N};/1024_median 15.8 ns 15.7 ns 4 +stringa copy{str_with_len_N};/1024_stddev 0.150 ns 0.174 ns 4 +stringa copy{str_with_len_N};/1024_cv 0.95 % 1.10 % 4 +stringa copy{str_with_len_N};/2048_mean 16.0 ns 16.0 ns 4 +stringa copy{str_with_len_N};/2048_median 15.9 ns 16.0 ns 4 +stringa copy{str_with_len_N};/2048_stddev 0.213 ns 0.285 ns 4 +stringa copy{str_with_len_N};/2048_cv 1.33 % 1.77 % 4 +stringa copy{str_with_len_N};/4096_mean 15.8 ns 15.8 ns 4 +stringa copy{str_with_len_N};/4096_median 15.8 ns 15.7 ns 4 +stringa copy{str_with_len_N};/4096_stddev 0.050 ns 0.174 ns 4 +stringa copy{str_with_len_N};/4096_cv 0.31 % 1.10 % 4 +lstringa<16> copy{str_with_len_N};/15_mean 4.58 ns 4.57 ns 4 +lstringa<16> copy{str_with_len_N};/15_median 4.51 ns 4.47 ns 4 +lstringa<16> copy{str_with_len_N};/15_stddev 0.219 ns 0.224 ns 4 +lstringa<16> copy{str_with_len_N};/15_cv 4.79 % 4.91 % 4 +lstringa<16> copy{str_with_len_N};/16_mean 4.38 ns 4.39 ns 4 +lstringa<16> copy{str_with_len_N};/16_median 4.39 ns 4.39 ns 4 +lstringa<16> copy{str_with_len_N};/16_stddev 0.054 ns 0.080 ns 4 +lstringa<16> copy{str_with_len_N};/16_cv 1.23 % 1.81 % 4 +lstringa<16> copy{str_with_len_N};/23_mean 4.49 ns 4.48 ns 4 +lstringa<16> copy{str_with_len_N};/23_median 4.48 ns 4.50 ns 4 +lstringa<16> copy{str_with_len_N};/23_stddev 0.185 ns 0.173 ns 4 +lstringa<16> copy{str_with_len_N};/23_cv 4.12 % 3.86 % 4 +lstringa<16> copy{str_with_len_N};/24_mean 75.0 ns 75.0 ns 4 +lstringa<16> copy{str_with_len_N};/24_median 74.6 ns 75.0 ns 4 +lstringa<16> copy{str_with_len_N};/24_stddev 1.89 ns 1.42 ns 4 +lstringa<16> copy{str_with_len_N};/24_cv 2.52 % 1.90 % 4 +lstringa<16> copy{str_with_len_N};/32_mean 77.2 ns 76.7 ns 4 +lstringa<16> copy{str_with_len_N};/32_median 77.6 ns 77.6 ns 4 +lstringa<16> copy{str_with_len_N};/32_stddev 2.35 ns 2.47 ns 4 +lstringa<16> copy{str_with_len_N};/32_cv 3.04 % 3.21 % 4 +lstringa<16> copy{str_with_len_N};/64_mean 77.8 ns 77.6 ns 4 +lstringa<16> copy{str_with_len_N};/64_median 78.1 ns 77.6 ns 4 +lstringa<16> copy{str_with_len_N};/64_stddev 1.43 ns 2.25 ns 4 +lstringa<16> copy{str_with_len_N};/64_cv 1.83 % 2.90 % 4 +lstringa<16> copy{str_with_len_N};/128_mean 83.5 ns 83.3 ns 4 +lstringa<16> copy{str_with_len_N};/128_median 83.5 ns 82.8 ns 4 +lstringa<16> copy{str_with_len_N};/128_stddev 1.21 ns 1.67 ns 4 +lstringa<16> copy{str_with_len_N};/128_cv 1.45 % 2.01 % 4 +lstringa<16> copy{str_with_len_N};/256_mean 84.3 ns 84.1 ns 4 +lstringa<16> copy{str_with_len_N};/256_median 83.8 ns 83.7 ns 4 +lstringa<16> copy{str_with_len_N};/256_stddev 2.34 ns 2.19 ns 4 +lstringa<16> copy{str_with_len_N};/256_cv 2.78 % 2.61 % 4 +lstringa<16> copy{str_with_len_N};/512_mean 83.5 ns 83.2 ns 4 +lstringa<16> copy{str_with_len_N};/512_median 83.0 ns 83.7 ns 4 +lstringa<16> copy{str_with_len_N};/512_stddev 1.69 ns 1.05 ns 4 +lstringa<16> copy{str_with_len_N};/512_cv 2.02 % 1.26 % 4 +lstringa<16> copy{str_with_len_N};/1024_mean 93.8 ns 94.2 ns 4 +lstringa<16> copy{str_with_len_N};/1024_median 93.8 ns 95.2 ns 4 +lstringa<16> copy{str_with_len_N};/1024_stddev 3.83 ns 5.13 ns 4 +lstringa<16> copy{str_with_len_N};/1024_cv 4.08 % 5.44 % 4 +lstringa<16> copy{str_with_len_N};/2048_mean 132 ns 132 ns 4 +lstringa<16> copy{str_with_len_N};/2048_median 133 ns 133 ns 4 +lstringa<16> copy{str_with_len_N};/2048_stddev 4.86 ns 4.77 ns 4 +lstringa<16> copy{str_with_len_N};/2048_cv 3.68 % 3.61 % 4 +lstringa<16> copy{str_with_len_N};/4096_mean 188 ns 188 ns 4 +lstringa<16> copy{str_with_len_N};/4096_median 189 ns 188 ns 4 +lstringa<16> copy{str_with_len_N};/4096_stddev 3.18 ns 3.42 ns 4 +lstringa<16> copy{str_with_len_N};/4096_cv 1.69 % 1.81 % 4 +lstringa<512> copy{str_with_len_N};/15_mean 4.86 ns 4.87 ns 4 +lstringa<512> copy{str_with_len_N};/15_median 4.83 ns 4.81 ns 4 +lstringa<512> copy{str_with_len_N};/15_stddev 0.216 ns 0.234 ns 4 +lstringa<512> copy{str_with_len_N};/15_cv 4.45 % 4.80 % 4 +lstringa<512> copy{str_with_len_N};/16_mean 4.96 ns 4.95 ns 4 +lstringa<512> copy{str_with_len_N};/16_median 4.90 ns 4.92 ns 4 +lstringa<512> copy{str_with_len_N};/16_stddev 0.324 ns 0.357 ns 4 +lstringa<512> copy{str_with_len_N};/16_cv 6.53 % 7.22 % 4 +lstringa<512> copy{str_with_len_N};/23_mean 4.86 ns 4.84 ns 4 +lstringa<512> copy{str_with_len_N};/23_median 4.82 ns 4.81 ns 4 +lstringa<512> copy{str_with_len_N};/23_stddev 0.159 ns 0.157 ns 4 +lstringa<512> copy{str_with_len_N};/23_cv 3.27 % 3.24 % 4 +lstringa<512> copy{str_with_len_N};/24_mean 4.99 ns 5.00 ns 4 +lstringa<512> copy{str_with_len_N};/24_median 4.89 ns 4.92 ns 4 +lstringa<512> copy{str_with_len_N};/24_stddev 0.343 ns 0.395 ns 4 +lstringa<512> copy{str_with_len_N};/24_cv 6.89 % 7.91 % 4 +lstringa<512> copy{str_with_len_N};/32_mean 8.65 ns 8.68 ns 4 +lstringa<512> copy{str_with_len_N};/32_median 8.90 ns 8.89 ns 4 +lstringa<512> copy{str_with_len_N};/32_stddev 0.561 ns 0.498 ns 4 +lstringa<512> copy{str_with_len_N};/32_cv 6.48 % 5.74 % 4 +lstringa<512> copy{str_with_len_N};/64_mean 7.99 ns 7.98 ns 4 +lstringa<512> copy{str_with_len_N};/64_median 7.93 ns 7.93 ns 4 +lstringa<512> copy{str_with_len_N};/64_stddev 0.323 ns 0.360 ns 4 +lstringa<512> copy{str_with_len_N};/64_cv 4.04 % 4.51 % 4 +lstringa<512> copy{str_with_len_N};/128_mean 8.09 ns 8.06 ns 4 +lstringa<512> copy{str_with_len_N};/128_median 8.10 ns 8.06 ns 4 +lstringa<512> copy{str_with_len_N};/128_stddev 0.222 ns 0.121 ns 4 +lstringa<512> copy{str_with_len_N};/128_cv 2.74 % 1.50 % 4 +lstringa<512> copy{str_with_len_N};/256_mean 9.30 ns 9.21 ns 4 +lstringa<512> copy{str_with_len_N};/256_median 9.26 ns 9.21 ns 4 +lstringa<512> copy{str_with_len_N};/256_stddev 0.268 ns 0.171 ns 4 +lstringa<512> copy{str_with_len_N};/256_cv 2.88 % 1.86 % 4 +lstringa<512> copy{str_with_len_N};/512_mean 11.0 ns 10.9 ns 4 +lstringa<512> copy{str_with_len_N};/512_median 10.9 ns 10.7 ns 4 +lstringa<512> copy{str_with_len_N};/512_stddev 0.656 ns 0.831 ns 4 +lstringa<512> copy{str_with_len_N};/512_cv 5.96 % 7.61 % 4 +lstringa<512> copy{str_with_len_N};/1024_mean 99.1 ns 98.4 ns 4 +lstringa<512> copy{str_with_len_N};/1024_median 99.2 ns 98.4 ns 4 +lstringa<512> copy{str_with_len_N};/1024_stddev 2.52 ns 1.71 ns 4 +lstringa<512> copy{str_with_len_N};/1024_cv 2.54 % 1.74 % 4 +lstringa<512> copy{str_with_len_N};/2048_mean 132 ns 132 ns 4 +lstringa<512> copy{str_with_len_N};/2048_median 134 ns 134 ns 4 +lstringa<512> copy{str_with_len_N};/2048_stddev 4.61 ns 6.59 ns 4 +lstringa<512> copy{str_with_len_N};/2048_cv 3.49 % 5.00 % 4 +lstringa<512> copy{str_with_len_N};/4096_mean 184 ns 183 ns 4 +lstringa<512> copy{str_with_len_N};/4096_median 185 ns 184 ns 4 +lstringa<512> copy{str_with_len_N};/4096_stddev 1.96 ns 2.09 ns 4 +lstringa<512> copy{str_with_len_N};/4096_cv 1.07 % 1.14 % 4 ----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 30.7 ns 30.8 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 30.8 ns 30.7 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.237 ns 0.221 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 0.77 % 0.72 % 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 13.5 ns 13.5 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 13.4 ns 13.4 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.363 ns 0.399 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.69 % 2.95 % 10 -stringa s = "123456789"; int res = s.to_int_mean 14.1 ns 14.1 ns 10 -stringa s = "123456789"; int res = s.to_int_median 14.2 ns 14.1 ns 10 -stringa s = "123456789"; int res = s.to_int_stddev 0.184 ns 0.199 ns 10 -stringa s = "123456789"; int res = s.to_int_cv 1.30 % 1.41 % 10 -ssa s = "123456789"; int res = s.to_int_mean 13.8 ns 13.8 ns 10 -ssa s = "123456789"; int res = s.to_int_median 13.5 ns 13.7 ns 10 -ssa s = "123456789"; int res = s.to_int_stddev 0.857 ns 0.856 ns 10 -ssa s = "123456789"; int res = s.to_int_cv 6.21 % 6.21 % 10 -lstringa<20> s = "123456789"; int res = s.to_int_mean 14.8 ns 14.8 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_median 15.0 ns 15.1 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.912 ns 0.959 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_cv 6.17 % 6.50 % 10 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 30.7 ns 30.6 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 30.8 ns 30.8 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.312 ns 0.634 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.02 % 2.07 % 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 13.7 ns 13.7 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 13.7 ns 13.7 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.339 ns 0.301 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.47 % 2.19 % 4 +stringa s = "123456789"; int res = s.to_int_mean 14.4 ns 14.4 ns 4 +stringa s = "123456789"; int res = s.to_int_median 14.4 ns 14.4 ns 4 +stringa s = "123456789"; int res = s.to_int_stddev 0.530 ns 0.581 ns 4 +stringa s = "123456789"; int res = s.to_int_cv 3.68 % 4.04 % 4 +ssa s = "123456789"; int res = s.to_int_mean 13.7 ns 13.7 ns 4 +ssa s = "123456789"; int res = s.to_int_median 13.7 ns 13.7 ns 4 +ssa s = "123456789"; int res = s.to_int_stddev 0.926 ns 0.922 ns 4 +ssa s = "123456789"; int res = s.to_int_cv 6.74 % 6.71 % 4 +lstringa<20> s = "123456789"; int res = s.to_int_mean 13.1 ns 13.0 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_median 13.1 ns 13.0 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.192 ns 0.267 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_cv 1.46 % 2.05 % 4 ----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 33.2 ns 33.2 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 32.9 ns 33.0 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.655 ns 0.776 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 1.97 % 2.34 % 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 8.21 ns 8.20 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 8.19 ns 8.20 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.093 ns 0.116 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.13 % 1.42 % 10 -stringa s = "abcDef"; int res = s.to_int_mean 12.5 ns 12.5 ns 10 -stringa s = "abcDef"; int res = s.to_int_median 12.4 ns 12.6 ns 10 -stringa s = "abcDef"; int res = s.to_int_stddev 0.186 ns 0.199 ns 10 -stringa s = "abcDef"; int res = s.to_int_cv 1.49 % 1.59 % 10 -ssa s = "abcDef"; int res = s.to_int_mean 12.0 ns 12.0 ns 10 -ssa s = "abcDef"; int res = s.to_int_median 12.0 ns 12.0 ns 10 -ssa s = "abcDef"; int res = s.to_int_stddev 0.194 ns 0.214 ns 10 -ssa s = "abcDef"; int res = s.to_int_cv 1.62 % 1.78 % 10 -lstringa<20> s = "abcDef"; int res = s.to_int_mean 12.1 ns 12.1 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_median 12.1 ns 12.0 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.231 ns 0.343 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.91 % 2.85 % 10 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 33.5 ns 33.7 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 33.4 ns 33.8 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.625 ns 0.668 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 1.86 % 1.98 % 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 8.10 ns 8.06 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 8.13 ns 8.06 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.146 ns 0.270 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.80 % 3.35 % 4 +stringa s = "abcDef"; int res = s.to_int_mean 12.0 ns 11.9 ns 4 +stringa s = "abcDef"; int res = s.to_int_median 12.0 ns 12.0 ns 4 +stringa s = "abcDef"; int res = s.to_int_stddev 0.185 ns 0.351 ns 4 +stringa s = "abcDef"; int res = s.to_int_cv 1.54 % 2.94 % 4 +ssa s = "abcDef"; int res = s.to_int_mean 12.0 ns 12.0 ns 4 +ssa s = "abcDef"; int res = s.to_int_median 11.8 ns 11.8 ns 4 +ssa s = "abcDef"; int res = s.to_int_stddev 0.699 ns 0.527 ns 4 +ssa s = "abcDef"; int res = s.to_int_cv 5.81 % 4.41 % 4 +lstringa<20> s = "abcDef"; int res = s.to_int_mean 11.7 ns 11.6 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_median 11.6 ns 11.4 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.260 ns 0.419 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_cv 2.22 % 3.59 % 4 ----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 43.5 ns 43.6 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 43.3 ns 43.0 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.768 ns 0.824 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 1.77 % 1.89 % 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 18.8 ns 18.8 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 18.6 ns 18.6 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.492 ns 0.574 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 2.62 % 3.06 % 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 15.4 ns 15.3 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 15.4 ns 15.2 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.542 ns 0.658 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 3.52 % 4.29 % 10 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 43.5 ns 43.5 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 43.6 ns 43.5 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.22 ns 1.69 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 2.82 % 3.89 % 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 17.7 ns 17.6 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 17.7 ns 17.6 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.621 ns 0.700 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 3.51 % 3.97 % 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 16.5 ns 16.5 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 16.5 ns 16.6 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.207 ns 0.334 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 1.26 % 2.03 % 4 ----- Convert to double '1234.567e10' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 101 ns 99.6 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 99.3 ns 99.4 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 5.32 ns 4.54 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 5.26 % 4.56 % 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 64.1 ns 64.0 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 61.6 ns 61.4 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 6.54 ns 6.59 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 10.19 % 10.29 % 10 -ssa s = "1234.567e10"; double res = *s.to_double()_mean 36.0 ns 35.9 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_median 35.5 ns 35.3 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_stddev 1.57 ns 1.45 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_cv 4.37 % 4.05 % 10 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 100 ns 100 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 100 ns 100 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 1.50 ns 1.99 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.50 % 1.99 % 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 59.3 ns 59.4 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 59.1 ns 59.4 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 1.75 ns 1.28 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.94 % 2.15 % 4 +ssa s = "1234.567e10"; double res = *s.to_double()_mean 34.9 ns 34.7 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_median 35.1 ns 34.5 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.722 ns 0.384 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.07 % 1.10 % 4 -- Append const literal of 16 bytes 64 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << "abbaabbaabbaabba";_mean 4750 ns 4736 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_median 4724 ns 4757 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 143 ns 123 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_cv 3.01 % 2.59 % 10 -std::string str; ... str += "abbaabbaabbaabba";_mean 1063 ns 1064 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_median 1064 ns 1074 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_stddev 14.6 ns 20.6 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_cv 1.38 % 1.93 % 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 730 ns 731 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_median 733 ns 732 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 5.75 ns 12.9 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 0.79 % 1.76 % 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 395 ns 394 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_median 389 ns 391 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 25.5 ns 26.6 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 6.45 % 6.75 % 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 250 ns 249 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_median 248 ns 251 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 4.48 ns 3.77 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 1.80 % 1.51 % 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 156 ns 155 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 155 ns 153 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 3.95 ns 3.16 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.53 % 2.04 % 10 +std::stringstream str; ... str << "abbaabbaabbaabba";_mean 4829 ns 4844 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_median 4888 ns 4922 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 177 ns 221 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_cv 3.67 % 4.56 % 4 +std::string str; ... str += "abbaabbaabbaabba";_mean 1079 ns 1078 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_median 1078 ns 1078 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_stddev 7.02 ns 12.1 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_cv 0.65 % 1.12 % 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 747 ns 741 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_median 742 ns 732 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 23.7 ns 17.4 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 3.17 % 2.35 % 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 391 ns 386 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_median 386 ns 377 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 17.7 ns 26.6 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 4.52 % 6.90 % 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 238 ns 239 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_median 239 ns 240 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 2.22 ns 2.79 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 0.93 % 1.17 % 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 156 ns 156 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 155 ns 155 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 5.63 ns 5.96 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 3.60 % 3.82 % 4 -- Append string of 16 bytes and const literal of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 4613 ns 4604 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 4645 ns 4604 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 106 ns 98.6 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.29 % 2.14 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 3808 ns 3790 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_median 3791 ns 3809 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 91.6 ns 93.7 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 2.41 % 2.47 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 734 ns 731 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 734 ns 732 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 8.60 ns 12.9 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.17 % 1.76 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 475 ns 475 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 469 ns 464 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 22.9 ns 24.0 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.81 % 5.06 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 288 ns 288 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 288 ns 291 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 4.07 ns 5.00 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.41 % 1.74 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 184 ns 185 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 183 ns 184 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 3.87 ns 3.09 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.10 % 1.67 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 4512 ns 4525 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 4519 ns 4551 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 146 ns 179 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 3.23 % 3.95 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 3730 ns 3730 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_median 3690 ns 3730 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 180 ns 191 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 4.82 % 5.12 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 702 ns 701 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 702 ns 705 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 4.51 ns 13.4 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 0.64 % 1.91 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 448 ns 449 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 448 ns 449 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 2.51 ns 7.97 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 0.56 % 1.77 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 298 ns 298 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 300 ns 301 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 5.73 ns 6.28 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.93 % 2.11 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 207 ns 206 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 207 ns 206 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 1.27 ns 2.62 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 0.62 % 1.27 % 4 -- Append string of 16 bytes and const literal of 16 bytes 2048 times, 65536 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 219319 ns 218656 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 218121 ns 217087 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 5660 ns 6430 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 2.58 % 2.94 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 194821 ns 194066 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 190089 ns 190438 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 9008 ns 9268 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.62 % 4.78 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18897 ns 18862 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18855 ns 18973 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 451 ns 513 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.39 % 2.72 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17335 ns 17285 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17207 ns 17160 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 579 ns 594 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.34 % 3.43 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16905 ns 16783 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16853 ns 16741 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 517 ns 309 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.06 % 1.84 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16758 ns 16741 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16700 ns 16741 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 437 ns 493 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.61 % 2.95 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 217555 ns 216064 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 216601 ns 214844 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 7367 ns 7324 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 3.39 % 3.39 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 187292 ns 186261 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 186868 ns 188354 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2048 ns 4186 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.09 % 2.25 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 19125 ns 19043 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18961 ns 18834 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 461 ns 725 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.41 % 3.81 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16790 ns 16741 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16792 ns 16741 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 602 ns 854 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.58 % 5.10 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16182 ns 16131 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16169 ns 16044 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 290 ns 174 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.79 % 1.08 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16072 ns 16017 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16171 ns 16113 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 403 ns 483 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.51 % 3.01 % 4 -- Append 2 string of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var1 << str_var2;_mean 4306 ns 4287 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_median 4309 ns 4297 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_stddev 44.4 ns 72.1 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_cv 1.03 % 1.68 % 10 -std::string str; ... str += str_var1 + str_var2;_mean 3942 ns 3906 ns 10 -std::string str; ... str += str_var1 + str_var2;_median 3890 ns 3880 ns 10 -std::string str; ... str += str_var1 + str_var2;_stddev 132 ns 135 ns 10 -std::string str; ... str += str_var1 + str_var2;_cv 3.35 % 3.46 % 10 -lstringa<16> str; ... str += str_var1 + str_var2;_mean 795 ns 795 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_median 796 ns 802 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_stddev 13.6 ns 14.7 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_cv 1.72 % 1.85 % 10 -lstringa<128> str; ... str += str_var1 + str_var2;_mean 530 ns 528 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_median 525 ns 531 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_stddev 12.9 ns 14.4 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_cv 2.43 % 2.72 % 10 -lstringa<512> str; ... str += str_var1 + str_var2;_mean 404 ns 404 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_median 408 ns 406 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_stddev 25.8 ns 27.1 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_cv 6.39 % 6.69 % 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_mean 281 ns 281 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_median 280 ns 283 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 4.68 ns 4.95 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.66 % 1.76 % 10 +std::stringstream str; ... str << str_var1 << str_var2;_mean 4365 ns 4332 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_median 4391 ns 4332 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_stddev 112 ns 109 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_cv 2.57 % 2.51 % 4 +std::string str; ... str += str_var1 + str_var2;_mean 3878 ns 3871 ns 4 +std::string str; ... str += str_var1 + str_var2;_median 3750 ns 3767 ns 4 +std::string str; ... str += str_var1 + str_var2;_stddev 327 ns 277 ns 4 +std::string str; ... str += str_var1 + str_var2;_cv 8.44 % 7.14 % 4 +lstringa<16> str; ... str += str_var1 + str_var2;_mean 858 ns 854 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_median 827 ns 818 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_stddev 100 ns 99.7 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_cv 11.67 % 11.66 % 4 +lstringa<128> str; ... str += str_var1 + str_var2;_mean 598 ns 598 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_median 591 ns 586 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_stddev 59.7 ns 61.7 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_cv 9.97 % 10.32 % 4 +lstringa<512> str; ... str += str_var1 + str_var2;_mean 388 ns 387 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_median 389 ns 385 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_stddev 17.7 ns 17.8 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_cv 4.56 % 4.60 % 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_mean 284 ns 284 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_median 285 ns 286 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 6.41 ns 6.01 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_cv 2.26 % 2.12 % 4 -- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; str << "test = " << k << " times";_mean 10756 ns 10718 ns 10 -std::stringstream str; str << "test = " << k << " times";_median 10757 ns 10742 ns 10 -std::stringstream str; str << "test = " << k << " times";_stddev 253 ns 292 ns 10 -std::stringstream str; str << "test = " << k << " times";_cv 2.35 % 2.73 % 10 -std::string str = "test = " + std::to_string(k) + " times";_mean 1072 ns 1071 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_median 1055 ns 1057 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_stddev 50.8 ns 48.1 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_cv 4.74 % 4.49 % 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2827 ns 2825 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2779 ns 2762 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 132 ns 129 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 4.68 % 4.57 % 10 -std::string str = std::format("test = {} times", k);_mean 1907 ns 1908 ns 10 -std::string str = std::format("test = {} times", k);_median 1910 ns 1904 ns 10 -std::string str = std::format("test = {} times", k);_stddev 40.3 ns 52.9 ns 10 -std::string str = std::format("test = {} times", k);_cv 2.11 % 2.77 % 10 -lstringa<8> str; str.format("test = {} times", k);_mean 2160 ns 2149 ns 10 -lstringa<8> str; str.format("test = {} times", k);_median 2192 ns 2154 ns 10 -lstringa<8> str; str.format("test = {} times", k);_stddev 87.6 ns 86.0 ns 10 -lstringa<8> str; str.format("test = {} times", k);_cv 4.06 % 4.00 % 10 -lstringa<32> str; str.format("test = {} times", k);_mean 1009 ns 1007 ns 10 -lstringa<32> str; str.format("test = {} times", k);_median 1008 ns 1004 ns 10 -lstringa<32> str; str.format("test = {} times", k);_stddev 17.4 ns 15.4 ns 10 -lstringa<32> str; str.format("test = {} times", k);_cv 1.72 % 1.53 % 10 -lstringa<8> str = "test = " + k + " times";_mean 831 ns 831 ns 10 -lstringa<8> str = "test = " + k + " times";_median 834 ns 837 ns 10 -lstringa<8> str = "test = " + k + " times";_stddev 21.2 ns 24.3 ns 10 -lstringa<8> str = "test = " + k + " times";_cv 2.55 % 2.92 % 10 -lstringa<32> str = "test = " + k + " times";_mean 154 ns 154 ns 10 -lstringa<32> str = "test = " + k + " times";_median 152 ns 152 ns 10 -lstringa<32> str = "test = " + k + " times";_stddev 6.25 ns 7.25 ns 10 -lstringa<32> str = "test = " + k + " times";_cv 4.05 % 4.71 % 10 -stringa str = "test = " + k + " times";_mean 151 ns 151 ns 10 -stringa str = "test = " + k + " times";_median 151 ns 150 ns 10 -stringa str = "test = " + k + " times";_stddev 3.48 ns 2.94 ns 10 -stringa str = "test = " + k + " times";_cv 2.30 % 1.94 % 10 +std::stringstream str; str << "test = " << k << " times";_mean 10795 ns 10803 ns 4 +std::stringstream str; str << "test = " << k << " times";_median 10807 ns 10742 ns 4 +std::stringstream str; str << "test = " << k << " times";_stddev 87.9 ns 122 ns 4 +std::stringstream str; str << "test = " << k << " times";_cv 0.81 % 1.13 % 4 +std::string str = "test = " + std::to_string(k) + " times";_mean 1087 ns 1080 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_median 1089 ns 1074 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_stddev 22.4 ns 23.1 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_cv 2.06 % 2.14 % 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2794 ns 2794 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2783 ns 2794 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 28.5 ns 36.2 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.02 % 1.30 % 4 +std::string str = std::format("test = {} times", k);_mean 1897 ns 1894 ns 4 +std::string str = std::format("test = {} times", k);_median 1891 ns 1904 ns 4 +std::string str = std::format("test = {} times", k);_stddev 55.6 ns 71.5 ns 4 +std::string str = std::format("test = {} times", k);_cv 2.93 % 3.77 % 4 +lstringa<8> str; str.format("test = {} times", k);_mean 2073 ns 2074 ns 4 +lstringa<8> str; str.format("test = {} times", k);_median 2067 ns 2086 ns 4 +lstringa<8> str; str.format("test = {} times", k);_stddev 28.0 ns 22.7 ns 4 +lstringa<8> str; str.format("test = {} times", k);_cv 1.35 % 1.09 % 4 +lstringa<32> str; str.format("test = {} times", k);_mean 1100 ns 1104 ns 4 +lstringa<32> str; str.format("test = {} times", k);_median 1120 ns 1120 ns 4 +lstringa<32> str; str.format("test = {} times", k);_stddev 49.7 ns 55.0 ns 4 +lstringa<32> str; str.format("test = {} times", k);_cv 4.52 % 4.99 % 4 +lstringa<8> str = "test = " + k + " times";_mean 867 ns 854 ns 4 +lstringa<8> str = "test = " + k + " times";_median 857 ns 854 ns 4 +lstringa<8> str = "test = " + k + " times";_stddev 63.4 ns 71.9 ns 4 +lstringa<8> str = "test = " + k + " times";_cv 7.31 % 8.41 % 4 +lstringa<32> str = "test = " + k + " times";_mean 168 ns 167 ns 4 +lstringa<32> str = "test = " + k + " times";_median 167 ns 167 ns 4 +lstringa<32> str = "test = " + k + " times";_stddev 12.8 ns 14.2 ns 4 +lstringa<32> str = "test = " + k + " times";_cv 7.58 % 8.51 % 4 +stringa str = "test = " + k + " times";_mean 152 ns 152 ns 4 +stringa str = "test = " + k + " times";_median 152 ns 152 ns 4 +stringa str = "test = " + k + " times";_stddev 1.88 ns 2.22 ns 4 +stringa str = "test = " + k + " times";_cv 1.23 % 1.46 % 4 -- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find + substr + std::strtol_mean 540 ns 540 ns 10 -std::string::find + substr + std::strtol_median 538 ns 544 ns 10 -std::string::find + substr + std::strtol_stddev 15.5 ns 14.8 ns 10 -std::string::find + substr + std::strtol_cv 2.88 % 2.74 % 10 -ssa::splitter + ssa::as_int_mean 168 ns 167 ns 10 -ssa::splitter + ssa::as_int_median 168 ns 170 ns 10 -ssa::splitter + ssa::as_int_stddev 3.41 ns 4.83 ns 10 -ssa::splitter + ssa::as_int_cv 2.03 % 2.89 % 10 -ssa::splitf + functor_mean 191 ns 190 ns 10 -ssa::splitf + functor_median 189 ns 188 ns 10 -ssa::splitf + functor_stddev 5.33 ns 6.91 ns 10 -ssa::splitf + functor_cv 2.79 % 3.64 % 10 +std::string::find + substr + std::strtol_mean 550 ns 547 ns 4 +std::string::find + substr + std::strtol_median 550 ns 547 ns 4 +std::string::find + substr + std::strtol_stddev 4.67 ns 0.000 ns 4 +std::string::find + substr + std::strtol_cv 0.85 % 0.00 % 4 +ssa::splitter + ssa::as_int_mean 160 ns 160 ns 4 +ssa::splitter + ssa::as_int_median 160 ns 161 ns 4 +ssa::splitter + ssa::as_int_stddev 1.38 ns 1.92 ns 4 +ssa::splitter + ssa::as_int_cv 0.86 % 1.20 % 4 +ssa::splitf + functor_mean 198 ns 198 ns 4 +ssa::splitf + functor_median 191 ns 190 ns 4 +ssa::splitf + functor_stddev 20.9 ns 19.7 ns 4 +ssa::splitf + functor_cv 10.58 % 9.98 % 4 -- Replace symbols in text ~400 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Naive (and wrong) replace symbols with std::string find + replace_mean 1089 ns 1088 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_median 1094 ns 1088 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_stddev 16.1 ns 17.1 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_cv 1.48 % 1.57 % 10 -replace symbols with std::string find_first_of + replace_mean 2072 ns 2072 ns 10 -replace symbols with std::string find_first_of + replace_median 2010 ns 2018 ns 10 -replace symbols with std::string find_first_of + replace_stddev 110 ns 115 ns 10 -replace symbols with std::string find_first_of + replace_cv 5.33 % 5.56 % 10 -replace symbols with std::string_view find_first_of + copy_mean 2459 ns 2454 ns 10 -replace symbols with std::string_view find_first_of + copy_median 2462 ns 2433 ns 10 -replace symbols with std::string_view find_first_of + copy_stddev 149 ns 157 ns 10 -replace symbols with std::string_view find_first_of + copy_cv 6.05 % 6.39 % 10 -replace runtime symbols with string expressions and without remembering all search results_mean 1413 ns 1409 ns 10 -replace runtime symbols with string expressions and without remembering all search results_median 1409 ns 1413 ns 10 -replace runtime symbols with string expressions and without remembering all search results_stddev 23.7 ns 33.7 ns 10 -replace runtime symbols with string expressions and without remembering all search results_cv 1.68 % 2.39 % 10 -replace runtime symbols with simstr and memorization of all search results_mean 1334 ns 1328 ns 10 -replace runtime symbols with simstr and memorization of all search results_median 1318 ns 1311 ns 10 -replace runtime symbols with simstr and memorization of all search results_stddev 42.5 ns 32.8 ns 10 -replace runtime symbols with simstr and memorization of all search results_cv 3.18 % 2.47 % 10 -replace const symbols with string expressions and without remembering all search results_mean 1140 ns 1140 ns 10 -replace const symbols with string expressions and without remembering all search results_median 1139 ns 1147 ns 10 -replace const symbols with string expressions and without remembering all search results_stddev 24.7 ns 25.9 ns 10 -replace const symbols with string expressions and without remembering all search results_cv 2.17 % 2.27 % 10 -replace const symbols with string expressions and memorization of all search results_mean 1280 ns 1278 ns 10 -replace const symbols with string expressions and memorization of all search results_median 1264 ns 1256 ns 10 -replace const symbols with string expressions and memorization of all search results_stddev 66.0 ns 71.8 ns 10 -replace const symbols with string expressions and memorization of all search results_cv 5.16 % 5.62 % 10 +Naive (and wrong) replace symbols with std::string find + replace_mean 1118 ns 1117 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_median 1112 ns 1111 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_stddev 28.9 ns 23.4 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_cv 2.59 % 2.09 % 4 +replace symbols with std::string find_first_of + replace_mean 1990 ns 1995 ns 4 +replace symbols with std::string find_first_of + replace_median 1997 ns 2018 ns 4 +replace symbols with std::string find_first_of + replace_stddev 50.0 ns 64.1 ns 4 +replace symbols with std::string find_first_of + replace_cv 2.51 % 3.21 % 4 +replace symbols with std::string_view find_first_of + copy_mean 2369 ns 2372 ns 4 +replace symbols with std::string_view find_first_of + copy_median 2371 ns 2372 ns 4 +replace symbols with std::string_view find_first_of + copy_stddev 19.3 ns 32.2 ns 4 +replace symbols with std::string_view find_first_of + copy_cv 0.82 % 1.36 % 4 +replace runtime symbols with string expressions and without remembering all search results_mean 1454 ns 1460 ns 4 +replace runtime symbols with string expressions and without remembering all search results_median 1454 ns 1460 ns 4 +replace runtime symbols with string expressions and without remembering all search results_stddev 29.0 ns 18.1 ns 4 +replace runtime symbols with string expressions and without remembering all search results_cv 1.99 % 1.24 % 4 +replace runtime symbols with simstr and memorization of all search results_mean 1391 ns 1386 ns 4 +replace runtime symbols with simstr and memorization of all search results_median 1381 ns 1378 ns 4 +replace runtime symbols with simstr and memorization of all search results_stddev 58.6 ns 59.6 ns 4 +replace runtime symbols with simstr and memorization of all search results_cv 4.21 % 4.30 % 4 +replace const symbols with string expressions and without remembering all search results_mean 1223 ns 1221 ns 4 +replace const symbols with string expressions and without remembering all search results_median 1217 ns 1214 ns 4 +replace const symbols with string expressions and without remembering all search results_stddev 19.4 ns 26.7 ns 4 +replace const symbols with string expressions and without remembering all search results_cv 1.59 % 2.19 % 4 +replace const symbols with string expressions and memorization of all search results_mean 1106 ns 1099 ns 4 +replace const symbols with string expressions and memorization of all search results_median 1100 ns 1099 ns 4 +replace const symbols with string expressions and memorization of all search results_stddev 13.9 ns 0.000 ns 4 +replace const symbols with string expressions and memorization of all search results_cv 1.25 % 0.00 % 4 -- Replace symbols in text ~40 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Short Naive (and wrong) replace symbols with std::string find + replace_mean 314 ns 313 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_median 313 ns 310 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_stddev 6.62 ns 9.18 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.11 % 2.94 % 10 -Short replace symbols with std::string find_first_of + replace_mean 368 ns 368 ns 10 -Short replace symbols with std::string find_first_of + replace_median 367 ns 365 ns 10 -Short replace symbols with std::string find_first_of + replace_stddev 10.3 ns 12.2 ns 10 -Short replace symbols with std::string find_first_of + replace_cv 2.81 % 3.32 % 10 -Short replace symbols with std::string_view find_first_of + copy_mean 326 ns 326 ns 10 -Short replace symbols with std::string_view find_first_of + copy_median 324 ns 326 ns 10 -Short replace symbols with std::string_view find_first_of + copy_stddev 7.28 ns 9.30 ns 10 -Short replace symbols with std::string_view find_first_of + copy_cv 2.24 % 2.85 % 10 -Short replace runtime symbols with string expressions and without remembering all search results_mean 266 ns 265 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_median 260 ns 259 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_stddev 19.6 ns 19.6 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_cv 7.40 % 7.38 % 10 -Short replace runtime symbols with simstr and memorization of all search results_mean 374 ns 375 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_median 365 ns 361 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_stddev 24.0 ns 24.8 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_cv 6.42 % 6.62 % 10 -Short replace const symbols with string expressions and without remembering all search results_mean 217 ns 217 ns 10 -Short replace const symbols with string expressions and without remembering all search results_median 217 ns 215 ns 10 -Short replace const symbols with string expressions and without remembering all search results_stddev 6.03 ns 7.35 ns 10 -Short replace const symbols with string expressions and without remembering all search results_cv 2.78 % 3.39 % 10 -Short replace const symbols with string expressions and memorization of all search results_mean 315 ns 315 ns 10 -Short replace const symbols with string expressions and memorization of all search results_median 315 ns 315 ns 10 -Short replace const symbols with string expressions and memorization of all search results_stddev 5.16 ns 6.91 ns 10 -Short replace const symbols with string expressions and memorization of all search results_cv 1.64 % 2.19 % 10 +Short Naive (and wrong) replace symbols with std::string find + replace_mean 319 ns 318 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_median 312 ns 314 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_stddev 17.9 ns 15.1 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_cv 5.61 % 4.75 % 4 +Short replace symbols with std::string find_first_of + replace_mean 371 ns 370 ns 4 +Short replace symbols with std::string find_first_of + replace_median 368 ns 368 ns 4 +Short replace symbols with std::string find_first_of + replace_stddev 14.4 ns 15.8 ns 4 +Short replace symbols with std::string find_first_of + replace_cv 3.88 % 4.27 % 4 +Short replace symbols with std::string_view find_first_of + copy_mean 327 ns 328 ns 4 +Short replace symbols with std::string_view find_first_of + copy_median 316 ns 315 ns 4 +Short replace symbols with std::string_view find_first_of + copy_stddev 24.0 ns 25.6 ns 4 +Short replace symbols with std::string_view find_first_of + copy_cv 7.32 % 7.82 % 4 +Short replace runtime symbols with string expressions and without remembering all search results_mean 268 ns 268 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_median 267 ns 270 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_stddev 6.66 ns 9.42 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_cv 2.49 % 3.51 % 4 +Short replace runtime symbols with simstr and memorization of all search results_mean 388 ns 387 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_median 385 ns 385 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_stddev 34.8 ns 35.5 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_cv 8.98 % 9.17 % 4 +Short replace const symbols with string expressions and without remembering all search results_mean 241 ns 242 ns 4 +Short replace const symbols with string expressions and without remembering all search results_median 233 ns 235 ns 4 +Short replace const symbols with string expressions and without remembering all search results_stddev 24.7 ns 24.3 ns 4 +Short replace const symbols with string expressions and without remembering all search results_cv 10.24 % 10.06 % 4 +Short replace const symbols with string expressions and memorization of all search results_mean 279 ns 279 ns 4 +Short replace const symbols with string expressions and memorization of all search results_median 281 ns 283 ns 4 +Short replace const symbols with string expressions and memorization of all search results_stddev 7.30 ns 6.28 ns 4 +Short replace const symbols with string expressions and memorization of all search results_cv 2.62 % 2.25 % 4 ----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to ---- in std::string|64_mean 228 ns 227 ns 10 -replace bb to ---- in std::string|64_median 229 ns 225 ns 10 -replace bb to ---- in std::string|64_stddev 6.48 ns 6.59 ns 10 -replace bb to ---- in std::string|64_cv 2.84 % 2.91 % 10 -replace bb to ---- in std::string|256_mean 754 ns 750 ns 10 -replace bb to ---- in std::string|256_median 757 ns 750 ns 10 -replace bb to ---- in std::string|256_stddev 13.8 ns 16.4 ns 10 -replace bb to ---- in std::string|256_cv 1.84 % 2.19 % 10 -replace bb to ---- in std::string|512_mean 1411 ns 1409 ns 10 -replace bb to ---- in std::string|512_median 1410 ns 1413 ns 10 -replace bb to ---- in std::string|512_stddev 16.9 ns 23.2 ns 10 -replace bb to ---- in std::string|512_cv 1.20 % 1.64 % 10 -replace bb to ---- in std::string|1024_mean 3115 ns 3118 ns 10 -replace bb to ---- in std::string|1024_median 3109 ns 3139 ns 10 -replace bb to ---- in std::string|1024_stddev 36.1 ns 47.1 ns 10 -replace bb to ---- in std::string|1024_cv 1.16 % 1.51 % 10 -replace bb to ---- in std::string|2048_mean 8203 ns 8161 ns 10 -replace bb to ---- in std::string|2048_median 7969 ns 7952 ns 10 -replace bb to ---- in std::string|2048_stddev 538 ns 527 ns 10 -replace bb to ---- in std::string|2048_cv 6.56 % 6.46 % 10 -replace bb to ---- in lstringa<8>|64_mean 231 ns 230 ns 10 -replace bb to ---- in lstringa<8>|64_median 223 ns 222 ns 10 -replace bb to ---- in lstringa<8>|64_stddev 16.5 ns 17.0 ns 10 -replace bb to ---- in lstringa<8>|64_cv 7.16 % 7.39 % 10 -replace bb to ---- in lstringa<8>|256_mean 624 ns 623 ns 10 -replace bb to ---- in lstringa<8>|256_median 615 ns 609 ns 10 -replace bb to ---- in lstringa<8>|256_stddev 33.9 ns 33.3 ns 10 -replace bb to ---- in lstringa<8>|256_cv 5.44 % 5.34 % 10 -replace bb to ---- in lstringa<8>|512_mean 1021 ns 1018 ns 10 -replace bb to ---- in lstringa<8>|512_median 1019 ns 1025 ns 10 -replace bb to ---- in lstringa<8>|512_stddev 10.6 ns 16.5 ns 10 -replace bb to ---- in lstringa<8>|512_cv 1.04 % 1.62 % 10 -replace bb to ---- in lstringa<8>|1024_mean 1832 ns 1826 ns 10 -replace bb to ---- in lstringa<8>|1024_median 1824 ns 1822 ns 10 -replace bb to ---- in lstringa<8>|1024_stddev 36.5 ns 26.8 ns 10 -replace bb to ---- in lstringa<8>|1024_cv 1.99 % 1.47 % 10 -replace bb to ---- in lstringa<8>|2048_mean 3573 ns 3560 ns 10 -replace bb to ---- in lstringa<8>|2048_median 3537 ns 3530 ns 10 -replace bb to ---- in lstringa<8>|2048_stddev 97.3 ns 97.1 ns 10 -replace bb to ---- in lstringa<8>|2048_cv 2.72 % 2.73 % 10 -replace bb to ---- by init stringa|64_mean 179 ns 179 ns 10 -replace bb to ---- by init stringa|64_median 180 ns 180 ns 10 -replace bb to ---- by init stringa|64_stddev 4.23 ns 4.80 ns 10 -replace bb to ---- by init stringa|64_cv 2.36 % 2.68 % 10 -replace bb to ---- by init stringa|256_mean 384 ns 383 ns 10 -replace bb to ---- by init stringa|256_median 384 ns 385 ns 10 -replace bb to ---- by init stringa|256_stddev 9.03 ns 8.65 ns 10 -replace bb to ---- by init stringa|256_cv 2.35 % 2.26 % 10 -replace bb to ---- by init stringa|512_mean 825 ns 825 ns 10 -replace bb to ---- by init stringa|512_median 823 ns 820 ns 10 -replace bb to ---- by init stringa|512_stddev 17.3 ns 16.5 ns 10 -replace bb to ---- by init stringa|512_cv 2.10 % 2.01 % 10 -replace bb to ---- by init stringa|1024_mean 1750 ns 1746 ns 10 -replace bb to ---- by init stringa|1024_median 1707 ns 1707 ns 10 -replace bb to ---- by init stringa|1024_stddev 113 ns 123 ns 10 -replace bb to ---- by init stringa|1024_cv 6.45 % 7.05 % 10 -replace bb to ---- by init stringa|2048_mean 3143 ns 3147 ns 10 -replace bb to ---- by init stringa|2048_median 3113 ns 3128 ns 10 -replace bb to ---- by init stringa|2048_stddev 73.8 ns 74.7 ns 10 -replace bb to ---- by init stringa|2048_cv 2.35 % 2.37 % 10 +replace bb to ---- in std::string|64_mean 240 ns 240 ns 4 +replace bb to ---- in std::string|64_median 241 ns 244 ns 4 +replace bb to ---- in std::string|64_stddev 14.6 ns 14.6 ns 4 +replace bb to ---- in std::string|64_cv 6.10 % 6.06 % 4 +replace bb to ---- in std::string|256_mean 858 ns 828 ns 4 +replace bb to ---- in std::string|256_median 852 ns 837 ns 4 +replace bb to ---- in std::string|256_stddev 84.1 ns 46.1 ns 4 +replace bb to ---- in std::string|256_cv 9.81 % 5.57 % 4 +replace bb to ---- in std::string|512_mean 1446 ns 1447 ns 4 +replace bb to ---- in std::string|512_median 1450 ns 1447 ns 4 +replace bb to ---- in std::string|512_stddev 15.0 ns 20.1 ns 4 +replace bb to ---- in std::string|512_cv 1.04 % 1.39 % 4 +replace bb to ---- in std::string|1024_mean 3194 ns 3191 ns 4 +replace bb to ---- in std::string|1024_median 3193 ns 3174 ns 4 +replace bb to ---- in std::string|1024_stddev 14.4 ns 66.8 ns 4 +replace bb to ---- in std::string|1024_cv 0.45 % 2.09 % 4 +replace bb to ---- in std::string|2048_mean 7825 ns 7847 ns 4 +replace bb to ---- in std::string|2048_median 7807 ns 7882 ns 4 +replace bb to ---- in std::string|2048_stddev 241 ns 134 ns 4 +replace bb to ---- in std::string|2048_cv 3.08 % 1.70 % 4 +replace bb to ---- in lstringa<8>|64_mean 224 ns 225 ns 4 +replace bb to ---- in lstringa<8>|64_median 218 ns 220 ns 4 +replace bb to ---- in lstringa<8>|64_stddev 12.5 ns 13.2 ns 4 +replace bb to ---- in lstringa<8>|64_cv 5.56 % 5.89 % 4 +replace bb to ---- in lstringa<8>|256_mean 619 ns 617 ns 4 +replace bb to ---- in lstringa<8>|256_median 614 ns 614 ns 4 +replace bb to ---- in lstringa<8>|256_stddev 11.5 ns 6.98 ns 4 +replace bb to ---- in lstringa<8>|256_cv 1.86 % 1.13 % 4 +replace bb to ---- in lstringa<8>|512_mean 1083 ns 1074 ns 4 +replace bb to ---- in lstringa<8>|512_median 1085 ns 1086 ns 4 +replace bb to ---- in lstringa<8>|512_stddev 22.7 ns 34.5 ns 4 +replace bb to ---- in lstringa<8>|512_cv 2.09 % 3.21 % 4 +replace bb to ---- in lstringa<8>|1024_mean 1886 ns 1889 ns 4 +replace bb to ---- in lstringa<8>|1024_median 1860 ns 1861 ns 4 +replace bb to ---- in lstringa<8>|1024_stddev 60.6 ns 72.6 ns 4 +replace bb to ---- in lstringa<8>|1024_cv 3.21 % 3.84 % 4 +replace bb to ---- in lstringa<8>|2048_mean 3625 ns 3630 ns 4 +replace bb to ---- in lstringa<8>|2048_median 3600 ns 3610 ns 4 +replace bb to ---- in lstringa<8>|2048_stddev 53.5 ns 40.1 ns 4 +replace bb to ---- in lstringa<8>|2048_cv 1.48 % 1.10 % 4 +replace bb to ---- by init stringa|64_mean 177 ns 177 ns 4 +replace bb to ---- by init stringa|64_median 175 ns 174 ns 4 +replace bb to ---- by init stringa|64_stddev 11.0 ns 11.0 ns 4 +replace bb to ---- by init stringa|64_cv 6.18 % 6.22 % 4 +replace bb to ---- by init stringa|256_mean 371 ns 369 ns 4 +replace bb to ---- by init stringa|256_median 373 ns 369 ns 4 +replace bb to ---- by init stringa|256_stddev 5.31 ns 6.55 ns 4 +replace bb to ---- by init stringa|256_cv 1.43 % 1.77 % 4 +replace bb to ---- by init stringa|512_mean 813 ns 815 ns 4 +replace bb to ---- by init stringa|512_median 815 ns 811 ns 4 +replace bb to ---- by init stringa|512_stddev 14.1 ns 16.7 ns 4 +replace bb to ---- by init stringa|512_cv 1.73 % 2.05 % 4 +replace bb to ---- by init stringa|1024_mean 1634 ns 1639 ns 4 +replace bb to ---- by init stringa|1024_median 1637 ns 1639 ns 4 +replace bb to ---- by init stringa|1024_stddev 39.2 ns 28.5 ns 4 +replace bb to ---- by init stringa|1024_cv 2.40 % 1.74 % 4 +replace bb to ---- by init stringa|2048_mean 3081 ns 3081 ns 4 +replace bb to ---- by init stringa|2048_median 3012 ns 3015 ns 4 +replace bb to ---- by init stringa|2048_stddev 173 ns 158 ns 4 +replace bb to ---- by init stringa|2048_cv 5.60 % 5.12 % 4 ----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to -- in std::string|64_mean 198 ns 198 ns 10 -replace bb to -- in std::string|64_median 197 ns 197 ns 10 -replace bb to -- in std::string|64_stddev 7.91 ns 6.85 ns 10 -replace bb to -- in std::string|64_cv 4.01 % 3.46 % 10 -replace bb to -- in std::string|256_mean 476 ns 475 ns 10 -replace bb to -- in std::string|256_median 473 ns 469 ns 10 -replace bb to -- in std::string|256_stddev 22.6 ns 22.3 ns 10 -replace bb to -- in std::string|256_cv 4.75 % 4.70 % 10 -replace bb to -- in std::string|512_mean 838 ns 834 ns 10 -replace bb to -- in std::string|512_median 837 ns 837 ns 10 -replace bb to -- in std::string|512_stddev 12.3 ns 18.0 ns 10 -replace bb to -- in std::string|512_cv 1.47 % 2.16 % 10 -replace bb to -- in std::string|1024_mean 1609 ns 1604 ns 10 -replace bb to -- in std::string|1024_median 1606 ns 1611 ns 10 -replace bb to -- in std::string|1024_stddev 29.7 ns 30.3 ns 10 -replace bb to -- in std::string|1024_cv 1.85 % 1.89 % 10 -replace bb to -- in std::string|2048_mean 3121 ns 3125 ns 10 -replace bb to -- in std::string|2048_median 3113 ns 3139 ns 10 -replace bb to -- in std::string|2048_stddev 80.0 ns 79.2 ns 10 -replace bb to -- in std::string|2048_cv 2.56 % 2.53 % 10 -replace bb to -- in lstringa<8>|64_mean 185 ns 185 ns 10 -replace bb to -- in lstringa<8>|64_median 183 ns 184 ns 10 -replace bb to -- in lstringa<8>|64_stddev 6.48 ns 5.66 ns 10 -replace bb to -- in lstringa<8>|64_cv 3.50 % 3.06 % 10 -replace bb to -- in lstringa<8>|256_mean 445 ns 445 ns 10 -replace bb to -- in lstringa<8>|256_median 442 ns 445 ns 10 -replace bb to -- in lstringa<8>|256_stddev 9.46 ns 6.74 ns 10 -replace bb to -- in lstringa<8>|256_cv 2.12 % 1.52 % 10 -replace bb to -- in lstringa<8>|512_mean 763 ns 764 ns 10 -replace bb to -- in lstringa<8>|512_median 766 ns 767 ns 10 -replace bb to -- in lstringa<8>|512_stddev 14.7 ns 16.0 ns 10 -replace bb to -- in lstringa<8>|512_cv 1.93 % 2.10 % 10 -replace bb to -- in lstringa<8>|1024_mean 1417 ns 1417 ns 10 -replace bb to -- in lstringa<8>|1024_median 1419 ns 1423 ns 10 -replace bb to -- in lstringa<8>|1024_stddev 23.3 ns 28.8 ns 10 -replace bb to -- in lstringa<8>|1024_cv 1.64 % 2.03 % 10 -replace bb to -- in lstringa<8>|2048_mean 2763 ns 2763 ns 10 -replace bb to -- in lstringa<8>|2048_median 2780 ns 2787 ns 10 -replace bb to -- in lstringa<8>|2048_stddev 43.9 ns 50.0 ns 10 -replace bb to -- in lstringa<8>|2048_cv 1.59 % 1.81 % 10 -replace bb to -- by init stringa|64_mean 172 ns 171 ns 10 -replace bb to -- by init stringa|64_median 169 ns 167 ns 10 -replace bb to -- by init stringa|64_stddev 15.8 ns 15.8 ns 10 -replace bb to -- by init stringa|64_cv 9.19 % 9.20 % 10 -replace bb to -- by init stringa|256_mean 361 ns 361 ns 10 -replace bb to -- by init stringa|256_median 347 ns 344 ns 10 -replace bb to -- by init stringa|256_stddev 30.1 ns 29.4 ns 10 -replace bb to -- by init stringa|256_cv 8.33 % 8.15 % 10 -replace bb to -- by init stringa|512_mean 568 ns 568 ns 10 -replace bb to -- by init stringa|512_median 565 ns 572 ns 10 -replace bb to -- by init stringa|512_stddev 11.5 ns 13.2 ns 10 -replace bb to -- by init stringa|512_cv 2.02 % 2.33 % 10 -replace bb to -- by init stringa|1024_mean 1050 ns 1046 ns 10 -replace bb to -- by init stringa|1024_median 1046 ns 1046 ns 10 -replace bb to -- by init stringa|1024_stddev 21.4 ns 22.1 ns 10 -replace bb to -- by init stringa|1024_cv 2.04 % 2.11 % 10 -replace bb to -- by init stringa|2048_mean 1968 ns 1967 ns 10 -replace bb to -- by init stringa|2048_median 1950 ns 1967 ns 10 -replace bb to -- by init stringa|2048_stddev 51.5 ns 44.1 ns 10 -replace bb to -- by init stringa|2048_cv 2.62 % 2.24 % 10 +replace bb to -- in std::string|64_mean 195 ns 194 ns 4 +replace bb to -- in std::string|64_median 193 ns 193 ns 4 +replace bb to -- in std::string|64_stddev 5.94 ns 4.34 ns 4 +replace bb to -- in std::string|64_cv 3.05 % 2.24 % 4 +replace bb to -- in std::string|256_mean 477 ns 479 ns 4 +replace bb to -- in std::string|256_median 474 ns 476 ns 4 +replace bb to -- in std::string|256_stddev 5.61 ns 10.0 ns 4 +replace bb to -- in std::string|256_cv 1.18 % 2.09 % 4 +replace bb to -- in std::string|512_mean 875 ns 879 ns 4 +replace bb to -- in std::string|512_median 876 ns 879 ns 4 +replace bb to -- in std::string|512_stddev 8.92 ns 24.2 ns 4 +replace bb to -- in std::string|512_cv 1.02 % 2.75 % 4 +replace bb to -- in std::string|1024_mean 1630 ns 1613 ns 4 +replace bb to -- in std::string|1024_median 1628 ns 1604 ns 4 +replace bb to -- in std::string|1024_stddev 18.8 ns 17.4 ns 4 +replace bb to -- in std::string|1024_cv 1.15 % 1.08 % 4 +replace bb to -- in std::string|2048_mean 3278 ns 3278 ns 4 +replace bb to -- in std::string|2048_median 3273 ns 3278 ns 4 +replace bb to -- in std::string|2048_stddev 32.9 ns 57.0 ns 4 +replace bb to -- in std::string|2048_cv 1.00 % 1.74 % 4 +replace bb to -- in lstringa<8>|64_mean 182 ns 181 ns 4 +replace bb to -- in lstringa<8>|64_median 180 ns 178 ns 4 +replace bb to -- in lstringa<8>|64_stddev 6.94 ns 7.92 ns 4 +replace bb to -- in lstringa<8>|64_cv 3.82 % 4.38 % 4 +replace bb to -- in lstringa<8>|256_mean 440 ns 438 ns 4 +replace bb to -- in lstringa<8>|256_median 439 ns 438 ns 4 +replace bb to -- in lstringa<8>|256_stddev 8.17 ns 12.2 ns 4 +replace bb to -- in lstringa<8>|256_cv 1.86 % 2.78 % 4 +replace bb to -- in lstringa<8>|512_mean 847 ns 850 ns 4 +replace bb to -- in lstringa<8>|512_median 844 ns 846 ns 4 +replace bb to -- in lstringa<8>|512_stddev 72.3 ns 74.5 ns 4 +replace bb to -- in lstringa<8>|512_cv 8.54 % 8.76 % 4 +replace bb to -- in lstringa<8>|1024_mean 1580 ns 1583 ns 4 +replace bb to -- in lstringa<8>|1024_median 1575 ns 1576 ns 4 +replace bb to -- in lstringa<8>|1024_stddev 120 ns 119 ns 4 +replace bb to -- in lstringa<8>|1024_cv 7.60 % 7.53 % 4 +replace bb to -- in lstringa<8>|2048_mean 2828 ns 2809 ns 4 +replace bb to -- in lstringa<8>|2048_median 2784 ns 2762 ns 4 +replace bb to -- in lstringa<8>|2048_stddev 146 ns 139 ns 4 +replace bb to -- in lstringa<8>|2048_cv 5.18 % 4.95 % 4 +replace bb to -- by init stringa|64_mean 153 ns 153 ns 4 +replace bb to -- by init stringa|64_median 153 ns 153 ns 4 +replace bb to -- by init stringa|64_stddev 5.30 ns 5.23 ns 4 +replace bb to -- by init stringa|64_cv 3.47 % 3.43 % 4 +replace bb to -- by init stringa|256_mean 355 ns 353 ns 4 +replace bb to -- by init stringa|256_median 355 ns 353 ns 4 +replace bb to -- by init stringa|256_stddev 3.88 ns 6.55 ns 4 +replace bb to -- by init stringa|256_cv 1.09 % 1.86 % 4 +replace bb to -- by init stringa|512_mean 599 ns 600 ns 4 +replace bb to -- by init stringa|512_median 598 ns 600 ns 4 +replace bb to -- by init stringa|512_stddev 17.8 ns 22.8 ns 4 +replace bb to -- by init stringa|512_cv 2.97 % 3.80 % 4 +replace bb to -- by init stringa|1024_mean 1077 ns 1080 ns 4 +replace bb to -- by init stringa|1024_median 1080 ns 1086 ns 4 +replace bb to -- by init stringa|1024_stddev 27.0 ns 23.4 ns 4 +replace bb to -- by init stringa|1024_cv 2.50 % 2.16 % 4 +replace bb to -- by init stringa|2048_mean 2138 ns 2145 ns 4 +replace bb to -- by init stringa|2048_median 2049 ns 2051 ns 4 +replace bb to -- by init stringa|2048_stddev 193 ns 188 ns 4 +replace bb to -- by init stringa|2048_cv 9.05 % 8.78 % 4 ----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -hashStrMapA emplace & find stringa;_mean 3812101 ns 3806323 ns 10 -hashStrMapA emplace & find stringa;_median 3815927 ns 3815407 ns 10 -hashStrMapA emplace & find stringa;_stddev 166367 ns 178889 ns 10 -hashStrMapA emplace & find stringa;_cv 4.36 % 4.70 % 10 -std::unordered_map emplace & find std::string;_mean 5442291 ns 5426897 ns 10 -std::unordered_map emplace & find std::string;_median 5389030 ns 5371094 ns 10 -std::unordered_map emplace & find std::string;_stddev 264610 ns 311605 ns 10 -std::unordered_map emplace & find std::string;_cv 4.86 % 5.74 % 10 -hashStrMapA emplace & find ssa;_mean 3443667 ns 3403756 ns 10 -hashStrMapA emplace & find ssa;_median 3430798 ns 3374413 ns 10 -hashStrMapA emplace & find ssa;_stddev 42379 ns 78856 ns 10 -hashStrMapA emplace & find ssa;_cv 1.23 % 2.32 % 10 -std::unordered_map emplace & find std::string_view;_mean 6274459 ns 6267361 ns 10 -std::unordered_map emplace & find std::string_view;_median 6286233 ns 6250000 ns 10 -std::unordered_map emplace & find std::string_view;_stddev 123993 ns 172644 ns 10 -std::unordered_map emplace & find std::string_view;_cv 1.98 % 2.75 % 10 +hashStrMapA emplace & find stringa;_mean 3978350 ns 3971718 ns 4 +hashStrMapA emplace & find stringa;_median 3976258 ns 3971718 ns 4 +hashStrMapA emplace & find stringa;_stddev 14214 ns 50397 ns 4 +hashStrMapA emplace & find stringa;_cv 0.36 % 1.27 % 4 +std::unordered_map emplace & find std::string;_mean 5607567 ns 5625000 ns 4 +std::unordered_map emplace & find std::string;_median 5668341 ns 5703125 ns 4 +std::unordered_map emplace & find std::string;_stddev 196407 ns 220971 ns 4 +std::unordered_map emplace & find std::string;_cv 3.50 % 3.93 % 4 +hashStrMapA emplace & find ssa;_mean 3489211 ns 3485577 ns 4 +hashStrMapA emplace & find ssa;_median 3444766 ns 3445513 ns 4 +hashStrMapA emplace & find ssa;_stddev 114075 ns 153434 ns 4 +hashStrMapA emplace & find ssa;_cv 3.27 % 4.40 % 4 +std::unordered_map emplace & find std::string_view;_mean 6249698 ns 6250000 ns 4 +std::unordered_map emplace & find std::string_view;_median 6254047 ns 6250000 ns 4 +std::unordered_map emplace & find std::string_view;_stddev 121093 ns 127578 ns 4 +std::unordered_map emplace & find std::string_view;_cv 1.94 % 2.04 % 4 ----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Build func full name std::string;_mean 1557 ns 1556 ns 10 -Build func full name std::string;_median 1559 ns 1552 ns 10 -Build func full name std::string;_stddev 28.8 ns 40.9 ns 10 -Build func full name std::string;_cv 1.85 % 2.63 % 10 -Build func full name std::string 1;_mean 1575 ns 1569 ns 10 -Build func full name std::string 1;_median 1564 ns 1549 ns 10 -Build func full name std::string 1;_stddev 44.6 ns 40.7 ns 10 -Build func full name std::string 1;_cv 2.83 % 2.59 % 10 -Build func full name std::stream;_mean 8287 ns 8287 ns 10 -Build func full name std::stream;_median 8092 ns 8161 ns 10 -Build func full name std::stream;_stddev 591 ns 648 ns 10 -Build func full name std::stream;_cv 7.13 % 7.82 % 10 -Build func full name stringa;_mean 813 ns 813 ns 10 -Build func full name stringa;_median 811 ns 802 ns 10 -Build func full name stringa;_stddev 8.81 ns 14.7 ns 10 -Build func full name stringa;_cv 1.08 % 1.81 % 10 -Build func full name stringa 1;_mean 940 ns 942 ns 10 -Build func full name stringa 1;_median 924 ns 924 ns 10 -Build func full name stringa 1;_stddev 41.7 ns 43.5 ns 10 -Build func full name stringa 1;_cv 4.44 % 4.62 % 10 +Build func full name std::string;_mean 1507 ns 1507 ns 4 +Build func full name std::string;_median 1489 ns 1491 ns 4 +Build func full name std::string;_stddev 60.8 ns 67.8 ns 4 +Build func full name std::string;_cv 4.03 % 4.50 % 4 +Build func full name std::string 1;_mean 1543 ns 1543 ns 4 +Build func full name std::string 1;_median 1538 ns 1535 ns 4 +Build func full name std::string 1;_stddev 48.1 ns 52.3 ns 4 +Build func full name std::string 1;_cv 3.12 % 3.39 % 4 +Build func full name std::stream;_mean 8087 ns 8109 ns 4 +Build func full name std::stream;_median 8004 ns 8022 ns 4 +Build func full name std::stream;_stddev 256 ns 302 ns 4 +Build func full name std::stream;_cv 3.17 % 3.72 % 4 +Build func full name stringa;_mean 823 ns 824 ns 4 +Build func full name stringa;_median 821 ns 820 ns 4 +Build func full name stringa;_stddev 13.6 ns 8.72 ns 4 +Build func full name stringa;_cv 1.66 % 1.06 % 4 +Build func full name stringa 1;_mean 939 ns 934 ns 4 +Build func full name stringa 1;_median 940 ns 940 ns 4 +Build func full name stringa 1;_stddev 19.0 ns 23.4 ns 4 +Build func full name stringa 1;_cv 2.02 % 2.50 % 4 diff --git a/bench/results/003-Xeon E5-2682 v4, Windows 10, MSVC-19.txt b/bench/results/003-Xeon E5-2682 v4, Windows 10, MSVC-19.txt index 5df6b51..be0f65f 100644 --- a/bench/results/003-Xeon E5-2682 v4, Windows 10, MSVC-19.txt +++ b/bench/results/003-Xeon E5-2682 v4, Windows 10, MSVC-19.txt @@ -1,4 +1,8 @@ -2026-01-31T15:25:07+03:00 +Benchmarks of simstr, version 1.6.3 +Sources: https://github.com/orefkov/simstr +Results: https://orefkov.github.io/simstr/results.html + +2026-02-03T16:50:53+03:00 Running benchStr.exe Run on (32 X 2494 MHz CPU s) CPU Caches: @@ -10,891 +14,908 @@ CPU Caches: Benchmark Time CPU Iterations -------------------------------------------------------------------------------------------------------------------------------------------------------- ----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and number by std to std::string_mean 313 ns 313 ns 10 -Concat std::string and number by std to std::string_median 312 ns 311 ns 10 -Concat std::string and number by std to std::string_stddev 5.39 ns 5.46 ns 10 -Concat std::string and number by std to std::string_cv 1.72 % 1.74 % 10 -Concat std::string and number by StrExpr to std::string_mean 210 ns 210 ns 10 -Concat std::string and number by StrExpr to std::string_median 210 ns 211 ns 10 -Concat std::string and number by StrExpr to std::string_stddev 4.25 ns 3.73 ns 10 -Concat std::string and number by StrExpr to std::string_cv 2.03 % 1.78 % 10 -Concat stringa and number by StrExpr to simstr::stringa_mean 109 ns 109 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_median 108 ns 109 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_stddev 2.68 ns 2.08 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_cv 2.46 % 1.92 % 10 -Concat stringa and number by e_concat to simstr::stringa_mean 123 ns 123 ns 10 -Concat stringa and number by e_concat to simstr::stringa_median 124 ns 123 ns 10 -Concat stringa and number by e_concat to simstr::stringa_stddev 5.34 ns 4.99 ns 10 -Concat stringa and number by e_concat to simstr::stringa_cv 4.33 % 4.07 % 10 +Concat std::string and number by std to std::string_mean 315 ns 315 ns 4 +Concat std::string and number by std to std::string_median 313 ns 311 ns 4 +Concat std::string and number by std to std::string_stddev 7.91 ns 10.4 ns 4 +Concat std::string and number by std to std::string_cv 2.51 % 3.29 % 4 +Concat std::string and number by StrExpr to std::string_mean 213 ns 211 ns 4 +Concat std::string and number by StrExpr to std::string_median 210 ns 208 ns 4 +Concat std::string and number by StrExpr to std::string_stddev 10.1 ns 9.24 ns 4 +Concat std::string and number by StrExpr to std::string_cv 4.72 % 4.38 % 4 +Concat stringa and number by StrExpr to simstr::stringa_mean 121 ns 121 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_median 121 ns 122 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_stddev 13.4 ns 12.8 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_cv 11.04 % 10.63 % 4 +Concat stringa and number by e_concat to simstr::stringa_mean 119 ns 120 ns 4 +Concat stringa and number by e_concat to simstr::stringa_median 119 ns 120 ns 4 +Concat stringa and number by e_concat to simstr::stringa_stddev 9.85 ns 9.97 ns 4 +Concat stringa and number by e_concat to simstr::stringa_cv 8.25 % 8.33 % 4 ----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and format hex number and literal to std::string_mean 1029 ns 1027 ns 10 -Concat std::string and format hex number and literal to std::string_median 1024 ns 1025 ns 10 -Concat std::string and format hex number and literal to std::string_stddev 32.6 ns 33.4 ns 10 -Concat std::string and format hex number and literal to std::string_cv 3.17 % 3.25 % 10 -std::format std::string and hex number by literal to std::string_mean 1862 ns 1845 ns 10 -std::format std::string and hex number by literal to std::string_median 1854 ns 1842 ns 10 -std::format std::string and hex number by literal to std::string_stddev 32.3 ns 45.9 ns 10 -std::format std::string and hex number by literal to std::string_cv 1.74 % 2.49 % 10 -Concat std::string and std::tochars and string to std::string_mean 256 ns 255 ns 10 -Concat std::string and std::tochars and string to std::string_median 254 ns 251 ns 10 -Concat std::string and std::tochars and string to std::string_stddev 10.0 ns 11.8 ns 10 -Concat std::string and std::tochars and string to std::string_cv 3.91 % 4.65 % 10 -Concat std::string and hex number and literal by StrExpr to std::string_mean 133 ns 133 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_median 133 ns 133 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_stddev 4.24 ns 3.01 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_cv 3.18 % 2.27 % 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 109 ns 109 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 107 ns 108 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 9.15 ns 9.10 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 8.37 % 8.31 % 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 102 ns 101 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_median 101 ns 101 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 1.72 ns 1.71 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.69 % 1.69 % 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_mean 175 ns 174 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_median 174 ns 173 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 5.74 ns 6.82 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_cv 3.28 % 3.91 % 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 346 ns 344 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 345 ns 344 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 6.73 ns 4.88 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.95 % 1.42 % 10 +Concat std::string and format hex number and literal to std::string_mean 1033 ns 1038 ns 4 +Concat std::string and format hex number and literal to std::string_median 1013 ns 1013 ns 4 +Concat std::string and format hex number and literal to std::string_stddev 58.8 ns 58.1 ns 4 +Concat std::string and format hex number and literal to std::string_cv 5.69 % 5.60 % 4 +std::format std::string and hex number by literal to std::string_mean 1841 ns 1842 ns 4 +std::format std::string and hex number by literal to std::string_median 1845 ns 1842 ns 4 +std::format std::string and hex number by literal to std::string_stddev 32.2 ns 34.2 ns 4 +std::format std::string and hex number by literal to std::string_cv 1.75 % 1.86 % 4 +Concat std::string and std::to_chars and string to std::string_mean 251 ns 251 ns 4 +Concat std::string and std::to_chars and string to std::string_median 251 ns 251 ns 4 +Concat std::string and std::to_chars and string to std::string_stddev 1.96 ns 4.56 ns 4 +Concat std::string and std::to_chars and string to std::string_cv 0.78 % 1.81 % 4 +Concat std::string and hex number and literal by StrExpr to std::string_mean 119 ns 118 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_median 118 ns 118 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_stddev 3.75 ns 4.17 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_cv 3.15 % 3.54 % 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 99.3 ns 99.4 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 99.4 ns 99.4 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 1.76 ns 2.70 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 1.77 % 2.72 % 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 104 ns 104 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_median 104 ns 104 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 3.86 ns 3.15 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 3.70 % 3.04 % 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_mean 175 ns 176 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_median 175 ns 175 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 2.58 ns 3.67 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_cv 1.48 % 2.09 % 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 349 ns 349 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 349 ns 349 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 4.17 ns 4.43 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.19 % 1.27 % 4 +----- format/vformat and subst/vsubst octal number ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_mean 206 ns 205 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_median 206 ns 206 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_stddev 7.82 ns 9.35 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_cv 3.81 % 4.56 % 4 +std::format("art {:#010o} end", i)_mean 1678 ns 1685 ns 4 +std::format("art {:#010o} end", i)_median 1666 ns 1674 ns 4 +std::format("art {:#010o} end", i)_stddev 35.6 ns 62.8 ns 4 +std::format("art {:#010o} end", i)_cv 2.12 % 3.73 % 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_mean 354 ns 353 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_median 352 ns 353 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_stddev 12.9 ns 12.2 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_cv 3.64 % 3.44 % 4 +std::vformat(pattern, std::make_format_args(i))_mean 1656 ns 1657 ns 4 +std::vformat(pattern, std::make_format_args(i))_median 1661 ns 1657 ns 4 +std::vformat(pattern, std::make_format_args(i))_stddev 21.1 ns 20.1 ns 4 +std::vformat(pattern, std::make_format_args(i))_cv 1.27 % 1.22 % 4 ----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string by std to std::string_mean 56.5 ns 56.6 ns 10 -Concat std::string by std to std::string_median 55.5 ns 55.5 ns 10 -Concat std::string by std to std::string_stddev 3.15 ns 3.28 ns 10 -Concat std::string by std to std::string_cv 5.58 % 5.79 % 10 -Concat std::string by StrExpr to std::string_mean 83.3 ns 83.0 ns 10 -Concat std::string by StrExpr to std::string_median 82.7 ns 82.0 ns 10 -Concat std::string by StrExpr to std::string_stddev 3.88 ns 4.37 ns 10 -Concat std::string by StrExpr to std::string_cv 4.66 % 5.26 % 10 -Concat stringa by StrExpr to stringa_mean 52.4 ns 52.2 ns 10 -Concat stringa by StrExpr to stringa_median 51.2 ns 51.6 ns 10 -Concat stringa by StrExpr to stringa_stddev 2.66 ns 2.73 ns 10 -Concat stringa by StrExpr to stringa_cv 5.07 % 5.23 % 10 +Concat std::string by std to std::string_mean 55.0 ns 55.1 ns 4 +Concat std::string by std to std::string_median 55.2 ns 54.7 ns 4 +Concat std::string by std to std::string_stddev 1.96 ns 2.34 ns 4 +Concat std::string by std to std::string_cv 3.57 % 4.26 % 4 +Concat std::string by StrExpr to std::string_mean 75.6 ns 75.9 ns 4 +Concat std::string by StrExpr to std::string_median 75.5 ns 76.7 ns 4 +Concat std::string by StrExpr to std::string_stddev 1.50 ns 1.74 ns 4 +Concat std::string by StrExpr to std::string_cv 1.98 % 2.30 % 4 +Concat stringa by StrExpr to stringa_mean 52.0 ns 52.0 ns 4 +Concat stringa by StrExpr to stringa_median 52.2 ns 51.6 ns 4 +Concat stringa by StrExpr to stringa_stddev 1.02 ns 0.698 ns 4 +Concat stringa by StrExpr to stringa_cv 1.96 % 1.34 % 4 ----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Find concat three std::string_mean 218 ns 218 ns 10 -Find concat three std::string_median 217 ns 217 ns 10 -Find concat three std::string_stddev 2.19 ns 3.41 ns 10 -Find concat three std::string_cv 1.01 % 1.57 % 10 -Find concat three strexpr_mean 119 ns 119 ns 10 -Find concat three strexpr_median 119 ns 119 ns 10 -Find concat three strexpr_stddev 3.04 ns 3.73 ns 10 -Find concat three strexpr_cv 2.54 % 3.13 % 10 -Find concat three simstr_mean 28.7 ns 28.6 ns 10 -Find concat three simstr_median 28.7 ns 28.6 ns 10 -Find concat three simstr_stddev 0.647 ns 0.678 ns 10 -Find concat three simstr_cv 2.26 % 2.37 % 10 +Find concat three std::string_mean 230 ns 231 ns 4 +Find concat three std::string_median 232 ns 234 ns 4 +Find concat three std::string_stddev 14.1 ns 15.1 ns 4 +Find concat three std::string_cv 6.15 % 6.55 % 4 +Find concat three strexpr_mean 129 ns 130 ns 4 +Find concat three strexpr_median 126 ns 126 ns 4 +Find concat three strexpr_stddev 10.3 ns 10.6 ns 4 +Find concat three strexpr_cv 7.93 % 8.14 % 4 +Find concat three simstr_mean 28.3 ns 28.3 ns 4 +Find concat three simstr_median 28.5 ns 28.5 ns 4 +Find concat three simstr_stddev 0.538 ns 0.834 ns 4 +Find concat three simstr_cv 1.90 % 2.94 % 4 ----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -BuildTypeNameStr 0/0_mean 17.3 ns 17.3 ns 10 -BuildTypeNameStr 0/0_median 17.3 ns 17.3 ns 10 -BuildTypeNameStr 0/0_stddev 0.403 ns 0.512 ns 10 -BuildTypeNameStr 0/0_cv 2.33 % 2.96 % 10 -BuildTypeNameExp 0/0_mean 14.0 ns 14.0 ns 10 -BuildTypeNameExp 0/0_median 14.0 ns 14.0 ns 10 -BuildTypeNameExp 0/0_stddev 0.137 ns 0.320 ns 10 -BuildTypeNameExp 0/0_cv 0.98 % 2.29 % 10 -BuildTypeNameSim 0/0_mean 15.9 ns 15.8 ns 10 -BuildTypeNameSim 0/0_median 15.5 ns 15.3 ns 10 -BuildTypeNameSim 0/0_stddev 0.729 ns 0.857 ns 10 -BuildTypeNameSim 0/0_cv 4.60 % 5.42 % 10 -BuildTypeNameStr 10/10_mean 80.2 ns 80.2 ns 10 -BuildTypeNameStr 10/10_median 80.4 ns 80.2 ns 10 -BuildTypeNameStr 10/10_stddev 1.29 ns 1.42 ns 10 -BuildTypeNameStr 10/10_cv 1.61 % 1.77 % 10 -BuildTypeNameExp 10/10_mean 42.9 ns 42.7 ns 10 -BuildTypeNameExp 10/10_median 41.6 ns 41.9 ns 10 -BuildTypeNameExp 10/10_stddev 4.17 ns 3.90 ns 10 -BuildTypeNameExp 10/10_cv 9.72 % 9.14 % 10 -BuildTypeNameSim 10/10_mean 36.1 ns 36.1 ns 10 -BuildTypeNameSim 10/10_median 36.1 ns 36.4 ns 10 -BuildTypeNameSim 10/10_stddev 0.576 ns 0.683 ns 10 -BuildTypeNameSim 10/10_cv 1.59 % 1.89 % 10 +BuildTypeNameStr 0/0_mean 17.6 ns 17.6 ns 4 +BuildTypeNameStr 0/0_median 17.6 ns 17.6 ns 4 +BuildTypeNameStr 0/0_stddev 0.231 ns 0.000 ns 4 +BuildTypeNameStr 0/0_cv 1.32 % 0.00 % 4 +BuildTypeNameExp 0/0_mean 14.0 ns 14.0 ns 4 +BuildTypeNameExp 0/0_median 14.0 ns 14.0 ns 4 +BuildTypeNameExp 0/0_stddev 0.119 ns 0.181 ns 4 +BuildTypeNameExp 0/0_cv 0.85 % 1.30 % 4 +BuildTypeNameSim 0/0_mean 14.8 ns 14.7 ns 4 +BuildTypeNameSim 0/0_median 14.8 ns 14.8 ns 4 +BuildTypeNameSim 0/0_stddev 0.225 ns 0.334 ns 4 +BuildTypeNameSim 0/0_cv 1.52 % 2.27 % 4 +BuildTypeNameStr 10/10_mean 79.7 ns 79.3 ns 4 +BuildTypeNameStr 10/10_median 77.6 ns 77.6 ns 4 +BuildTypeNameStr 10/10_stddev 4.82 ns 5.42 ns 4 +BuildTypeNameStr 10/10_cv 6.05 % 6.83 % 4 +BuildTypeNameExp 10/10_mean 37.9 ns 37.9 ns 4 +BuildTypeNameExp 10/10_median 37.6 ns 37.7 ns 4 +BuildTypeNameExp 10/10_stddev 0.976 ns 1.05 ns 4 +BuildTypeNameExp 10/10_cv 2.58 % 2.78 % 4 +BuildTypeNameSim 10/10_mean 37.6 ns 37.7 ns 4 +BuildTypeNameSim 10/10_median 37.1 ns 37.3 ns 4 +BuildTypeNameSim 10/10_stddev 1.27 ns 1.13 ns 4 +BuildTypeNameSim 10/10_cv 3.37 % 3.01 % 4 ----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat with replace str_mean 346 ns 345 ns 10 -Concat with replace str_median 343 ns 344 ns 10 -Concat with replace str_stddev 7.57 ns 9.42 ns 10 -Concat with replace str_cv 2.19 % 2.73 % 10 -Concat with replace exp_mean 225 ns 225 ns 10 -Concat with replace exp_median 225 ns 225 ns 10 -Concat with replace exp_stddev 6.50 ns 5.15 ns 10 -Concat with replace exp_cv 2.89 % 2.29 % 10 +Concat with replace str_mean 341 ns 339 ns 4 +Concat with replace str_median 341 ns 337 ns 4 +Concat with replace str_stddev 6.43 ns 3.66 ns 4 +Concat with replace str_cv 1.89 % 1.08 % 4 +Concat with replace exp_mean 224 ns 221 ns 4 +Concat with replace exp_median 224 ns 220 ns 4 +Concat with replace exp_stddev 7.32 ns 4.34 ns 4 +Concat with replace exp_cv 3.27 % 1.96 % 4 ----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e;_mean 2.84 ns 2.85 ns 10 -std::string e;_median 2.84 ns 2.85 ns 10 -std::string e;_stddev 0.035 ns 0.048 ns 10 -std::string e;_cv 1.22 % 1.70 % 10 -std::string_view e;_mean 1.82 ns 1.82 ns 10 -std::string_view e;_median 1.82 ns 1.81 ns 10 -std::string_view e;_stddev 0.024 ns 0.026 ns 10 -std::string_view e;_cv 1.29 % 1.42 % 10 -ssa e;_mean 1.46 ns 1.46 ns 10 -ssa e;_median 1.45 ns 1.45 ns 10 -ssa e;_stddev 0.054 ns 0.058 ns 10 -ssa e;_cv 3.67 % 3.97 % 10 -stringa e;_mean 2.19 ns 2.18 ns 10 -stringa e;_median 2.19 ns 2.18 ns 10 -stringa e;_stddev 0.035 ns 0.033 ns 10 -stringa e;_cv 1.57 % 1.53 % 10 -lstringa<20> e;_mean 2.62 ns 2.61 ns 10 -lstringa<20> e;_median 2.58 ns 2.57 ns 10 -lstringa<20> e;_stddev 0.086 ns 0.091 ns 10 -lstringa<20> e;_cv 3.28 % 3.50 % 10 -lstringa<40> e;_mean 2.57 ns 2.56 ns 10 -lstringa<40> e;_median 2.56 ns 2.57 ns 10 -lstringa<40> e;_stddev 0.046 ns 0.041 ns 10 -lstringa<40> e;_cv 1.80 % 1.61 % 10 +std::string e;_mean 2.22 ns 2.22 ns 4 +std::string e;_median 2.19 ns 2.20 ns 4 +std::string e;_stddev 0.068 ns 0.093 ns 4 +std::string e;_cv 3.08 % 4.21 % 4 +std::string_view e;_mean 1.88 ns 1.87 ns 4 +std::string_view e;_median 1.87 ns 1.86 ns 4 +std::string_view e;_stddev 0.108 ns 0.105 ns 4 +std::string_view e;_cv 5.75 % 5.59 % 4 +ssa e;_mean 1.47 ns 1.47 ns 4 +ssa e;_median 1.46 ns 1.46 ns 4 +ssa e;_stddev 0.043 ns 0.030 ns 4 +ssa e;_cv 2.94 % 2.05 % 4 +stringa e;_mean 2.20 ns 2.20 ns 4 +stringa e;_median 2.18 ns 2.20 ns 4 +stringa e;_stddev 0.044 ns 0.040 ns 4 +stringa e;_cv 2.02 % 1.81 % 4 +lstringa<20> e;_mean 2.55 ns 2.56 ns 4 +lstringa<20> e;_median 2.55 ns 2.58 ns 4 +lstringa<20> e;_stddev 0.048 ns 0.057 ns 4 +lstringa<20> e;_cv 1.90 % 2.21 % 4 +lstringa<40> e;_mean 2.57 ns 2.54 ns 4 +lstringa<40> e;_median 2.57 ns 2.54 ns 4 +lstringa<40> e;_stddev 0.020 ns 0.032 ns 4 +lstringa<40> e;_cv 0.78 % 1.27 % 4 ----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text";_mean 2.68 ns 2.67 ns 10 -std::string e = "Test text";_median 2.65 ns 2.67 ns 10 -std::string e = "Test text";_stddev 0.139 ns 0.136 ns 10 -std::string e = "Test text";_cv 5.18 % 5.11 % 10 -std::string_view e = "Test text";_mean 1.84 ns 1.84 ns 10 -std::string_view e = "Test text";_median 1.83 ns 1.82 ns 10 -std::string_view e = "Test text";_stddev 0.059 ns 0.056 ns 10 -std::string_view e = "Test text";_cv 3.20 % 3.03 % 10 -ssa e = "Test text";_mean 1.83 ns 1.83 ns 10 -ssa e = "Test text";_median 1.83 ns 1.84 ns 10 -ssa e = "Test text";_stddev 0.031 ns 0.026 ns 10 -ssa e = "Test text";_cv 1.67 % 1.41 % 10 -stringa e = "Test text";_mean 2.83 ns 2.82 ns 10 -stringa e = "Test text";_median 2.82 ns 2.83 ns 10 -stringa e = "Test text";_stddev 0.019 ns 0.036 ns 10 -stringa e = "Test text";_cv 0.69 % 1.26 % 10 -lstringa<20> e = "Test text";_mean 2.56 ns 2.56 ns 10 -lstringa<20> e = "Test text";_median 2.56 ns 2.55 ns 10 -lstringa<20> e = "Test text";_stddev 0.034 ns 0.047 ns 10 -lstringa<20> e = "Test text";_cv 1.31 % 1.83 % 10 -lstringa<40> e = "Test text";_mean 2.55 ns 2.54 ns 10 -lstringa<40> e = "Test text";_median 2.53 ns 2.51 ns 10 -lstringa<40> e = "Test text";_stddev 0.048 ns 0.054 ns 10 -lstringa<40> e = "Test text";_cv 1.90 % 2.12 % 10 +std::string e = "Test text";_mean 2.60 ns 2.61 ns 4 +std::string e = "Test text";_median 2.60 ns 2.59 ns 4 +std::string e = "Test text";_stddev 0.029 ns 0.053 ns 4 +std::string e = "Test text";_cv 1.13 % 2.05 % 4 +std::string_view e = "Test text";_mean 1.79 ns 1.79 ns 4 +std::string_view e = "Test text";_median 1.80 ns 1.80 ns 4 +std::string_view e = "Test text";_stddev 0.020 ns 0.021 ns 4 +std::string_view e = "Test text";_cv 1.10 % 1.17 % 4 +ssa e = "Test text";_mean 1.79 ns 1.80 ns 4 +ssa e = "Test text";_median 1.80 ns 1.80 ns 4 +ssa e = "Test text";_stddev 0.029 ns 0.034 ns 4 +ssa e = "Test text";_cv 1.60 % 1.90 % 4 +stringa e = "Test text";_mean 2.21 ns 2.21 ns 4 +stringa e = "Test text";_median 2.21 ns 2.22 ns 4 +stringa e = "Test text";_stddev 0.018 ns 0.023 ns 4 +stringa e = "Test text";_cv 0.82 % 1.03 % 4 +lstringa<20> e = "Test text";_mean 2.62 ns 2.62 ns 4 +lstringa<20> e = "Test text";_median 2.62 ns 2.61 ns 4 +lstringa<20> e = "Test text";_stddev 0.057 ns 0.060 ns 4 +lstringa<20> e = "Test text";_cv 2.18 % 2.29 % 4 +lstringa<40> e = "Test text";_mean 2.57 ns 2.58 ns 4 +lstringa<40> e = "Test text";_median 2.56 ns 2.57 ns 4 +lstringa<40> e = "Test text";_stddev 0.055 ns 0.070 ns 4 +lstringa<40> e = "Test text";_cv 2.14 % 2.72 % 4 ----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890";_mean 78.1 ns 78.0 ns 10 -std::string e = "123456789012345678901234567890";_median 77.3 ns 76.7 ns 10 -std::string e = "123456789012345678901234567890";_stddev 4.08 ns 4.03 ns 10 -std::string e = "123456789012345678901234567890";_cv 5.22 % 5.17 % 10 -std::string_view e = "123456789012345678901234567890";_mean 1.83 ns 1.83 ns 10 -std::string_view e = "123456789012345678901234567890";_median 1.83 ns 1.84 ns 10 -std::string_view e = "123456789012345678901234567890";_stddev 0.027 ns 0.026 ns 10 -std::string_view e = "123456789012345678901234567890";_cv 1.45 % 1.41 % 10 -ssa e = "123456789012345678901234567890";_mean 1.82 ns 1.81 ns 10 -ssa e = "123456789012345678901234567890";_median 1.82 ns 1.80 ns 10 -ssa e = "123456789012345678901234567890";_stddev 0.017 ns 0.028 ns 10 -ssa e = "123456789012345678901234567890";_cv 0.96 % 1.56 % 10 -stringa e = "123456789012345678901234567890";_mean 2.54 ns 2.53 ns 10 -stringa e = "123456789012345678901234567890";_median 2.54 ns 2.51 ns 10 -stringa e = "123456789012345678901234567890";_stddev 0.034 ns 0.046 ns 10 -stringa e = "123456789012345678901234567890";_cv 1.34 % 1.82 % 10 -lstringa<20> e = "123456789012345678901234567890";_mean 74.9 ns 74.8 ns 10 -lstringa<20> e = "123456789012345678901234567890";_median 74.6 ns 73.9 ns 10 -lstringa<20> e = "123456789012345678901234567890";_stddev 1.39 ns 1.88 ns 10 -lstringa<20> e = "123456789012345678901234567890";_cv 1.86 % 2.52 % 10 -lstringa<40> e = "123456789012345678901234567890";_mean 3.31 ns 3.30 ns 10 -lstringa<40> e = "123456789012345678901234567890";_median 3.28 ns 3.28 ns 10 -lstringa<40> e = "123456789012345678901234567890";_stddev 0.069 ns 0.081 ns 10 -lstringa<40> e = "123456789012345678901234567890";_cv 2.10 % 2.45 % 10 +std::string e = "123456789012345678901234567890";_mean 80.2 ns 80.2 ns 4 +std::string e = "123456789012345678901234567890";_median 80.5 ns 80.2 ns 4 +std::string e = "123456789012345678901234567890";_stddev 0.767 ns 0.000 ns 4 +std::string e = "123456789012345678901234567890";_cv 0.96 % 0.00 % 4 +std::string_view e = "123456789012345678901234567890";_mean 1.82 ns 1.81 ns 4 +std::string_view e = "123456789012345678901234567890";_median 1.83 ns 1.80 ns 4 +std::string_view e = "123456789012345678901234567890";_stddev 0.027 ns 0.021 ns 4 +std::string_view e = "123456789012345678901234567890";_cv 1.48 % 1.16 % 4 +ssa e = "123456789012345678901234567890";_mean 1.84 ns 1.84 ns 4 +ssa e = "123456789012345678901234567890";_median 1.83 ns 1.82 ns 4 +ssa e = "123456789012345678901234567890";_stddev 0.027 ns 0.059 ns 4 +ssa e = "123456789012345678901234567890";_cv 1.47 % 3.21 % 4 +stringa e = "123456789012345678901234567890";_mean 2.52 ns 2.51 ns 4 +stringa e = "123456789012345678901234567890";_median 2.52 ns 2.51 ns 4 +stringa e = "123456789012345678901234567890";_stddev 0.032 ns 0.000 ns 4 +stringa e = "123456789012345678901234567890";_cv 1.28 % 0.00 % 4 +lstringa<20> e = "123456789012345678901234567890";_mean 77.3 ns 76.3 ns 4 +lstringa<20> e = "123456789012345678901234567890";_median 76.4 ns 75.9 ns 4 +lstringa<20> e = "123456789012345678901234567890";_stddev 3.53 ns 1.67 ns 4 +lstringa<20> e = "123456789012345678901234567890";_cv 4.57 % 2.19 % 4 +lstringa<40> e = "123456789012345678901234567890";_mean 3.30 ns 3.31 ns 4 +lstringa<40> e = "123456789012345678901234567890";_median 3.31 ns 3.31 ns 4 +lstringa<40> e = "123456789012345678901234567890";_stddev 0.012 ns 0.040 ns 4 +lstringa<40> e = "123456789012345678901234567890";_cv 0.38 % 1.22 % 4 ----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text"; auto c{e};_mean 5.75 ns 5.72 ns 10 -std::string e = "Test text"; auto c{e};_median 5.75 ns 5.72 ns 10 -std::string e = "Test text"; auto c{e};_stddev 0.069 ns 0.147 ns 10 -std::string e = "Test text"; auto c{e};_cv 1.21 % 2.57 % 10 -std::string_view e = "Test text"; auto c{e};_mean 3.49 ns 3.49 ns 10 -std::string_view e = "Test text"; auto c{e};_median 3.47 ns 3.45 ns 10 -std::string_view e = "Test text"; auto c{e};_stddev 0.054 ns 0.054 ns 10 -std::string_view e = "Test text"; auto c{e};_cv 1.55 % 1.55 % 10 -ssa e = "Test text"; auto c{e};_mean 3.51 ns 3.51 ns 10 -ssa e = "Test text"; auto c{e};_median 3.50 ns 3.53 ns 10 -ssa e = "Test text"; auto c{e};_stddev 0.052 ns 0.054 ns 10 -ssa e = "Test text"; auto c{e};_cv 1.48 % 1.54 % 10 -stringa e = "Test text"; auto c{e};_mean 4.03 ns 4.03 ns 10 -stringa e = "Test text"; auto c{e};_median 4.01 ns 3.99 ns 10 -stringa e = "Test text"; auto c{e};_stddev 0.076 ns 0.097 ns 10 -stringa e = "Test text"; auto c{e};_cv 1.89 % 2.42 % 10 -lstringa<20> e = "Test text"; auto c{e};_mean 7.80 ns 7.71 ns 10 -lstringa<20> e = "Test text"; auto c{e};_median 7.76 ns 7.67 ns 10 -lstringa<20> e = "Test text"; auto c{e};_stddev 0.314 ns 0.180 ns 10 -lstringa<20> e = "Test text"; auto c{e};_cv 4.02 % 2.34 % 10 -lstringa<40> e = "Test text"; auto c{e};_mean 8.53 ns 8.48 ns 10 -lstringa<40> e = "Test text"; auto c{e};_median 8.30 ns 8.37 ns 10 -lstringa<40> e = "Test text"; auto c{e};_stddev 0.575 ns 0.594 ns 10 -lstringa<40> e = "Test text"; auto c{e};_cv 6.74 % 7.01 % 10 +std::string e = "Test text"; auto c{e};_mean 5.24 ns 5.27 ns 4 +std::string e = "Test text"; auto c{e};_median 5.26 ns 5.31 ns 4 +std::string e = "Test text"; auto c{e};_stddev 0.076 ns 0.078 ns 4 +std::string e = "Test text"; auto c{e};_cv 1.46 % 1.48 % 4 +std::string_view e = "Test text"; auto c{e};_mean 2.91 ns 2.90 ns 4 +std::string_view e = "Test text"; auto c{e};_median 2.89 ns 2.92 ns 4 +std::string_view e = "Test text"; auto c{e};_stddev 0.077 ns 0.033 ns 4 +std::string_view e = "Test text"; auto c{e};_cv 2.65 % 1.14 % 4 +ssa e = "Test text"; auto c{e};_mean 2.88 ns 2.89 ns 4 +ssa e = "Test text"; auto c{e};_median 2.88 ns 2.89 ns 4 +ssa e = "Test text"; auto c{e};_stddev 0.022 ns 0.000 ns 4 +ssa e = "Test text"; auto c{e};_cv 0.75 % 0.00 % 4 +stringa e = "Test text"; auto c{e};_mean 4.09 ns 4.10 ns 4 +stringa e = "Test text"; auto c{e};_median 4.04 ns 4.05 ns 4 +stringa e = "Test text"; auto c{e};_stddev 0.115 ns 0.123 ns 4 +stringa e = "Test text"; auto c{e};_cv 2.81 % 3.01 % 4 +lstringa<20> e = "Test text"; auto c{e};_mean 7.60 ns 7.60 ns 4 +lstringa<20> e = "Test text"; auto c{e};_median 7.61 ns 7.60 ns 4 +lstringa<20> e = "Test text"; auto c{e};_stddev 0.034 ns 0.081 ns 4 +lstringa<20> e = "Test text"; auto c{e};_cv 0.44 % 1.06 % 4 +lstringa<40> e = "Test text"; auto c{e};_mean 8.37 ns 8.33 ns 4 +lstringa<40> e = "Test text"; auto c{e};_median 8.43 ns 8.28 ns 4 +lstringa<40> e = "Test text"; auto c{e};_stddev 0.129 ns 0.167 ns 4 +lstringa<40> e = "Test text"; auto c{e};_cv 1.55 % 2.01 % 4 ----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890"; auto c{e};_mean 78.2 ns 78.0 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_median 78.1 ns 77.6 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_stddev 5.51 ns 5.76 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_cv 7.04 % 7.39 % 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 1.81 ns 1.81 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_median 1.81 ns 1.80 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.025 ns 0.040 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.38 % 2.19 % 10 -ssa e = "123456789012345678901234567890"; auto c{e};_mean 1.81 ns 1.81 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_median 1.82 ns 1.80 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.018 ns 0.026 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_cv 0.98 % 1.46 % 10 -stringa e = "123456789012345678901234567890"; auto c{e};_mean 2.92 ns 2.92 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_median 2.93 ns 2.92 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.044 ns 0.054 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_cv 1.50 % 1.86 % 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 80.9 ns 80.9 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 80.9 ns 80.2 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 2.53 ns 2.99 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 3.12 % 3.69 % 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 6.60 ns 6.60 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 6.62 ns 6.70 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.123 ns 0.148 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.86 % 2.24 % 10 +std::string e = "123456789012345678901234567890"; auto c{e};_mean 77.9 ns 77.2 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_median 77.3 ns 77.6 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_stddev 1.77 ns 1.67 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_cv 2.27 % 2.16 % 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 2.04 ns 2.04 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_median 2.03 ns 2.04 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.009 ns 0.000 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 0.44 % 0.00 % 4 +ssa e = "123456789012345678901234567890"; auto c{e};_mean 2.07 ns 2.06 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_median 2.06 ns 2.06 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.042 ns 0.059 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.04 % 2.84 % 4 +stringa e = "123456789012345678901234567890"; auto c{e};_mean 2.94 ns 2.93 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_median 2.94 ns 2.93 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.060 ns 0.000 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_cv 2.03 % 0.00 % 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 80.5 ns 80.7 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 80.5 ns 80.2 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 3.16 ns 3.60 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 3.92 % 4.46 % 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 6.81 ns 6.80 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 6.75 ns 6.77 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.289 ns 0.238 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 4.24 % 3.50 % 4 ----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find;_mean 41.9 ns 41.9 ns 10 -std::string::find;_median 40.9 ns 40.8 ns 10 -std::string::find;_stddev 3.34 ns 3.16 ns 10 -std::string::find;_cv 7.96 % 7.55 % 10 -std::string_view::find;_mean 39.7 ns 39.7 ns 10 -std::string_view::find;_median 39.6 ns 39.2 ns 10 -std::string_view::find;_stddev 0.742 ns 0.942 ns 10 -std::string_view::find;_cv 1.87 % 2.37 % 10 -ssa::find;_mean 20.6 ns 20.5 ns 10 -ssa::find;_median 20.5 ns 20.4 ns 10 -ssa::find;_stddev 0.425 ns 0.417 ns 10 -ssa::find;_cv 2.06 % 2.03 % 10 -stringa::find;_mean 28.7 ns 28.6 ns 10 -stringa::find;_median 29.1 ns 29.2 ns 10 -stringa::find;_stddev 1.41 ns 1.68 ns 10 -stringa::find;_cv 4.92 % 5.86 % 10 -lstringa<20>::find;_mean 20.7 ns 20.7 ns 10 -lstringa<20>::find;_median 20.7 ns 20.9 ns 10 -lstringa<20>::find;_stddev 0.325 ns 0.234 ns 10 -lstringa<20>::find;_cv 1.57 % 1.13 % 10 -lstringa<40>::find;_mean 21.9 ns 21.8 ns 10 -lstringa<40>::find;_median 21.9 ns 21.7 ns 10 -lstringa<40>::find;_stddev 0.285 ns 0.431 ns 10 -lstringa<40>::find;_cv 1.30 % 1.97 % 10 +std::string::find;_mean 43.7 ns 43.7 ns 4 +std::string::find;_median 44.0 ns 44.4 ns 4 +std::string::find;_stddev 2.22 ns 2.46 ns 4 +std::string::find;_cv 5.08 % 5.63 % 4 +std::string_view::find;_mean 42.1 ns 42.1 ns 4 +std::string_view::find;_median 42.4 ns 42.4 ns 4 +std::string_view::find;_stddev 2.36 ns 2.62 ns 4 +std::string_view::find;_cv 5.60 % 6.21 % 4 +ssa::find;_mean 22.2 ns 22.1 ns 4 +ssa::find;_median 22.0 ns 22.2 ns 4 +ssa::find;_stddev 0.556 ns 0.568 ns 4 +ssa::find;_cv 2.51 % 2.57 % 4 +stringa::find;_mean 30.3 ns 30.3 ns 4 +stringa::find;_median 30.2 ns 30.2 ns 4 +stringa::find;_stddev 1.36 ns 1.13 ns 4 +stringa::find;_cv 4.49 % 3.73 % 4 +lstringa<20>::find;_mean 20.4 ns 20.4 ns 4 +lstringa<20>::find;_median 20.4 ns 20.4 ns 4 +lstringa<20>::find;_stddev 0.386 ns 0.370 ns 4 +lstringa<20>::find;_cv 1.89 % 1.81 % 4 +lstringa<40>::find;_mean 22.4 ns 22.2 ns 4 +lstringa<40>::find;_median 22.5 ns 22.5 ns 4 +lstringa<40>::find;_stddev 0.556 ns 0.906 ns 4 +lstringa<40>::find;_cv 2.48 % 4.08 % 4 ------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string copy{str_with_len_N};/15_mean 5.06 ns 5.05 ns 10 -std::string copy{str_with_len_N};/15_median 5.09 ns 5.00 ns 10 -std::string copy{str_with_len_N};/15_stddev 0.086 ns 0.105 ns 10 -std::string copy{str_with_len_N};/15_cv 1.69 % 2.09 % 10 -std::string copy{str_with_len_N};/16_mean 84.4 ns 84.4 ns 10 -std::string copy{str_with_len_N};/16_median 84.2 ns 83.7 ns 10 -std::string copy{str_with_len_N};/16_stddev 2.50 ns 2.75 ns 10 -std::string copy{str_with_len_N};/16_cv 2.96 % 3.26 % 10 -std::string copy{str_with_len_N};/23_mean 89.2 ns 89.1 ns 10 -std::string copy{str_with_len_N};/23_median 88.5 ns 88.1 ns 10 -std::string copy{str_with_len_N};/23_stddev 3.68 ns 3.98 ns 10 -std::string copy{str_with_len_N};/23_cv 4.13 % 4.47 % 10 -std::string copy{str_with_len_N};/24_mean 87.8 ns 87.7 ns 10 -std::string copy{str_with_len_N};/24_median 86.5 ns 87.2 ns 10 -std::string copy{str_with_len_N};/24_stddev 3.60 ns 3.29 ns 10 -std::string copy{str_with_len_N};/24_cv 4.10 % 3.75 % 10 -std::string copy{str_with_len_N};/32_mean 88.9 ns 88.9 ns 10 -std::string copy{str_with_len_N};/32_median 88.1 ns 88.1 ns 10 -std::string copy{str_with_len_N};/32_stddev 3.54 ns 3.49 ns 10 -std::string copy{str_with_len_N};/32_cv 3.98 % 3.92 % 10 -std::string copy{str_with_len_N};/64_mean 86.8 ns 86.7 ns 10 -std::string copy{str_with_len_N};/64_median 87.5 ns 87.2 ns 10 -std::string copy{str_with_len_N};/64_stddev 2.52 ns 2.97 ns 10 -std::string copy{str_with_len_N};/64_cv 2.90 % 3.43 % 10 -std::string copy{str_with_len_N};/128_mean 90.9 ns 91.0 ns 10 -std::string copy{str_with_len_N};/128_median 90.3 ns 90.0 ns 10 -std::string copy{str_with_len_N};/128_stddev 1.52 ns 2.03 ns 10 -std::string copy{str_with_len_N};/128_cv 1.67 % 2.23 % 10 -std::string copy{str_with_len_N};/256_mean 97.0 ns 95.6 ns 10 -std::string copy{str_with_len_N};/256_median 94.3 ns 94.2 ns 10 -std::string copy{str_with_len_N};/256_stddev 6.98 ns 5.92 ns 10 -std::string copy{str_with_len_N};/256_cv 7.20 % 6.19 % 10 -std::string copy{str_with_len_N};/512_mean 95.8 ns 95.7 ns 10 -std::string copy{str_with_len_N};/512_median 93.2 ns 92.6 ns 10 -std::string copy{str_with_len_N};/512_stddev 5.80 ns 6.32 ns 10 -std::string copy{str_with_len_N};/512_cv 6.05 % 6.60 % 10 -std::string copy{str_with_len_N};/1024_mean 101 ns 101 ns 10 -std::string copy{str_with_len_N};/1024_median 102 ns 103 ns 10 -std::string copy{str_with_len_N};/1024_stddev 3.06 ns 3.28 ns 10 -std::string copy{str_with_len_N};/1024_cv 3.03 % 3.24 % 10 -std::string copy{str_with_len_N};/2048_mean 128 ns 128 ns 10 -std::string copy{str_with_len_N};/2048_median 129 ns 129 ns 10 -std::string copy{str_with_len_N};/2048_stddev 4.19 ns 3.85 ns 10 -std::string copy{str_with_len_N};/2048_cv 3.28 % 3.01 % 10 -std::string copy{str_with_len_N};/4096_mean 179 ns 178 ns 10 -std::string copy{str_with_len_N};/4096_median 179 ns 180 ns 10 -std::string copy{str_with_len_N};/4096_stddev 5.38 ns 5.79 ns 10 -std::string copy{str_with_len_N};/4096_cv 3.01 % 3.25 % 10 -stringa copy{str_with_len_N};/15_mean 3.98 ns 3.96 ns 10 -stringa copy{str_with_len_N};/15_median 3.98 ns 3.99 ns 10 -stringa copy{str_with_len_N};/15_stddev 0.058 ns 0.075 ns 10 -stringa copy{str_with_len_N};/15_cv 1.47 % 1.88 % 10 -stringa copy{str_with_len_N};/16_mean 3.99 ns 3.98 ns 10 -stringa copy{str_with_len_N};/16_median 3.98 ns 3.97 ns 10 -stringa copy{str_with_len_N};/16_stddev 0.042 ns 0.072 ns 10 -stringa copy{str_with_len_N};/16_cv 1.06 % 1.80 % 10 -stringa copy{str_with_len_N};/23_mean 3.98 ns 3.98 ns 10 -stringa copy{str_with_len_N};/23_median 3.99 ns 4.01 ns 10 -stringa copy{str_with_len_N};/23_stddev 0.059 ns 0.074 ns 10 -stringa copy{str_with_len_N};/23_cv 1.49 % 1.85 % 10 -stringa copy{str_with_len_N};/24_mean 18.3 ns 18.3 ns 10 -stringa copy{str_with_len_N};/24_median 18.3 ns 18.4 ns 10 -stringa copy{str_with_len_N};/24_stddev 0.106 ns 0.198 ns 10 -stringa copy{str_with_len_N};/24_cv 0.58 % 1.08 % 10 -stringa copy{str_with_len_N};/32_mean 18.3 ns 18.3 ns 10 -stringa copy{str_with_len_N};/32_median 18.3 ns 18.4 ns 10 -stringa copy{str_with_len_N};/32_stddev 0.080 ns 0.176 ns 10 -stringa copy{str_with_len_N};/32_cv 0.43 % 0.96 % 10 -stringa copy{str_with_len_N};/64_mean 18.4 ns 18.4 ns 10 -stringa copy{str_with_len_N};/64_median 18.4 ns 18.4 ns 10 -stringa copy{str_with_len_N};/64_stddev 0.146 ns 0.218 ns 10 -stringa copy{str_with_len_N};/64_cv 0.79 % 1.19 % 10 -stringa copy{str_with_len_N};/128_mean 18.3 ns 18.3 ns 10 -stringa copy{str_with_len_N};/128_median 18.3 ns 18.4 ns 10 -stringa copy{str_with_len_N};/128_stddev 0.094 ns 0.185 ns 10 -stringa copy{str_with_len_N};/128_cv 0.51 % 1.01 % 10 -stringa copy{str_with_len_N};/256_mean 18.4 ns 18.4 ns 10 -stringa copy{str_with_len_N};/256_median 18.4 ns 18.4 ns 10 -stringa copy{str_with_len_N};/256_stddev 0.195 ns 0.279 ns 10 -stringa copy{str_with_len_N};/256_cv 1.06 % 1.52 % 10 -stringa copy{str_with_len_N};/512_mean 18.4 ns 18.4 ns 10 -stringa copy{str_with_len_N};/512_median 18.4 ns 18.4 ns 10 -stringa copy{str_with_len_N};/512_stddev 0.253 ns 0.342 ns 10 -stringa copy{str_with_len_N};/512_cv 1.37 % 1.86 % 10 -stringa copy{str_with_len_N};/1024_mean 18.3 ns 18.3 ns 10 -stringa copy{str_with_len_N};/1024_median 18.3 ns 18.1 ns 10 -stringa copy{str_with_len_N};/1024_stddev 0.178 ns 0.252 ns 10 -stringa copy{str_with_len_N};/1024_cv 0.97 % 1.38 % 10 -stringa copy{str_with_len_N};/2048_mean 18.3 ns 18.2 ns 10 -stringa copy{str_with_len_N};/2048_median 18.3 ns 18.2 ns 10 -stringa copy{str_with_len_N};/2048_stddev 0.079 ns 0.221 ns 10 -stringa copy{str_with_len_N};/2048_cv 0.43 % 1.21 % 10 -stringa copy{str_with_len_N};/4096_mean 18.3 ns 18.2 ns 10 -stringa copy{str_with_len_N};/4096_median 18.3 ns 18.4 ns 10 -stringa copy{str_with_len_N};/4096_stddev 0.101 ns 0.293 ns 10 -stringa copy{str_with_len_N};/4096_cv 0.55 % 1.60 % 10 -lstringa<16> copy{str_with_len_N};/15_mean 7.39 ns 7.38 ns 10 -lstringa<16> copy{str_with_len_N};/15_median 7.34 ns 7.32 ns 10 -lstringa<16> copy{str_with_len_N};/15_stddev 0.237 ns 0.261 ns 10 -lstringa<16> copy{str_with_len_N};/15_cv 3.20 % 3.53 % 10 -lstringa<16> copy{str_with_len_N};/16_mean 7.62 ns 7.62 ns 10 -lstringa<16> copy{str_with_len_N};/16_median 7.58 ns 7.59 ns 10 -lstringa<16> copy{str_with_len_N};/16_stddev 0.350 ns 0.377 ns 10 -lstringa<16> copy{str_with_len_N};/16_cv 4.60 % 4.95 % 10 -lstringa<16> copy{str_with_len_N};/23_mean 7.32 ns 7.32 ns 10 -lstringa<16> copy{str_with_len_N};/23_median 7.30 ns 7.32 ns 10 -lstringa<16> copy{str_with_len_N};/23_stddev 0.136 ns 0.142 ns 10 -lstringa<16> copy{str_with_len_N};/23_cv 1.85 % 1.94 % 10 -lstringa<16> copy{str_with_len_N};/24_mean 81.1 ns 81.0 ns 10 -lstringa<16> copy{str_with_len_N};/24_median 80.4 ns 80.6 ns 10 -lstringa<16> copy{str_with_len_N};/24_stddev 2.94 ns 2.80 ns 10 -lstringa<16> copy{str_with_len_N};/24_cv 3.63 % 3.46 % 10 -lstringa<16> copy{str_with_len_N};/32_mean 83.8 ns 83.1 ns 10 -lstringa<16> copy{str_with_len_N};/32_median 83.1 ns 83.7 ns 10 -lstringa<16> copy{str_with_len_N};/32_stddev 2.35 ns 1.41 ns 10 -lstringa<16> copy{str_with_len_N};/32_cv 2.81 % 1.70 % 10 -lstringa<16> copy{str_with_len_N};/64_mean 83.4 ns 83.2 ns 10 -lstringa<16> copy{str_with_len_N};/64_median 83.0 ns 82.8 ns 10 -lstringa<16> copy{str_with_len_N};/64_stddev 1.52 ns 1.44 ns 10 -lstringa<16> copy{str_with_len_N};/64_cv 1.82 % 1.73 % 10 -lstringa<16> copy{str_with_len_N};/128_mean 87.0 ns 86.8 ns 10 -lstringa<16> copy{str_with_len_N};/128_median 86.8 ns 87.2 ns 10 -lstringa<16> copy{str_with_len_N};/128_stddev 1.22 ns 1.38 ns 10 -lstringa<16> copy{str_with_len_N};/128_cv 1.40 % 1.58 % 10 -lstringa<16> copy{str_with_len_N};/256_mean 88.8 ns 88.9 ns 10 -lstringa<16> copy{str_with_len_N};/256_median 88.4 ns 88.9 ns 10 -lstringa<16> copy{str_with_len_N};/256_stddev 3.47 ns 3.77 ns 10 -lstringa<16> copy{str_with_len_N};/256_cv 3.90 % 4.24 % 10 -lstringa<16> copy{str_with_len_N};/512_mean 90.7 ns 90.9 ns 10 -lstringa<16> copy{str_with_len_N};/512_median 90.5 ns 90.7 ns 10 -lstringa<16> copy{str_with_len_N};/512_stddev 1.79 ns 1.92 ns 10 -lstringa<16> copy{str_with_len_N};/512_cv 1.98 % 2.11 % 10 -lstringa<16> copy{str_with_len_N};/1024_mean 96.3 ns 96.1 ns 10 -lstringa<16> copy{str_with_len_N};/1024_median 95.0 ns 95.2 ns 10 -lstringa<16> copy{str_with_len_N};/1024_stddev 3.57 ns 3.34 ns 10 -lstringa<16> copy{str_with_len_N};/1024_cv 3.71 % 3.48 % 10 -lstringa<16> copy{str_with_len_N};/2048_mean 128 ns 128 ns 10 -lstringa<16> copy{str_with_len_N};/2048_median 126 ns 126 ns 10 -lstringa<16> copy{str_with_len_N};/2048_stddev 7.46 ns 8.34 ns 10 -lstringa<16> copy{str_with_len_N};/2048_cv 5.81 % 6.52 % 10 -lstringa<16> copy{str_with_len_N};/4096_mean 187 ns 186 ns 10 -lstringa<16> copy{str_with_len_N};/4096_median 186 ns 184 ns 10 -lstringa<16> copy{str_with_len_N};/4096_stddev 2.48 ns 2.96 ns 10 -lstringa<16> copy{str_with_len_N};/4096_cv 1.33 % 1.59 % 10 -lstringa<512> copy{str_with_len_N};/15_mean 8.92 ns 8.93 ns 10 -lstringa<512> copy{str_with_len_N};/15_median 8.87 ns 8.89 ns 10 -lstringa<512> copy{str_with_len_N};/15_stddev 0.418 ns 0.401 ns 10 -lstringa<512> copy{str_with_len_N};/15_cv 4.69 % 4.49 % 10 -lstringa<512> copy{str_with_len_N};/16_mean 8.52 ns 8.51 ns 10 -lstringa<512> copy{str_with_len_N};/16_median 8.47 ns 8.46 ns 10 -lstringa<512> copy{str_with_len_N};/16_stddev 0.206 ns 0.214 ns 10 -lstringa<512> copy{str_with_len_N};/16_cv 2.42 % 2.52 % 10 -lstringa<512> copy{str_with_len_N};/23_mean 8.80 ns 8.80 ns 10 -lstringa<512> copy{str_with_len_N};/23_median 8.59 ns 8.59 ns 10 -lstringa<512> copy{str_with_len_N};/23_stddev 0.407 ns 0.436 ns 10 -lstringa<512> copy{str_with_len_N};/23_cv 4.63 % 4.95 % 10 -lstringa<512> copy{str_with_len_N};/24_mean 8.46 ns 8.41 ns 10 -lstringa<512> copy{str_with_len_N};/24_median 8.38 ns 8.37 ns 10 -lstringa<512> copy{str_with_len_N};/24_stddev 0.226 ns 0.276 ns 10 -lstringa<512> copy{str_with_len_N};/24_cv 2.67 % 3.28 % 10 -lstringa<512> copy{str_with_len_N};/32_mean 11.4 ns 11.4 ns 10 -lstringa<512> copy{str_with_len_N};/32_median 11.4 ns 11.5 ns 10 -lstringa<512> copy{str_with_len_N};/32_stddev 0.130 ns 0.165 ns 10 -lstringa<512> copy{str_with_len_N};/32_cv 1.14 % 1.45 % 10 -lstringa<512> copy{str_with_len_N};/64_mean 11.4 ns 11.4 ns 10 -lstringa<512> copy{str_with_len_N};/64_median 11.4 ns 11.4 ns 10 -lstringa<512> copy{str_with_len_N};/64_stddev 0.171 ns 0.264 ns 10 -lstringa<512> copy{str_with_len_N};/64_cv 1.51 % 2.32 % 10 -lstringa<512> copy{str_with_len_N};/128_mean 11.9 ns 11.9 ns 10 -lstringa<512> copy{str_with_len_N};/128_median 11.7 ns 11.7 ns 10 -lstringa<512> copy{str_with_len_N};/128_stddev 0.514 ns 0.504 ns 10 -lstringa<512> copy{str_with_len_N};/128_cv 4.34 % 4.25 % 10 -lstringa<512> copy{str_with_len_N};/256_mean 12.8 ns 12.8 ns 10 -lstringa<512> copy{str_with_len_N};/256_median 12.9 ns 12.8 ns 10 -lstringa<512> copy{str_with_len_N};/256_stddev 0.171 ns 0.263 ns 10 -lstringa<512> copy{str_with_len_N};/256_cv 1.33 % 2.05 % 10 -lstringa<512> copy{str_with_len_N};/512_mean 14.3 ns 14.3 ns 10 -lstringa<512> copy{str_with_len_N};/512_median 14.3 ns 14.4 ns 10 -lstringa<512> copy{str_with_len_N};/512_stddev 0.174 ns 0.265 ns 10 -lstringa<512> copy{str_with_len_N};/512_cv 1.22 % 1.85 % 10 -lstringa<512> copy{str_with_len_N};/1024_mean 94.9 ns 94.5 ns 10 -lstringa<512> copy{str_with_len_N};/1024_median 94.6 ns 94.0 ns 10 -lstringa<512> copy{str_with_len_N};/1024_stddev 2.58 ns 2.83 ns 10 -lstringa<512> copy{str_with_len_N};/1024_cv 2.72 % 3.00 % 10 -lstringa<512> copy{str_with_len_N};/2048_mean 132 ns 132 ns 10 -lstringa<512> copy{str_with_len_N};/2048_median 132 ns 133 ns 10 -lstringa<512> copy{str_with_len_N};/2048_stddev 9.84 ns 9.32 ns 10 -lstringa<512> copy{str_with_len_N};/2048_cv 7.45 % 7.05 % 10 -lstringa<512> copy{str_with_len_N};/4096_mean 189 ns 189 ns 10 -lstringa<512> copy{str_with_len_N};/4096_median 189 ns 188 ns 10 -lstringa<512> copy{str_with_len_N};/4096_stddev 3.15 ns 3.85 ns 10 -lstringa<512> copy{str_with_len_N};/4096_cv 1.67 % 2.03 % 10 +std::string copy{str_with_len_N};/15_mean 5.04 ns 5.04 ns 4 +std::string copy{str_with_len_N};/15_median 5.05 ns 5.08 ns 4 +std::string copy{str_with_len_N};/15_stddev 0.091 ns 0.150 ns 4 +std::string copy{str_with_len_N};/15_cv 1.81 % 2.97 % 4 +std::string copy{str_with_len_N};/16_mean 81.5 ns 81.5 ns 4 +std::string copy{str_with_len_N};/16_median 81.3 ns 81.1 ns 4 +std::string copy{str_with_len_N};/16_stddev 1.54 ns 1.67 ns 4 +std::string copy{str_with_len_N};/16_cv 1.89 % 2.05 % 4 +std::string copy{str_with_len_N};/23_mean 81.8 ns 81.5 ns 4 +std::string copy{str_with_len_N};/23_median 82.3 ns 81.1 ns 4 +std::string copy{str_with_len_N};/23_stddev 2.31 ns 2.98 ns 4 +std::string copy{str_with_len_N};/23_cv 2.82 % 3.65 % 4 +std::string copy{str_with_len_N};/24_mean 82.5 ns 82.4 ns 4 +std::string copy{str_with_len_N};/24_median 82.3 ns 82.0 ns 4 +std::string copy{str_with_len_N};/24_stddev 2.02 ns 2.62 ns 4 +std::string copy{str_with_len_N};/24_cv 2.45 % 3.17 % 4 +std::string copy{str_with_len_N};/32_mean 86.1 ns 86.3 ns 4 +std::string copy{str_with_len_N};/32_median 86.4 ns 86.3 ns 4 +std::string copy{str_with_len_N};/32_stddev 1.55 ns 1.01 ns 4 +std::string copy{str_with_len_N};/32_cv 1.80 % 1.17 % 4 +std::string copy{str_with_len_N};/64_mean 87.9 ns 88.1 ns 4 +std::string copy{str_with_len_N};/64_median 87.3 ns 88.1 ns 4 +std::string copy{str_with_len_N};/64_stddev 2.18 ns 2.25 ns 4 +std::string copy{str_with_len_N};/64_cv 2.48 % 2.56 % 4 +std::string copy{str_with_len_N};/128_mean 90.1 ns 90.0 ns 4 +std::string copy{str_with_len_N};/128_median 90.0 ns 90.0 ns 4 +std::string copy{str_with_len_N};/128_stddev 1.15 ns 1.71 ns 4 +std::string copy{str_with_len_N};/128_cv 1.28 % 1.90 % 4 +std::string copy{str_with_len_N};/256_mean 88.2 ns 88.1 ns 4 +std::string copy{str_with_len_N};/256_median 88.0 ns 88.1 ns 4 +std::string copy{str_with_len_N};/256_stddev 2.89 ns 2.25 ns 4 +std::string copy{str_with_len_N};/256_cv 3.27 % 2.56 % 4 +std::string copy{str_with_len_N};/512_mean 89.4 ns 89.5 ns 4 +std::string copy{str_with_len_N};/512_median 89.2 ns 88.9 ns 4 +std::string copy{str_with_len_N};/512_stddev 1.32 ns 2.00 ns 4 +std::string copy{str_with_len_N};/512_cv 1.48 % 2.24 % 4 +std::string copy{str_with_len_N};/1024_mean 95.2 ns 95.2 ns 4 +std::string copy{str_with_len_N};/1024_median 95.4 ns 95.2 ns 4 +std::string copy{str_with_len_N};/1024_stddev 1.20 ns 1.21 ns 4 +std::string copy{str_with_len_N};/1024_cv 1.26 % 1.27 % 4 +std::string copy{str_with_len_N};/2048_mean 134 ns 133 ns 4 +std::string copy{str_with_len_N};/2048_median 130 ns 129 ns 4 +std::string copy{str_with_len_N};/2048_stddev 9.78 ns 9.42 ns 4 +std::string copy{str_with_len_N};/2048_cv 7.32 % 7.06 % 4 +std::string copy{str_with_len_N};/4096_mean 184 ns 184 ns 4 +std::string copy{str_with_len_N};/4096_median 183 ns 184 ns 4 +std::string copy{str_with_len_N};/4096_stddev 1.71 ns 3.42 ns 4 +std::string copy{str_with_len_N};/4096_cv 0.93 % 1.86 % 4 +stringa copy{str_with_len_N};/15_mean 4.01 ns 4.01 ns 4 +stringa copy{str_with_len_N};/15_median 4.02 ns 4.04 ns 4 +stringa copy{str_with_len_N};/15_stddev 0.119 ns 0.187 ns 4 +stringa copy{str_with_len_N};/15_cv 2.96 % 4.66 % 4 +stringa copy{str_with_len_N};/16_mean 3.99 ns 3.99 ns 4 +stringa copy{str_with_len_N};/16_median 3.97 ns 3.99 ns 4 +stringa copy{str_with_len_N};/16_stddev 0.044 ns 0.074 ns 4 +stringa copy{str_with_len_N};/16_cv 1.11 % 1.86 % 4 +stringa copy{str_with_len_N};/23_mean 4.11 ns 4.12 ns 4 +stringa copy{str_with_len_N};/23_median 4.06 ns 4.05 ns 4 +stringa copy{str_with_len_N};/23_stddev 0.134 ns 0.152 ns 4 +stringa copy{str_with_len_N};/23_cv 3.27 % 3.68 % 4 +stringa copy{str_with_len_N};/24_mean 18.4 ns 18.3 ns 4 +stringa copy{str_with_len_N};/24_median 18.4 ns 18.4 ns 4 +stringa copy{str_with_len_N};/24_stddev 0.184 ns 0.209 ns 4 +stringa copy{str_with_len_N};/24_cv 1.00 % 1.14 % 4 +stringa copy{str_with_len_N};/32_mean 18.6 ns 18.6 ns 4 +stringa copy{str_with_len_N};/32_median 18.3 ns 18.4 ns 4 +stringa copy{str_with_len_N};/32_stddev 0.686 ns 0.419 ns 4 +stringa copy{str_with_len_N};/32_cv 3.69 % 2.25 % 4 +stringa copy{str_with_len_N};/64_mean 18.8 ns 18.7 ns 4 +stringa copy{str_with_len_N};/64_median 18.7 ns 18.6 ns 4 +stringa copy{str_with_len_N};/64_stddev 0.314 ns 0.401 ns 4 +stringa copy{str_with_len_N};/64_cv 1.67 % 2.14 % 4 +stringa copy{str_with_len_N};/128_mean 18.4 ns 18.4 ns 4 +stringa copy{str_with_len_N};/128_median 18.4 ns 18.4 ns 4 +stringa copy{str_with_len_N};/128_stddev 0.075 ns 0.000 ns 4 +stringa copy{str_with_len_N};/128_cv 0.41 % 0.00 % 4 +stringa copy{str_with_len_N};/256_mean 18.3 ns 18.3 ns 4 +stringa copy{str_with_len_N};/256_median 18.3 ns 18.4 ns 4 +stringa copy{str_with_len_N};/256_stddev 0.155 ns 0.209 ns 4 +stringa copy{str_with_len_N};/256_cv 0.85 % 1.14 % 4 +stringa copy{str_with_len_N};/512_mean 18.4 ns 18.4 ns 4 +stringa copy{str_with_len_N};/512_median 18.3 ns 18.4 ns 4 +stringa copy{str_with_len_N};/512_stddev 0.091 ns 0.342 ns 4 +stringa copy{str_with_len_N};/512_cv 0.50 % 1.86 % 4 +stringa copy{str_with_len_N};/1024_mean 18.3 ns 18.3 ns 4 +stringa copy{str_with_len_N};/1024_median 18.3 ns 18.4 ns 4 +stringa copy{str_with_len_N};/1024_stddev 0.033 ns 0.192 ns 4 +stringa copy{str_with_len_N};/1024_cv 0.18 % 1.05 % 4 +stringa copy{str_with_len_N};/2048_mean 18.3 ns 18.3 ns 4 +stringa copy{str_with_len_N};/2048_median 18.3 ns 18.4 ns 4 +stringa copy{str_with_len_N};/2048_stddev 0.096 ns 0.209 ns 4 +stringa copy{str_with_len_N};/2048_cv 0.52 % 1.14 % 4 +stringa copy{str_with_len_N};/4096_mean 19.6 ns 19.5 ns 4 +stringa copy{str_with_len_N};/4096_median 19.5 ns 19.3 ns 4 +stringa copy{str_with_len_N};/4096_stddev 1.61 ns 1.74 ns 4 +stringa copy{str_with_len_N};/4096_cv 8.20 % 8.90 % 4 +lstringa<16> copy{str_with_len_N};/15_mean 7.23 ns 7.24 ns 4 +lstringa<16> copy{str_with_len_N};/15_median 7.26 ns 7.24 ns 4 +lstringa<16> copy{str_with_len_N};/15_stddev 0.077 ns 0.101 ns 4 +lstringa<16> copy{str_with_len_N};/15_cv 1.07 % 1.39 % 4 +lstringa<16> copy{str_with_len_N};/16_mean 7.89 ns 7.89 ns 4 +lstringa<16> copy{str_with_len_N};/16_median 7.83 ns 7.85 ns 4 +lstringa<16> copy{str_with_len_N};/16_stddev 0.449 ns 0.387 ns 4 +lstringa<16> copy{str_with_len_N};/16_cv 5.70 % 4.90 % 4 +lstringa<16> copy{str_with_len_N};/23_mean 7.64 ns 7.60 ns 4 +lstringa<16> copy{str_with_len_N};/23_median 7.46 ns 7.46 ns 4 +lstringa<16> copy{str_with_len_N};/23_stddev 0.453 ns 0.434 ns 4 +lstringa<16> copy{str_with_len_N};/23_cv 5.93 % 5.70 % 4 +lstringa<16> copy{str_with_len_N};/24_mean 83.5 ns 83.7 ns 4 +lstringa<16> copy{str_with_len_N};/24_median 83.2 ns 83.7 ns 4 +lstringa<16> copy{str_with_len_N};/24_stddev 5.35 ns 5.70 ns 4 +lstringa<16> copy{str_with_len_N};/24_cv 6.40 % 6.80 % 4 +lstringa<16> copy{str_with_len_N};/32_mean 87.1 ns 87.2 ns 4 +lstringa<16> copy{str_with_len_N};/32_median 85.8 ns 85.4 ns 4 +lstringa<16> copy{str_with_len_N};/32_stddev 4.63 ns 4.93 ns 4 +lstringa<16> copy{str_with_len_N};/32_cv 5.32 % 5.66 % 4 +lstringa<16> copy{str_with_len_N};/64_mean 83.7 ns 83.7 ns 4 +lstringa<16> copy{str_with_len_N};/64_median 83.1 ns 83.7 ns 4 +lstringa<16> copy{str_with_len_N};/64_stddev 2.54 ns 2.85 ns 4 +lstringa<16> copy{str_with_len_N};/64_cv 3.03 % 3.40 % 4 +lstringa<16> copy{str_with_len_N};/128_mean 84.1 ns 83.3 ns 4 +lstringa<16> copy{str_with_len_N};/128_median 84.1 ns 83.7 ns 4 +lstringa<16> copy{str_with_len_N};/128_stddev 1.38 ns 0.872 ns 4 +lstringa<16> copy{str_with_len_N};/128_cv 1.64 % 1.05 % 4 +lstringa<16> copy{str_with_len_N};/256_mean 85.9 ns 85.4 ns 4 +lstringa<16> copy{str_with_len_N};/256_median 85.7 ns 85.4 ns 4 +lstringa<16> copy{str_with_len_N};/256_stddev 1.07 ns 1.42 ns 4 +lstringa<16> copy{str_with_len_N};/256_cv 1.25 % 1.67 % 4 +lstringa<16> copy{str_with_len_N};/512_mean 87.4 ns 86.8 ns 4 +lstringa<16> copy{str_with_len_N};/512_median 86.8 ns 86.3 ns 4 +lstringa<16> copy{str_with_len_N};/512_stddev 3.43 ns 2.98 ns 4 +lstringa<16> copy{str_with_len_N};/512_cv 3.92 % 3.43 % 4 +lstringa<16> copy{str_with_len_N};/1024_mean 96.4 ns 96.8 ns 4 +lstringa<16> copy{str_with_len_N};/1024_median 95.7 ns 96.3 ns 4 +lstringa<16> copy{str_with_len_N};/1024_stddev 2.30 ns 1.05 ns 4 +lstringa<16> copy{str_with_len_N};/1024_cv 2.39 % 1.08 % 4 +lstringa<16> copy{str_with_len_N};/2048_mean 131 ns 132 ns 4 +lstringa<16> copy{str_with_len_N};/2048_median 134 ns 134 ns 4 +lstringa<16> copy{str_with_len_N};/2048_stddev 7.41 ns 6.19 ns 4 +lstringa<16> copy{str_with_len_N};/2048_cv 5.64 % 4.69 % 4 +lstringa<16> copy{str_with_len_N};/4096_mean 193 ns 193 ns 4 +lstringa<16> copy{str_with_len_N};/4096_median 191 ns 190 ns 4 +lstringa<16> copy{str_with_len_N};/4096_stddev 7.22 ns 5.92 ns 4 +lstringa<16> copy{str_with_len_N};/4096_cv 3.74 % 3.07 % 4 +lstringa<512> copy{str_with_len_N};/15_mean 8.05 ns 8.02 ns 4 +lstringa<512> copy{str_with_len_N};/15_median 8.09 ns 8.02 ns 4 +lstringa<512> copy{str_with_len_N};/15_stddev 0.113 ns 0.201 ns 4 +lstringa<512> copy{str_with_len_N};/15_cv 1.41 % 2.51 % 4 +lstringa<512> copy{str_with_len_N};/16_mean 8.06 ns 8.07 ns 4 +lstringa<512> copy{str_with_len_N};/16_median 8.13 ns 8.11 ns 4 +lstringa<512> copy{str_with_len_N};/16_stddev 0.162 ns 0.167 ns 4 +lstringa<512> copy{str_with_len_N};/16_cv 2.01 % 2.07 % 4 +lstringa<512> copy{str_with_len_N};/23_mean 8.24 ns 8.24 ns 4 +lstringa<512> copy{str_with_len_N};/23_median 8.16 ns 8.20 ns 4 +lstringa<512> copy{str_with_len_N};/23_stddev 0.319 ns 0.360 ns 4 +lstringa<512> copy{str_with_len_N};/23_cv 3.87 % 4.36 % 4 +lstringa<512> copy{str_with_len_N};/24_mean 8.02 ns 7.95 ns 4 +lstringa<512> copy{str_with_len_N};/24_median 8.02 ns 7.95 ns 4 +lstringa<512> copy{str_with_len_N};/24_stddev 0.037 ns 0.171 ns 4 +lstringa<512> copy{str_with_len_N};/24_cv 0.46 % 2.15 % 4 +lstringa<512> copy{str_with_len_N};/32_mean 10.9 ns 10.9 ns 4 +lstringa<512> copy{str_with_len_N};/32_median 10.9 ns 11.0 ns 4 +lstringa<512> copy{str_with_len_N};/32_stddev 0.124 ns 0.122 ns 4 +lstringa<512> copy{str_with_len_N};/32_cv 1.14 % 1.12 % 4 +lstringa<512> copy{str_with_len_N};/64_mean 10.8 ns 10.8 ns 4 +lstringa<512> copy{str_with_len_N};/64_median 10.8 ns 10.8 ns 4 +lstringa<512> copy{str_with_len_N};/64_stddev 0.153 ns 0.200 ns 4 +lstringa<512> copy{str_with_len_N};/64_cv 1.41 % 1.85 % 4 +lstringa<512> copy{str_with_len_N};/128_mean 11.4 ns 11.4 ns 4 +lstringa<512> copy{str_with_len_N};/128_median 11.5 ns 11.5 ns 4 +lstringa<512> copy{str_with_len_N};/128_stddev 0.287 ns 0.366 ns 4 +lstringa<512> copy{str_with_len_N};/128_cv 2.51 % 3.21 % 4 +lstringa<512> copy{str_with_len_N};/256_mean 12.4 ns 12.3 ns 4 +lstringa<512> copy{str_with_len_N};/256_median 12.3 ns 12.3 ns 4 +lstringa<512> copy{str_with_len_N};/256_stddev 0.188 ns 0.419 ns 4 +lstringa<512> copy{str_with_len_N};/256_cv 1.52 % 3.39 % 4 +lstringa<512> copy{str_with_len_N};/512_mean 14.2 ns 14.1 ns 4 +lstringa<512> copy{str_with_len_N};/512_median 14.1 ns 14.0 ns 4 +lstringa<512> copy{str_with_len_N};/512_stddev 0.527 ns 0.604 ns 4 +lstringa<512> copy{str_with_len_N};/512_cv 3.70 % 4.28 % 4 +lstringa<512> copy{str_with_len_N};/1024_mean 99.5 ns 99.8 ns 4 +lstringa<512> copy{str_with_len_N};/1024_median 102 ns 101 ns 4 +lstringa<512> copy{str_with_len_N};/1024_stddev 6.10 ns 5.40 ns 4 +lstringa<512> copy{str_with_len_N};/1024_cv 6.14 % 5.41 % 4 +lstringa<512> copy{str_with_len_N};/2048_mean 132 ns 132 ns 4 +lstringa<512> copy{str_with_len_N};/2048_median 132 ns 133 ns 4 +lstringa<512> copy{str_with_len_N};/2048_stddev 2.12 ns 2.67 ns 4 +lstringa<512> copy{str_with_len_N};/2048_cv 1.60 % 2.03 % 4 +lstringa<512> copy{str_with_len_N};/4096_mean 194 ns 195 ns 4 +lstringa<512> copy{str_with_len_N};/4096_median 194 ns 195 ns 4 +lstringa<512> copy{str_with_len_N};/4096_stddev 1.94 ns 2.42 ns 4 +lstringa<512> copy{str_with_len_N};/4096_cv 1.00 % 1.24 % 4 ----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 32.0 ns 31.9 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 32.0 ns 31.9 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.441 ns 0.386 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.38 % 1.21 % 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 13.4 ns 13.4 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 13.4 ns 13.5 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.162 ns 0.248 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 1.21 % 1.84 % 10 -stringa s = "123456789"; int res = s.to_int_mean 15.9 ns 15.8 ns 10 -stringa s = "123456789"; int res = s.to_int_median 15.6 ns 15.7 ns 10 -stringa s = "123456789"; int res = s.to_int_stddev 0.633 ns 0.360 ns 10 -stringa s = "123456789"; int res = s.to_int_cv 3.99 % 2.28 % 10 -ssa s = "123456789"; int res = s.to_int_mean 15.0 ns 15.0 ns 10 -ssa s = "123456789"; int res = s.to_int_median 15.0 ns 15.0 ns 10 -ssa s = "123456789"; int res = s.to_int_stddev 0.214 ns 0.305 ns 10 -ssa s = "123456789"; int res = s.to_int_cv 1.43 % 2.04 % 10 -lstringa<20> s = "123456789"; int res = s.to_int_mean 15.9 ns 15.9 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_median 15.7 ns 15.7 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.455 ns 0.424 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_cv 2.86 % 2.67 % 10 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 32.1 ns 32.0 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 32.4 ns 32.2 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.599 ns 0.384 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.87 % 1.20 % 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 13.7 ns 13.7 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 13.7 ns 13.7 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.045 ns 0.228 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 0.33 % 1.67 % 4 +stringa s = "123456789"; int res = s.to_int_mean 14.6 ns 14.6 ns 4 +stringa s = "123456789"; int res = s.to_int_median 14.6 ns 14.6 ns 4 +stringa s = "123456789"; int res = s.to_int_stddev 0.397 ns 0.523 ns 4 +stringa s = "123456789"; int res = s.to_int_cv 2.72 % 3.59 % 4 +ssa s = "123456789"; int res = s.to_int_mean 15.1 ns 15.1 ns 4 +ssa s = "123456789"; int res = s.to_int_median 15.2 ns 15.1 ns 4 +ssa s = "123456789"; int res = s.to_int_stddev 0.220 ns 0.362 ns 4 +ssa s = "123456789"; int res = s.to_int_cv 1.45 % 2.41 % 4 +lstringa<20> s = "123456789"; int res = s.to_int_mean 15.1 ns 15.1 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_median 15.1 ns 15.2 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.194 ns 0.334 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_cv 1.29 % 2.21 % 4 ----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 35.7 ns 35.6 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 34.9 ns 34.7 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 1.85 ns 1.98 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 5.18 % 5.57 % 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 12.5 ns 12.5 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 12.4 ns 12.3 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.410 ns 0.445 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 3.27 % 3.55 % 10 -stringa s = "abcDef"; int res = s.to_int_mean 12.8 ns 12.8 ns 10 -stringa s = "abcDef"; int res = s.to_int_median 12.9 ns 12.9 ns 10 -stringa s = "abcDef"; int res = s.to_int_stddev 0.257 ns 0.258 ns 10 -stringa s = "abcDef"; int res = s.to_int_cv 2.01 % 2.02 % 10 -ssa s = "abcDef"; int res = s.to_int_mean 12.8 ns 12.8 ns 10 -ssa s = "abcDef"; int res = s.to_int_median 12.8 ns 12.6 ns 10 -ssa s = "abcDef"; int res = s.to_int_stddev 0.240 ns 0.349 ns 10 -ssa s = "abcDef"; int res = s.to_int_cv 1.88 % 2.74 % 10 -lstringa<20> s = "abcDef"; int res = s.to_int_mean 12.8 ns 12.8 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_median 12.8 ns 12.7 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.181 ns 0.173 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.41 % 1.35 % 10 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 35.5 ns 35.5 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 35.3 ns 35.3 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 1.30 ns 1.15 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 3.67 % 3.24 % 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 13.2 ns 13.1 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 13.3 ns 13.2 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.630 ns 0.647 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 4.78 % 4.94 % 4 +stringa s = "abcDef"; int res = s.to_int_mean 14.0 ns 14.0 ns 4 +stringa s = "abcDef"; int res = s.to_int_median 14.0 ns 14.0 ns 4 +stringa s = "abcDef"; int res = s.to_int_stddev 0.291 ns 0.285 ns 4 +stringa s = "abcDef"; int res = s.to_int_cv 2.08 % 2.04 % 4 +ssa s = "abcDef"; int res = s.to_int_mean 13.8 ns 13.7 ns 4 +ssa s = "abcDef"; int res = s.to_int_median 13.8 ns 13.7 ns 4 +ssa s = "abcDef"; int res = s.to_int_stddev 0.665 ns 0.785 ns 4 +ssa s = "abcDef"; int res = s.to_int_cv 4.82 % 5.71 % 4 +lstringa<20> s = "abcDef"; int res = s.to_int_mean 13.1 ns 13.0 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_median 13.1 ns 13.0 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.146 ns 0.181 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.12 % 1.39 % 4 ----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 45.7 ns 45.5 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 45.6 ns 44.6 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.53 ns 1.35 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 3.34 % 2.96 % 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 22.1 ns 22.0 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 21.8 ns 21.7 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.748 ns 0.669 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 3.39 % 3.04 % 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 16.0 ns 16.0 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 16.0 ns 16.0 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.226 ns 0.275 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 1.42 % 1.72 % 10 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 44.6 ns 44.6 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 44.8 ns 44.9 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.507 ns 0.924 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 1.14 % 2.07 % 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 19.0 ns 18.8 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 19.0 ns 18.8 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.258 ns 0.585 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 1.36 % 3.11 % 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 17.5 ns 17.6 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 17.5 ns 17.5 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.280 ns 0.367 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 1.60 % 2.09 % 4 ----- Convert to double '1234.567e10' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 105 ns 105 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 104 ns 105 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 2.21 ns 1.71 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 2.10 % 1.63 % 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 80.7 ns 80.7 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 79.9 ns 80.2 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 2.62 ns 2.47 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 3.25 % 3.06 % 10 -ssa s = "1234.567e10"; double res = *s.to_double()_mean 36.2 ns 36.2 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_median 36.2 ns 36.1 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.723 ns 0.702 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.00 % 1.94 % 10 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 99.7 ns 98.9 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 101 ns 98.9 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 2.63 ns 3.15 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 2.64 % 3.19 % 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 80.0 ns 79.8 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 79.4 ns 79.3 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 2.12 ns 2.98 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.65 % 3.73 % 4 +ssa s = "1234.567e10"; double res = *s.to_double()_mean 36.1 ns 36.1 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_median 36.4 ns 36.1 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.631 ns 0.655 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_cv 1.75 % 1.81 % 4 -- Append const literal of 16 bytes 64 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << "abbaabbaabbaabba";_mean 5600 ns 5594 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_median 5568 ns 5580 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 106 ns 122 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_cv 1.89 % 2.18 % 10 -std::string str; ... str += "abbaabbaabbaabba";_mean 1313 ns 1314 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_median 1282 ns 1283 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_stddev 76.6 ns 77.2 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_cv 5.83 % 5.87 % 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 904 ns 903 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_median 898 ns 907 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 14.5 ns 16.0 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 1.61 % 1.77 % 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 569 ns 569 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_median 557 ns 558 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 49.3 ns 46.9 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 8.66 % 8.24 % 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 348 ns 348 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_median 347 ns 345 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 6.20 ns 7.75 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 1.78 % 2.23 % 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 232 ns 231 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 232 ns 230 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 4.76 ns 5.76 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.06 % 2.50 % 10 +std::stringstream str; ... str << "abbaabbaabbaabba";_mean 5533 ns 5511 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_median 5544 ns 5511 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 62.7 ns 80.5 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_cv 1.13 % 1.46 % 4 +std::string str; ... str += "abbaabbaabbaabba";_mean 1309 ns 1311 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_median 1288 ns 1287 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_stddev 85.6 ns 74.2 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_cv 6.54 % 5.66 % 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 947 ns 942 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_median 947 ns 942 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 30.9 ns 17.1 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 3.26 % 1.81 % 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 523 ns 523 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_median 525 ns 523 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 16.5 ns 18.0 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 3.16 % 3.44 % 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 348 ns 347 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_median 348 ns 347 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 2.05 ns 4.83 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 0.59 % 1.39 % 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 234 ns 234 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 233 ns 234 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 3.17 ns 0.000 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.36 % 0.00 % 4 -- Append string of 16 bytes and const literal of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 5528 ns 5525 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 5519 ns 5580 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 128 ns 150 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.32 % 2.71 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 3948 ns 3941 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_median 3960 ns 3967 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 90.6 ns 80.1 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 2.29 % 2.03 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 814 ns 814 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 815 ns 820 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 13.2 ns 16.5 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.62 % 2.03 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 531 ns 528 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 531 ns 531 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 12.2 ns 12.3 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.30 % 2.33 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 373 ns 372 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 370 ns 369 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 15.8 ns 11.5 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.23 % 3.08 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 292 ns 292 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 291 ns 286 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 12.9 ns 14.6 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.40 % 4.99 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 5823 ns 5824 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 5766 ns 5790 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 448 ns 461 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 7.69 % 7.91 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 4097 ns 4054 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_median 4137 ns 4098 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 114 ns 87.2 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 2.77 % 2.15 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 880 ns 879 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 819 ns 818 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 133 ns 131 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 15.11 % 14.87 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 561 ns 559 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 563 ns 555 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 43.2 ns 43.0 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 7.69 % 7.70 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 380 ns 379 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 372 ns 372 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 22.7 ns 15.8 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.96 % 4.18 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 277 ns 276 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 279 ns 279 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 11.3 ns 11.4 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.07 % 4.12 % 4 -- Append string of 16 bytes and const literal of 16 bytes 2048 times, 65536 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 288865 ns 288143 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 277455 ns 276215 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 26150 ns 26378 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 9.05 % 9.15 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 189369 ns 189127 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 188924 ns 189894 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2672 ns 3158 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.41 % 1.67 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 24389 ns 24379 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 24320 ns 24588 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 512 ns 788 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.10 % 3.23 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 22364 ns 22398 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22289 ns 22216 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 535 ns 715 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.39 % 3.19 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 21345 ns 21289 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 21390 ns 21484 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 260 ns 412 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.22 % 1.93 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 21975 ns 21944 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 21782 ns 21990 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 358 ns 438 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.63 % 2.00 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 307647 ns 306974 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 305430 ns 303137 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 26607 ns 24268 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 8.65 % 7.91 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 186310 ns 186058 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 186578 ns 187976 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1905 ns 3836 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.02 % 2.06 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 24024 ns 23934 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 23950 ns 23803 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 534 ns 501 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.22 % 2.09 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 22287 ns 22234 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22299 ns 22234 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 336 ns 302 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.51 % 1.36 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 22240 ns 22095 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22125 ns 21973 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 661 ns 732 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.97 % 3.31 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 21810 ns 21851 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22001 ns 21973 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 429 ns 244 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.97 % 1.12 % 4 -- Append 2 string of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var1 << str_var2;_mean 5391 ns 5357 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_median 5345 ns 5301 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_stddev 209 ns 210 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_cv 3.88 % 3.92 % 10 -std::string str; ... str += str_var1 + str_var2;_mean 3953 ns 3959 ns 10 -std::string str; ... str += str_var1 + str_var2;_median 3947 ns 3934 ns 10 -std::string str; ... str += str_var1 + str_var2;_stddev 69.9 ns 88.7 ns 10 -std::string str; ... str += str_var1 + str_var2;_cv 1.77 % 2.24 % 10 -lstringa<16> str; ... str += str_var1 + str_var2;_mean 881 ns 879 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_median 868 ns 872 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_stddev 40.0 ns 42.1 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_cv 4.54 % 4.79 % 10 -lstringa<128> str; ... str += str_var1 + str_var2;_mean 604 ns 604 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_median 602 ns 600 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_stddev 11.9 ns 9.42 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_cv 1.96 % 1.56 % 10 -lstringa<512> str; ... str += str_var1 + str_var2;_mean 449 ns 448 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_median 447 ns 449 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_stddev 12.7 ns 14.2 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_cv 2.82 % 3.16 % 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_mean 394 ns 394 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_median 381 ns 381 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 30.1 ns 28.4 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_cv 7.64 % 7.22 % 10 +std::stringstream str; ... str << str_var1 << str_var2;_mean 5193 ns 5197 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_median 5202 ns 5162 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_stddev 35.2 ns 69.8 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_cv 0.68 % 1.34 % 4 +std::string str; ... str += str_var1 + str_var2;_mean 4025 ns 4013 ns 4 +std::string str; ... str += str_var1 + str_var2;_median 3971 ns 3945 ns 4 +std::string str; ... str += str_var1 + str_var2;_stddev 198 ns 172 ns 4 +std::string str; ... str += str_var1 + str_var2;_cv 4.93 % 4.28 % 4 +lstringa<16> str; ... str += str_var1 + str_var2;_mean 909 ns 910 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_median 905 ns 900 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_stddev 14.6 ns 20.9 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_cv 1.61 % 2.30 % 4 +lstringa<128> str; ... str += str_var1 + str_var2;_mean 645 ns 638 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_median 633 ns 628 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_stddev 40.1 ns 41.7 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_cv 6.22 % 6.53 % 4 +lstringa<512> str; ... str += str_var1 + str_var2;_mean 457 ns 458 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_median 457 ns 455 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_stddev 14.9 ns 12.7 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_cv 3.26 % 2.78 % 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_mean 358 ns 357 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_median 357 ns 357 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 9.35 ns 9.91 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_cv 2.61 % 2.78 % 4 -- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; str << "test = " << k << " times";_mean 11857 ns 11830 ns 10 -std::stringstream str; str << "test = " << k << " times";_median 11705 ns 11719 ns 10 -std::stringstream str; str << "test = " << k << " times";_stddev 684 ns 735 ns 10 -std::stringstream str; str << "test = " << k << " times";_cv 5.77 % 6.21 % 10 -std::string str = "test = " + std::to_string(k) + " times";_mean 1260 ns 1261 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_median 1255 ns 1256 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_stddev 49.9 ns 55.5 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_cv 3.96 % 4.40 % 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2822 ns 2813 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2820 ns 2790 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 65.5 ns 75.3 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.32 % 2.68 % 10 -std::string str = std::format("test = {} times", k);_mean 2423 ns 2417 ns 10 -std::string str = std::format("test = {} times", k);_median 2398 ns 2407 ns 10 -std::string str = std::format("test = {} times", k);_stddev 75.9 ns 84.7 ns 10 -std::string str = std::format("test = {} times", k);_cv 3.13 % 3.51 % 10 -lstringa<8> str; str.format("test = {} times", k);_mean 2694 ns 2692 ns 10 -lstringa<8> str; str.format("test = {} times", k);_median 2681 ns 2668 ns 10 -lstringa<8> str; str.format("test = {} times", k);_stddev 78.1 ns 80.0 ns 10 -lstringa<8> str; str.format("test = {} times", k);_cv 2.90 % 2.97 % 10 -lstringa<32> str; str.format("test = {} times", k);_mean 1520 ns 1500 ns 10 -lstringa<32> str; str.format("test = {} times", k);_median 1503 ns 1500 ns 10 -lstringa<32> str; str.format("test = {} times", k);_stddev 69.3 ns 46.5 ns 10 -lstringa<32> str; str.format("test = {} times", k);_cv 4.56 % 3.10 % 10 -lstringa<8> str = "test = " + k + " times";_mean 904 ns 902 ns 10 -lstringa<8> str = "test = " + k + " times";_median 902 ns 900 ns 10 -lstringa<8> str = "test = " + k + " times";_stddev 15.2 ns 15.4 ns 10 -lstringa<8> str = "test = " + k + " times";_cv 1.68 % 1.71 % 10 -lstringa<32> str = "test = " + k + " times";_mean 185 ns 185 ns 10 -lstringa<32> str = "test = " + k + " times";_median 184 ns 184 ns 10 -lstringa<32> str = "test = " + k + " times";_stddev 5.00 ns 4.06 ns 10 -lstringa<32> str = "test = " + k + " times";_cv 2.70 % 2.19 % 10 -stringa str = "test = " + k + " times";_mean 243 ns 243 ns 10 -stringa str = "test = " + k + " times";_median 242 ns 241 ns 10 -stringa str = "test = " + k + " times";_stddev 5.07 ns 5.62 ns 10 -stringa str = "test = " + k + " times";_cv 2.09 % 2.32 % 10 +std::stringstream str; str << "test = " << k << " times";_mean 11158 ns 11143 ns 4 +std::stringstream str; str << "test = " << k << " times";_median 11212 ns 11143 ns 4 +std::stringstream str; str << "test = " << k << " times";_stddev 190 ns 181 ns 4 +std::stringstream str; str << "test = " << k << " times";_cv 1.70 % 1.63 % 4 +std::string str = "test = " + std::to_string(k) + " times";_mean 1231 ns 1221 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_median 1230 ns 1214 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_stddev 21.2 ns 26.7 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_cv 1.72 % 2.19 % 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2861 ns 2841 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2846 ns 2825 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 50.2 ns 79.0 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.76 % 2.78 % 4 +std::string str = std::format("test = {} times", k);_mean 2540 ns 2537 ns 4 +std::string str = std::format("test = {} times", k);_median 2496 ns 2485 ns 4 +std::string str = std::format("test = {} times", k);_stddev 146 ns 174 ns 4 +std::string str = std::format("test = {} times", k);_cv 5.75 % 6.84 % 4 +lstringa<8> str; str.format("test = {} times", k);_mean 2756 ns 2762 ns 4 +lstringa<8> str; str.format("test = {} times", k);_median 2724 ns 2734 ns 4 +lstringa<8> str; str.format("test = {} times", k);_stddev 221 ns 230 ns 4 +lstringa<8> str; str.format("test = {} times", k);_cv 8.03 % 8.33 % 4 +lstringa<32> str; str.format("test = {} times", k);_mean 1528 ns 1517 ns 4 +lstringa<32> str; str.format("test = {} times", k);_median 1539 ns 1517 ns 4 +lstringa<32> str; str.format("test = {} times", k);_stddev 29.5 ns 45.0 ns 4 +lstringa<32> str; str.format("test = {} times", k);_cv 1.93 % 2.97 % 4 +lstringa<8> str = "test = " + k + " times";_mean 910 ns 909 ns 4 +lstringa<8> str = "test = " + k + " times";_median 910 ns 903 ns 4 +lstringa<8> str = "test = " + k + " times";_stddev 6.61 ns 12.2 ns 4 +lstringa<8> str = "test = " + k + " times";_cv 0.73 % 1.34 % 4 +lstringa<32> str = "test = " + k + " times";_mean 183 ns 183 ns 4 +lstringa<32> str = "test = " + k + " times";_median 181 ns 182 ns 4 +lstringa<32> str = "test = " + k + " times";_stddev 7.29 ns 7.15 ns 4 +lstringa<32> str = "test = " + k + " times";_cv 3.97 % 3.90 % 4 +stringa str = "test = " + k + " times";_mean 238 ns 238 ns 4 +stringa str = "test = " + k + " times";_median 234 ns 234 ns 4 +stringa str = "test = " + k + " times";_stddev 8.99 ns 7.32 ns 4 +stringa str = "test = " + k + " times";_cv 3.77 % 3.08 % 4 -- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find + substr + std::strtol_mean 550 ns 550 ns 10 -std::string::find + substr + std::strtol_median 554 ns 547 ns 10 -std::string::find + substr + std::strtol_stddev 12.1 ns 16.1 ns 10 -std::string::find + substr + std::strtol_cv 2.19 % 2.93 % 10 -ssa::splitter + ssa::as_int_mean 292 ns 292 ns 10 -ssa::splitter + ssa::as_int_median 293 ns 292 ns 10 -ssa::splitter + ssa::as_int_stddev 3.48 ns 5.80 ns 10 -ssa::splitter + ssa::as_int_cv 1.19 % 1.99 % 10 -ssa::splitf + functor_mean 217 ns 217 ns 10 -ssa::splitf + functor_median 216 ns 215 ns 10 -ssa::splitf + functor_stddev 7.35 ns 8.38 ns 10 -ssa::splitf + functor_cv 3.38 % 3.86 % 10 +std::string::find + substr + std::strtol_mean 542 ns 543 ns 4 +std::string::find + substr + std::strtol_median 542 ns 547 ns 4 +std::string::find + substr + std::strtol_stddev 12.2 ns 23.4 ns 4 +std::string::find + substr + std::strtol_cv 2.24 % 4.32 % 4 +ssa::splitter + ssa::as_int_mean 294 ns 293 ns 4 +ssa::splitter + ssa::as_int_median 294 ns 292 ns 4 +ssa::splitter + ssa::as_int_stddev 4.63 ns 3.31 ns 4 +ssa::splitter + ssa::as_int_cv 1.57 % 1.13 % 4 +ssa::splitf + functor_mean 214 ns 214 ns 4 +ssa::splitf + functor_median 213 ns 212 ns 4 +ssa::splitf + functor_stddev 2.82 ns 4.67 ns 4 +ssa::splitf + functor_cv 1.32 % 2.19 % 4 -- Replace symbols in text ~400 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Naive (and wrong) replace symbols with std::string find + replace_mean 1176 ns 1172 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_median 1178 ns 1172 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_stddev 16.6 ns 22.8 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_cv 1.41 % 1.94 % 10 -replace symbols with std::string find_first_of + replace_mean 2155 ns 2149 ns 10 -replace symbols with std::string find_first_of + replace_median 2144 ns 2131 ns 10 -replace symbols with std::string find_first_of + replace_stddev 40.0 ns 43.8 ns 10 -replace symbols with std::string find_first_of + replace_cv 1.86 % 2.04 % 10 -replace symbols with std::string_view find_first_of + copy_mean 2546 ns 2533 ns 10 -replace symbols with std::string_view find_first_of + copy_median 2538 ns 2511 ns 10 -replace symbols with std::string_view find_first_of + copy_stddev 70.3 ns 91.9 ns 10 -replace symbols with std::string_view find_first_of + copy_cv 2.76 % 3.63 % 10 -replace runtime symbols with string expressions and without remembering all search results_mean 1595 ns 1580 ns 10 -replace runtime symbols with string expressions and without remembering all search results_median 1584 ns 1569 ns 10 -replace runtime symbols with string expressions and without remembering all search results_stddev 71.7 ns 71.8 ns 10 -replace runtime symbols with string expressions and without remembering all search results_cv 4.49 % 4.54 % 10 -replace runtime symbols with simstr and memorization of all search results_mean 1418 ns 1415 ns 10 -replace runtime symbols with simstr and memorization of all search results_median 1393 ns 1395 ns 10 -replace runtime symbols with simstr and memorization of all search results_stddev 68.0 ns 73.3 ns 10 -replace runtime symbols with simstr and memorization of all search results_cv 4.80 % 5.18 % 10 -replace const symbols with string expressions and without remembering all search results_mean 1290 ns 1281 ns 10 -replace const symbols with string expressions and without remembering all search results_median 1264 ns 1256 ns 10 -replace const symbols with string expressions and without remembering all search results_stddev 58.6 ns 58.0 ns 10 -replace const symbols with string expressions and without remembering all search results_cv 4.54 % 4.53 % 10 -replace const symbols with string expressions and memorization of all search results_mean 1249 ns 1242 ns 10 -replace const symbols with string expressions and memorization of all search results_median 1252 ns 1242 ns 10 -replace const symbols with string expressions and memorization of all search results_stddev 20.6 ns 14.7 ns 10 -replace const symbols with string expressions and memorization of all search results_cv 1.65 % 1.18 % 10 +Naive (and wrong) replace symbols with std::string find + replace_mean 1301 ns 1304 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_median 1298 ns 1297 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_stddev 16.6 ns 26.7 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_cv 1.27 % 2.05 % 4 +replace symbols with std::string find_first_of + replace_mean 2225 ns 2234 ns 4 +replace symbols with std::string find_first_of + replace_median 2218 ns 2222 ns 4 +replace symbols with std::string find_first_of + replace_stddev 61.9 ns 46.7 ns 4 +replace symbols with std::string find_first_of + replace_cv 2.78 % 2.09 % 4 +replace symbols with std::string_view find_first_of + copy_mean 2546 ns 2550 ns 4 +replace symbols with std::string_view find_first_of + copy_median 2535 ns 2563 ns 4 +replace symbols with std::string_view find_first_of + copy_stddev 44.0 ns 65.8 ns 4 +replace symbols with std::string_view find_first_of + copy_cv 1.73 % 2.58 % 4 +replace runtime symbols with string expressions and without remembering all search results_mean 1619 ns 1622 ns 4 +replace runtime symbols with string expressions and without remembering all search results_median 1609 ns 1604 ns 4 +replace runtime symbols with string expressions and without remembering all search results_stddev 45.9 ns 60.4 ns 4 +replace runtime symbols with string expressions and without remembering all search results_cv 2.83 % 3.72 % 4 +replace runtime symbols with simstr and memorization of all search results_mean 1434 ns 1428 ns 4 +replace runtime symbols with simstr and memorization of all search results_median 1423 ns 1428 ns 4 +replace runtime symbols with simstr and memorization of all search results_stddev 37.1 ns 40.5 ns 4 +replace runtime symbols with simstr and memorization of all search results_cv 2.59 % 2.84 % 4 +replace const symbols with string expressions and without remembering all search results_mean 1277 ns 1282 ns 4 +replace const symbols with string expressions and without remembering all search results_median 1279 ns 1282 ns 4 +replace const symbols with string expressions and without remembering all search results_stddev 21.4 ns 14.1 ns 4 +replace const symbols with string expressions and without remembering all search results_cv 1.67 % 1.10 % 4 +replace const symbols with string expressions and memorization of all search results_mean 1218 ns 1221 ns 4 +replace const symbols with string expressions and memorization of all search results_median 1218 ns 1221 ns 4 +replace const symbols with string expressions and memorization of all search results_stddev 15.0 ns 19.9 ns 4 +replace const symbols with string expressions and memorization of all search results_cv 1.23 % 1.63 % 4 -- Replace symbols in text ~40 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Short Naive (and wrong) replace symbols with std::string find + replace_mean 338 ns 338 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_median 335 ns 337 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_stddev 7.85 ns 8.77 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.32 % 2.60 % 10 -Short replace symbols with std::string find_first_of + replace_mean 439 ns 438 ns 10 -Short replace symbols with std::string find_first_of + replace_median 435 ns 433 ns 10 -Short replace symbols with std::string find_first_of + replace_stddev 14.4 ns 16.2 ns 10 -Short replace symbols with std::string find_first_of + replace_cv 3.29 % 3.69 % 10 -Short replace symbols with std::string_view find_first_of + copy_mean 375 ns 374 ns 10 -Short replace symbols with std::string_view find_first_of + copy_median 369 ns 368 ns 10 -Short replace symbols with std::string_view find_first_of + copy_stddev 20.1 ns 19.4 ns 10 -Short replace symbols with std::string_view find_first_of + copy_cv 5.37 % 5.18 % 10 -Short replace runtime symbols with string expressions and without remembering all search results_mean 310 ns 308 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_median 308 ns 308 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_stddev 10.9 ns 10.6 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_cv 3.52 % 3.44 % 10 -Short replace runtime symbols with simstr and memorization of all search results_mean 394 ns 395 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_median 393 ns 395 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_stddev 4.66 ns 8.86 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_cv 1.18 % 2.24 % 10 -Short replace const symbols with string expressions and without remembering all search results_mean 267 ns 266 ns 10 -Short replace const symbols with string expressions and without remembering all search results_median 263 ns 261 ns 10 -Short replace const symbols with string expressions and without remembering all search results_stddev 10.1 ns 9.46 ns 10 -Short replace const symbols with string expressions and without remembering all search results_cv 3.78 % 3.55 % 10 -Short replace const symbols with string expressions and memorization of all search results_mean 352 ns 352 ns 10 -Short replace const symbols with string expressions and memorization of all search results_median 353 ns 353 ns 10 -Short replace const symbols with string expressions and memorization of all search results_stddev 6.59 ns 6.72 ns 10 -Short replace const symbols with string expressions and memorization of all search results_cv 1.87 % 1.91 % 10 +Short Naive (and wrong) replace symbols with std::string find + replace_mean 332 ns 331 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_median 334 ns 333 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_stddev 8.55 ns 7.01 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.57 % 2.12 % 4 +Short replace symbols with std::string find_first_of + replace_mean 428 ns 427 ns 4 +Short replace symbols with std::string find_first_of + replace_median 427 ns 425 ns 4 +Short replace symbols with std::string find_first_of + replace_stddev 11.6 ns 9.35 ns 4 +Short replace symbols with std::string find_first_of + replace_cv 2.71 % 2.19 % 4 +Short replace symbols with std::string_view find_first_of + copy_mean 356 ns 357 ns 4 +Short replace symbols with std::string_view find_first_of + copy_median 353 ns 357 ns 4 +Short replace symbols with std::string_view find_first_of + copy_stddev 7.69 ns 10.4 ns 4 +Short replace symbols with std::string_view find_first_of + copy_cv 2.16 % 2.90 % 4 +Short replace runtime symbols with string expressions and without remembering all search results_mean 319 ns 319 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_median 318 ns 319 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_stddev 6.07 ns 8.84 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_cv 1.90 % 2.78 % 4 +Short replace runtime symbols with simstr and memorization of all search results_mean 383 ns 383 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_median 378 ns 381 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_stddev 9.40 ns 8.01 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_cv 2.46 % 2.09 % 4 +Short replace const symbols with string expressions and without remembering all search results_mean 267 ns 267 ns 4 +Short replace const symbols with string expressions and without remembering all search results_median 268 ns 270 ns 4 +Short replace const symbols with string expressions and without remembering all search results_stddev 7.10 ns 8.39 ns 4 +Short replace const symbols with string expressions and without remembering all search results_cv 2.66 % 3.14 % 4 +Short replace const symbols with string expressions and memorization of all search results_mean 355 ns 355 ns 4 +Short replace const symbols with string expressions and memorization of all search results_median 356 ns 357 ns 4 +Short replace const symbols with string expressions and memorization of all search results_stddev 9.85 ns 7.68 ns 4 +Short replace const symbols with string expressions and memorization of all search results_cv 2.78 % 2.16 % 4 ----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to ---- in std::string|64_mean 243 ns 242 ns 10 -replace bb to ---- in std::string|64_median 243 ns 241 ns 10 -replace bb to ---- in std::string|64_stddev 8.62 ns 8.47 ns 10 -replace bb to ---- in std::string|64_cv 3.54 % 3.51 % 10 -replace bb to ---- in std::string|256_mean 818 ns 809 ns 10 -replace bb to ---- in std::string|256_median 799 ns 802 ns 10 -replace bb to ---- in std::string|256_stddev 56.0 ns 26.3 ns 10 -replace bb to ---- in std::string|256_cv 6.84 % 3.24 % 10 -replace bb to ---- in std::string|512_mean 1492 ns 1494 ns 10 -replace bb to ---- in std::string|512_median 1495 ns 1491 ns 10 -replace bb to ---- in std::string|512_stddev 25.4 ns 30.3 ns 10 -replace bb to ---- in std::string|512_cv 1.70 % 2.03 % 10 -replace bb to ---- in std::string|1024_mean 3206 ns 3201 ns 10 -replace bb to ---- in std::string|1024_median 3194 ns 3223 ns 10 -replace bb to ---- in std::string|1024_stddev 51.7 ns 49.4 ns 10 -replace bb to ---- in std::string|1024_cv 1.61 % 1.54 % 10 -replace bb to ---- in std::string|2048_mean 8058 ns 8022 ns 10 -replace bb to ---- in std::string|2048_median 7989 ns 7935 ns 10 -replace bb to ---- in std::string|2048_stddev 275 ns 273 ns 10 -replace bb to ---- in std::string|2048_cv 3.42 % 3.40 % 10 -replace bb to ---- in lstringa<8>|64_mean 251 ns 250 ns 10 -replace bb to ---- in lstringa<8>|64_median 248 ns 248 ns 10 -replace bb to ---- in lstringa<8>|64_stddev 22.8 ns 22.6 ns 10 -replace bb to ---- in lstringa<8>|64_cv 9.08 % 9.04 % 10 -replace bb to ---- in lstringa<8>|256_mean 670 ns 667 ns 10 -replace bb to ---- in lstringa<8>|256_median 649 ns 642 ns 10 -replace bb to ---- in lstringa<8>|256_stddev 52.7 ns 53.8 ns 10 -replace bb to ---- in lstringa<8>|256_cv 7.86 % 8.06 % 10 -replace bb to ---- in lstringa<8>|512_mean 1168 ns 1165 ns 10 -replace bb to ---- in lstringa<8>|512_median 1150 ns 1147 ns 10 -replace bb to ---- in lstringa<8>|512_stddev 62.9 ns 66.2 ns 10 -replace bb to ---- in lstringa<8>|512_cv 5.38 % 5.68 % 10 -replace bb to ---- in lstringa<8>|1024_mean 2054 ns 2051 ns 10 -replace bb to ---- in lstringa<8>|1024_median 2051 ns 2051 ns 10 -replace bb to ---- in lstringa<8>|1024_stddev 41.2 ns 44.1 ns 10 -replace bb to ---- in lstringa<8>|1024_cv 2.01 % 2.15 % 10 -replace bb to ---- in lstringa<8>|2048_mean 3914 ns 3892 ns 10 -replace bb to ---- in lstringa<8>|2048_median 3881 ns 3892 ns 10 -replace bb to ---- in lstringa<8>|2048_stddev 108 ns 90.4 ns 10 -replace bb to ---- in lstringa<8>|2048_cv 2.75 % 2.32 % 10 -replace bb to ---- by init stringa|64_mean 215 ns 215 ns 10 -replace bb to ---- by init stringa|64_median 214 ns 213 ns 10 -replace bb to ---- by init stringa|64_stddev 8.32 ns 9.08 ns 10 -replace bb to ---- by init stringa|64_cv 3.88 % 4.22 % 10 -replace bb to ---- by init stringa|256_mean 497 ns 494 ns 10 -replace bb to ---- by init stringa|256_median 485 ns 481 ns 10 -replace bb to ---- by init stringa|256_stddev 27.0 ns 25.5 ns 10 -replace bb to ---- by init stringa|256_cv 5.43 % 5.17 % 10 -replace bb to ---- by init stringa|512_mean 1064 ns 1062 ns 10 -replace bb to ---- by init stringa|512_median 1059 ns 1050 ns 10 -replace bb to ---- by init stringa|512_stddev 26.2 ns 28.8 ns 10 -replace bb to ---- by init stringa|512_cv 2.46 % 2.71 % 10 -replace bb to ---- by init stringa|1024_mean 2210 ns 2192 ns 10 -replace bb to ---- by init stringa|1024_median 2177 ns 2173 ns 10 -replace bb to ---- by init stringa|1024_stddev 69.8 ns 70.8 ns 10 -replace bb to ---- by init stringa|1024_cv 3.16 % 3.23 % 10 -replace bb to ---- by init stringa|2048_mean 4723 ns 4707 ns 10 -replace bb to ---- by init stringa|2048_median 4823 ns 4736 ns 10 -replace bb to ---- by init stringa|2048_stddev 291 ns 305 ns 10 -replace bb to ---- by init stringa|2048_cv 6.16 % 6.47 % 10 +replace bb to ---- in std::string|64_mean 275 ns 276 ns 4 +replace bb to ---- in std::string|64_median 276 ns 277 ns 4 +replace bb to ---- in std::string|64_stddev 30.3 ns 30.6 ns 4 +replace bb to ---- in std::string|64_cv 10.99 % 11.09 % 4 +replace bb to ---- in std::string|256_mean 899 ns 902 ns 4 +replace bb to ---- in std::string|256_median 901 ns 898 ns 4 +replace bb to ---- in std::string|256_stddev 76.9 ns 71.7 ns 4 +replace bb to ---- in std::string|256_cv 8.55 % 7.95 % 4 +replace bb to ---- in std::string|512_mean 1632 ns 1632 ns 4 +replace bb to ---- in std::string|512_median 1547 ns 1549 ns 4 +replace bb to ---- in std::string|512_stddev 227 ns 227 ns 4 +replace bb to ---- in std::string|512_cv 13.92 % 13.89 % 4 +replace bb to ---- in std::string|1024_mean 3318 ns 3331 ns 4 +replace bb to ---- in std::string|1024_median 3242 ns 3244 ns 4 +replace bb to ---- in std::string|1024_stddev 179 ns 200 ns 4 +replace bb to ---- in std::string|1024_cv 5.41 % 6.02 % 4 +replace bb to ---- in std::string|2048_mean 8116 ns 8109 ns 4 +replace bb to ---- in std::string|2048_median 8086 ns 8109 ns 4 +replace bb to ---- in std::string|2048_stddev 248 ns 225 ns 4 +replace bb to ---- in std::string|2048_cv 3.05 % 2.78 % 4 +replace bb to ---- in lstringa<8>|64_mean 235 ns 234 ns 4 +replace bb to ---- in lstringa<8>|64_median 236 ns 235 ns 4 +replace bb to ---- in lstringa<8>|64_stddev 7.94 ns 7.85 ns 4 +replace bb to ---- in lstringa<8>|64_cv 3.38 % 3.35 % 4 +replace bb to ---- in lstringa<8>|256_mean 686 ns 687 ns 4 +replace bb to ---- in lstringa<8>|256_median 691 ns 691 ns 4 +replace bb to ---- in lstringa<8>|256_stddev 31.6 ns 38.4 ns 4 +replace bb to ---- in lstringa<8>|256_cv 4.60 % 5.59 % 4 +replace bb to ---- in lstringa<8>|512_mean 1108 ns 1111 ns 4 +replace bb to ---- in lstringa<8>|512_median 1106 ns 1111 ns 4 +replace bb to ---- in lstringa<8>|512_stddev 24.8 ns 31.5 ns 4 +replace bb to ---- in lstringa<8>|512_cv 2.24 % 2.84 % 4 +replace bb to ---- in lstringa<8>|1024_mean 2042 ns 2039 ns 4 +replace bb to ---- in lstringa<8>|1024_median 2041 ns 2026 ns 4 +replace bb to ---- in lstringa<8>|1024_stddev 57.7 ns 46.7 ns 4 +replace bb to ---- in lstringa<8>|1024_cv 2.83 % 2.29 % 4 +replace bb to ---- in lstringa<8>|2048_mean 3933 ns 3902 ns 4 +replace bb to ---- in lstringa<8>|2048_median 3907 ns 3880 ns 4 +replace bb to ---- in lstringa<8>|2048_stddev 91.9 ns 83.5 ns 4 +replace bb to ---- in lstringa<8>|2048_cv 2.34 % 2.14 % 4 +replace bb to ---- by init stringa|64_mean 205 ns 204 ns 4 +replace bb to ---- by init stringa|64_median 205 ns 203 ns 4 +replace bb to ---- by init stringa|64_stddev 4.57 ns 4.67 ns 4 +replace bb to ---- by init stringa|64_cv 2.23 % 2.29 % 4 +replace bb to ---- by init stringa|256_mean 475 ns 476 ns 4 +replace bb to ---- by init stringa|256_median 481 ns 481 ns 4 +replace bb to ---- by init stringa|256_stddev 17.0 ns 15.3 ns 4 +replace bb to ---- by init stringa|256_cv 3.59 % 3.21 % 4 +replace bb to ---- by init stringa|512_mean 1039 ns 1038 ns 4 +replace bb to ---- by init stringa|512_median 1039 ns 1025 ns 4 +replace bb to ---- by init stringa|512_stddev 18.7 ns 24.4 ns 4 +replace bb to ---- by init stringa|512_cv 1.80 % 2.35 % 4 +replace bb to ---- by init stringa|1024_mean 2165 ns 2171 ns 4 +replace bb to ---- by init stringa|1024_median 2172 ns 2171 ns 4 +replace bb to ---- by init stringa|1024_stddev 50.5 ns 30.2 ns 4 +replace bb to ---- by init stringa|1024_cv 2.33 % 1.39 % 4 +replace bb to ---- by init stringa|2048_mean 4423 ns 4425 ns 4 +replace bb to ---- by init stringa|2048_median 4421 ns 4450 ns 4 +replace bb to ---- by init stringa|2048_stddev 19.9 ns 50.6 ns 4 +replace bb to ---- by init stringa|2048_cv 0.45 % 1.14 % 4 ----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to -- in std::string|64_mean 214 ns 214 ns 10 -replace bb to -- in std::string|64_median 213 ns 213 ns 10 -replace bb to -- in std::string|64_stddev 9.70 ns 9.02 ns 10 -replace bb to -- in std::string|64_cv 4.53 % 4.21 % 10 -replace bb to -- in std::string|256_mean 535 ns 532 ns 10 -replace bb to -- in std::string|256_median 530 ns 530 ns 10 -replace bb to -- in std::string|256_stddev 14.8 ns 7.92 ns 10 -replace bb to -- in std::string|256_cv 2.77 % 1.49 % 10 -replace bb to -- in std::string|512_mean 958 ns 954 ns 10 -replace bb to -- in std::string|512_median 952 ns 952 ns 10 -replace bb to -- in std::string|512_stddev 21.4 ns 20.2 ns 10 -replace bb to -- in std::string|512_cv 2.24 % 2.12 % 10 -replace bb to -- in std::string|1024_mean 1831 ns 1826 ns 10 -replace bb to -- in std::string|1024_median 1810 ns 1803 ns 10 -replace bb to -- in std::string|1024_stddev 48.3 ns 51.8 ns 10 -replace bb to -- in std::string|1024_cv 2.64 % 2.84 % 10 -replace bb to -- in std::string|2048_mean 3701 ns 3700 ns 10 -replace bb to -- in std::string|2048_median 3605 ns 3599 ns 10 -replace bb to -- in std::string|2048_stddev 225 ns 212 ns 10 -replace bb to -- in std::string|2048_cv 6.07 % 5.72 % 10 -replace bb to -- in lstringa<8>|64_mean 195 ns 195 ns 10 -replace bb to -- in lstringa<8>|64_median 194 ns 193 ns 10 -replace bb to -- in lstringa<8>|64_stddev 4.83 ns 4.07 ns 10 -replace bb to -- in lstringa<8>|64_cv 2.48 % 2.09 % 10 -replace bb to -- in lstringa<8>|256_mean 459 ns 457 ns 10 -replace bb to -- in lstringa<8>|256_median 461 ns 450 ns 10 -replace bb to -- in lstringa<8>|256_stddev 13.9 ns 14.1 ns 10 -replace bb to -- in lstringa<8>|256_cv 3.02 % 3.09 % 10 -replace bb to -- in lstringa<8>|512_mean 853 ns 853 ns 10 -replace bb to -- in lstringa<8>|512_median 851 ns 846 ns 10 -replace bb to -- in lstringa<8>|512_stddev 60.8 ns 62.8 ns 10 -replace bb to -- in lstringa<8>|512_cv 7.13 % 7.37 % 10 -replace bb to -- in lstringa<8>|1024_mean 1489 ns 1489 ns 10 -replace bb to -- in lstringa<8>|1024_median 1489 ns 1482 ns 10 -replace bb to -- in lstringa<8>|1024_stddev 36.5 ns 40.4 ns 10 -replace bb to -- in lstringa<8>|1024_cv 2.45 % 2.72 % 10 -replace bb to -- in lstringa<8>|2048_mean 2860 ns 2856 ns 10 -replace bb to -- in lstringa<8>|2048_median 2853 ns 2856 ns 10 -replace bb to -- in lstringa<8>|2048_stddev 57.3 ns 74.0 ns 10 -replace bb to -- in lstringa<8>|2048_cv 2.01 % 2.59 % 10 -replace bb to -- by init stringa|64_mean 178 ns 178 ns 10 -replace bb to -- by init stringa|64_median 178 ns 176 ns 10 -replace bb to -- by init stringa|64_stddev 4.70 ns 4.80 ns 10 -replace bb to -- by init stringa|64_cv 2.64 % 2.70 % 10 -replace bb to -- by init stringa|256_mean 403 ns 403 ns 10 -replace bb to -- by init stringa|256_median 399 ns 401 ns 10 -replace bb to -- by init stringa|256_stddev 10.5 ns 12.2 ns 10 -replace bb to -- by init stringa|256_cv 2.61 % 3.03 % 10 -replace bb to -- by init stringa|512_mean 719 ns 718 ns 10 -replace bb to -- by init stringa|512_median 709 ns 715 ns 10 -replace bb to -- by init stringa|512_stddev 90.9 ns 88.5 ns 10 -replace bb to -- by init stringa|512_cv 12.64 % 12.31 % 10 -replace bb to -- by init stringa|1024_mean 1181 ns 1182 ns 10 -replace bb to -- by init stringa|1024_median 1181 ns 1172 ns 10 -replace bb to -- by init stringa|1024_stddev 22.4 ns 26.2 ns 10 -replace bb to -- by init stringa|1024_cv 1.90 % 2.22 % 10 -replace bb to -- by init stringa|2048_mean 2295 ns 2290 ns 10 -replace bb to -- by init stringa|2048_median 2273 ns 2295 ns 10 -replace bb to -- by init stringa|2048_stddev 74.4 ns 77.9 ns 10 -replace bb to -- by init stringa|2048_cv 3.24 % 3.40 % 10 +replace bb to -- in std::string|64_mean 212 ns 210 ns 4 +replace bb to -- in std::string|64_median 212 ns 210 ns 4 +replace bb to -- in std::string|64_stddev 4.53 ns 5.64 ns 4 +replace bb to -- in std::string|64_cv 2.13 % 2.69 % 4 +replace bb to -- in std::string|256_mean 528 ns 527 ns 4 +replace bb to -- in std::string|256_median 531 ns 530 ns 4 +replace bb to -- in std::string|256_stddev 11.9 ns 6.98 ns 4 +replace bb to -- in std::string|256_cv 2.26 % 1.32 % 4 +replace bb to -- in std::string|512_mean 969 ns 963 ns 4 +replace bb to -- in std::string|512_median 955 ns 952 ns 4 +replace bb to -- in std::string|512_stddev 39.2 ns 29.6 ns 4 +replace bb to -- in std::string|512_cv 4.04 % 3.07 % 4 +replace bb to -- in std::string|1024_mean 1820 ns 1822 ns 4 +replace bb to -- in std::string|1024_median 1829 ns 1822 ns 4 +replace bb to -- in std::string|1024_stddev 32.4 ns 49.5 ns 4 +replace bb to -- in std::string|1024_cv 1.78 % 2.72 % 4 +replace bb to -- in std::string|2048_mean 3585 ns 3578 ns 4 +replace bb to -- in std::string|2048_median 3600 ns 3599 ns 4 +replace bb to -- in std::string|2048_stddev 99.3 ns 105 ns 4 +replace bb to -- in std::string|2048_cv 2.77 % 2.94 % 4 +replace bb to -- in lstringa<8>|64_mean 190 ns 188 ns 4 +replace bb to -- in lstringa<8>|64_median 189 ns 188 ns 4 +replace bb to -- in lstringa<8>|64_stddev 2.81 ns 3.42 ns 4 +replace bb to -- in lstringa<8>|64_cv 1.48 % 1.81 % 4 +replace bb to -- in lstringa<8>|256_mean 475 ns 474 ns 4 +replace bb to -- in lstringa<8>|256_median 449 ns 449 ns 4 +replace bb to -- in lstringa<8>|256_stddev 61.9 ns 62.5 ns 4 +replace bb to -- in lstringa<8>|256_cv 13.05 % 13.20 % 4 +replace bb to -- in lstringa<8>|512_mean 904 ns 902 ns 4 +replace bb to -- in lstringa<8>|512_median 891 ns 889 ns 4 +replace bb to -- in lstringa<8>|512_stddev 82.8 ns 84.7 ns 4 +replace bb to -- in lstringa<8>|512_cv 9.16 % 9.38 % 4 +replace bb to -- in lstringa<8>|1024_mean 1626 ns 1631 ns 4 +replace bb to -- in lstringa<8>|1024_median 1618 ns 1631 ns 4 +replace bb to -- in lstringa<8>|1024_stddev 37.4 ns 22.2 ns 4 +replace bb to -- in lstringa<8>|1024_cv 2.30 % 1.36 % 4 +replace bb to -- in lstringa<8>|2048_mean 3152 ns 3155 ns 4 +replace bb to -- in lstringa<8>|2048_median 3071 ns 3076 ns 4 +replace bb to -- in lstringa<8>|2048_stddev 260 ns 296 ns 4 +replace bb to -- in lstringa<8>|2048_cv 8.26 % 9.39 % 4 +replace bb to -- by init stringa|64_mean 172 ns 172 ns 4 +replace bb to -- by init stringa|64_median 171 ns 172 ns 4 +replace bb to -- by init stringa|64_stddev 3.09 ns 3.42 ns 4 +replace bb to -- by init stringa|64_cv 1.79 % 1.99 % 4 +replace bb to -- by init stringa|256_mean 397 ns 398 ns 4 +replace bb to -- by init stringa|256_median 395 ns 398 ns 4 +replace bb to -- by init stringa|256_stddev 15.3 ns 19.9 ns 4 +replace bb to -- by init stringa|256_cv 3.86 % 5.01 % 4 +replace bb to -- by init stringa|512_mean 673 ns 676 ns 4 +replace bb to -- by init stringa|512_median 681 ns 680 ns 4 +replace bb to -- by init stringa|512_stddev 21.3 ns 15.0 ns 4 +replace bb to -- by init stringa|512_cv 3.16 % 2.21 % 4 +replace bb to -- by init stringa|1024_mean 1258 ns 1257 ns 4 +replace bb to -- by init stringa|1024_median 1238 ns 1233 ns 4 +replace bb to -- by init stringa|1024_stddev 58.8 ns 58.1 ns 4 +replace bb to -- by init stringa|1024_cv 4.68 % 4.62 % 4 +replace bb to -- by init stringa|2048_mean 2330 ns 2341 ns 4 +replace bb to -- by init stringa|2048_median 2329 ns 2328 ns 4 +replace bb to -- by init stringa|2048_stddev 36.6 ns 50.1 ns 4 +replace bb to -- by init stringa|2048_cv 1.57 % 2.14 % 4 ----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -hashStrMapA emplace & find stringa;_mean 4223565 ns 4226280 ns 10 -hashStrMapA emplace & find stringa;_median 4286891 ns 4282756 ns 10 -hashStrMapA emplace & find stringa;_stddev 153748 ns 168671 ns 10 -hashStrMapA emplace & find stringa;_cv 3.64 % 3.99 % 10 -std::unordered_map emplace & find std::string;_mean 5280639 ns 5265625 ns 10 -std::unordered_map emplace & find std::string;_median 5237516 ns 5312500 ns 10 -std::unordered_map emplace & find std::string;_stddev 98142 ns 105461 ns 10 -std::unordered_map emplace & find std::string;_cv 1.86 % 2.00 % 10 -hashStrMapA emplace & find ssa;_mean 3869626 ns 3866969 ns 10 -hashStrMapA emplace & find ssa;_median 3856536 ns 3840782 ns 10 -hashStrMapA emplace & find ssa;_stddev 69055 ns 82811 ns 10 -hashStrMapA emplace & find ssa;_cv 1.78 % 2.14 % 10 -std::unordered_map emplace & find std::string_view;_mean 6233309 ns 6236049 ns 10 -std::unordered_map emplace & find std::string_view;_median 6218193 ns 6208147 ns 10 -std::unordered_map emplace & find std::string_view;_stddev 96434 ns 114854 ns 10 -std::unordered_map emplace & find std::string_view;_cv 1.55 % 1.84 % 10 +hashStrMapA emplace & find stringa;_mean 4361265 ns 4370117 ns 4 +hashStrMapA emplace & find stringa;_median 4319146 ns 4345703 ns 4 +hashStrMapA emplace & find stringa;_stddev 171896 ns 166780 ns 4 +hashStrMapA emplace & find stringa;_cv 3.94 % 3.82 % 4 +std::unordered_map emplace & find std::string;_mean 5878463 ns 5859375 ns 4 +std::unordered_map emplace & find std::string;_median 5875393 ns 5815972 ns 4 +std::unordered_map emplace & find std::string;_stddev 196309 ns 166220 ns 4 +std::unordered_map emplace & find std::string;_cv 3.34 % 2.84 % 4 +hashStrMapA emplace & find ssa;_mean 3945892 ns 3929782 ns 4 +hashStrMapA emplace & find ssa;_median 3963375 ns 3953313 ns 4 +hashStrMapA emplace & find ssa;_stddev 56988 ns 47063 ns 4 +hashStrMapA emplace & find ssa;_cv 1.44 % 1.20 % 4 +std::unordered_map emplace & find std::string_view;_mean 6313765 ns 6289062 ns 4 +std::unordered_map emplace & find std::string_view;_median 6295877 ns 6328125 ns 4 +std::unordered_map emplace & find std::string_view;_stddev 60913 ns 149598 ns 4 +std::unordered_map emplace & find std::string_view;_cv 0.96 % 2.38 % 4 ----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Build func full name std::string;_mean 1641 ns 1643 ns 10 -Build func full name std::string;_median 1647 ns 1639 ns 10 -Build func full name std::string;_stddev 32.3 ns 34.7 ns 10 -Build func full name std::string;_cv 1.97 % 2.11 % 10 -Build func full name std::string 1;_mean 1763 ns 1761 ns 10 -Build func full name std::string 1;_median 1733 ns 1744 ns 10 -Build func full name std::string 1;_stddev 57.8 ns 55.1 ns 10 -Build func full name std::string 1;_cv 3.28 % 3.13 % 10 -Build func full name std::stream;_mean 9911 ns 9898 ns 10 -Build func full name std::stream;_median 9726 ns 9835 ns 10 -Build func full name std::stream;_stddev 427 ns 395 ns 10 -Build func full name std::stream;_cv 4.31 % 3.99 % 10 -Build func full name stringa;_mean 910 ns 906 ns 10 -Build func full name stringa;_median 909 ns 900 ns 10 -Build func full name stringa;_stddev 15.1 ns 17.2 ns 10 -Build func full name stringa;_cv 1.66 % 1.90 % 10 -Build func full name stringa 1;_mean 1009 ns 1008 ns 10 -Build func full name stringa 1;_median 1009 ns 1013 ns 10 -Build func full name stringa 1;_stddev 20.4 ns 25.9 ns 10 -Build func full name stringa 1;_cv 2.02 % 2.57 % 10 +Build func full name std::string;_mean 1644 ns 1639 ns 4 +Build func full name std::string;_median 1639 ns 1639 ns 4 +Build func full name std::string;_stddev 14.4 ns 0.000 ns 4 +Build func full name std::string;_cv 0.88 % 0.00 % 4 +Build func full name std::string 1;_mean 1749 ns 1735 ns 4 +Build func full name std::string 1;_median 1743 ns 1726 ns 4 +Build func full name std::string 1;_stddev 40.7 ns 33.4 ns 4 +Build func full name std::string 1;_cv 2.33 % 1.92 % 4 +Build func full name std::stream;_mean 9940 ns 9940 ns 4 +Build func full name std::stream;_median 9939 ns 9835 ns 4 +Build func full name std::stream;_stddev 126 ns 209 ns 4 +Build func full name std::stream;_cv 1.26 % 2.11 % 4 +Build func full name stringa;_mean 937 ns 936 ns 4 +Build func full name stringa;_median 913 ns 910 ns 4 +Build func full name stringa;_stddev 54.7 ns 60.1 ns 4 +Build func full name stringa;_cv 5.83 % 6.42 % 4 +Build func full name stringa 1;_mean 1058 ns 1057 ns 4 +Build func full name stringa 1;_median 1052 ns 1057 ns 4 +Build func full name stringa 1;_stddev 15.4 ns 27.0 ns 4 +Build func full name stringa 1;_cv 1.45 % 2.56 % 4 diff --git a/bench/results/004-Xeon E5-2682 v4, WASM Firefox, Clang-21.txt b/bench/results/004-Xeon E5-2682 v4, WASM Firefox, Clang-21.txt index d1861d4..d66404c 100644 --- a/bench/results/004-Xeon E5-2682 v4, WASM Firefox, Clang-21.txt +++ b/bench/results/004-Xeon E5-2682 v4, WASM Firefox, Clang-21.txt @@ -1,894 +1,915 @@ +Benchmarks of simstr, version 1.6.3 +Sources: https://github.com/orefkov/simstr +Results: https://orefkov.github.io/simstr/results.html + Run on (32 X 2513.96 MHz CPU s) Firefox: 146.0.1.60 webasm -------------------------------------------------------------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------------------------------------------------------------------------------------------- ----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and number by std to std::string_mean 902 ns 902 ns 10 -Concat std::string and number by std to std::string_median 904 ns 904 ns 10 -Concat std::string and number by std to std::string_stddev 24.3 ns 24.3 ns 10 -Concat std::string and number by std to std::string_cv 2.70 % 2.70 % 10 -Concat std::string and number by StrExpr to std::string_mean 401 ns 401 ns 10 -Concat std::string and number by StrExpr to std::string_median 400 ns 400 ns 10 -Concat std::string and number by StrExpr to std::string_stddev 22.1 ns 22.1 ns 10 -Concat std::string and number by StrExpr to std::string_cv 5.50 % 5.50 % 10 -Concat stringa and number by StrExpr to simstr::stringa_mean 228 ns 228 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_median 224 ns 224 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_stddev 11.6 ns 11.6 ns 10 -Concat stringa and number by StrExpr to simstr::stringa_cv 5.09 % 5.09 % 10 -Concat stringa and number by e_concat to simstr::stringa_mean 218 ns 218 ns 10 -Concat stringa and number by e_concat to simstr::stringa_median 216 ns 216 ns 10 -Concat stringa and number by e_concat to simstr::stringa_stddev 8.76 ns 8.76 ns 10 -Concat stringa and number by e_concat to simstr::stringa_cv 4.02 % 4.02 % 10 +Concat std::string and number by std to std::string_mean 1022 ns 1022 ns 4 +Concat std::string and number by std to std::string_median 1002 ns 1002 ns 4 +Concat std::string and number by std to std::string_stddev 94.1 ns 94.1 ns 4 +Concat std::string and number by std to std::string_cv 9.21 % 9.21 % 4 +Concat std::string and number by StrExpr to std::string_mean 449 ns 449 ns 4 +Concat std::string and number by StrExpr to std::string_median 450 ns 450 ns 4 +Concat std::string and number by StrExpr to std::string_stddev 15.9 ns 15.9 ns 4 +Concat std::string and number by StrExpr to std::string_cv 3.53 % 3.53 % 4 +Concat stringa and number by StrExpr to simstr::stringa_mean 230 ns 230 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_median 226 ns 226 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_stddev 19.5 ns 19.5 ns 4 +Concat stringa and number by StrExpr to simstr::stringa_cv 8.51 % 8.51 % 4 +Concat stringa and number by e_concat to simstr::stringa_mean 239 ns 239 ns 4 +Concat stringa and number by e_concat to simstr::stringa_median 236 ns 236 ns 4 +Concat stringa and number by e_concat to simstr::stringa_stddev 29.4 ns 29.4 ns 4 +Concat stringa and number by e_concat to simstr::stringa_cv 12.32 % 12.32 % 4 ----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string and format hex number and literal to std::string_mean 1396 ns 1396 ns 10 -Concat std::string and format hex number and literal to std::string_median 1392 ns 1392 ns 10 -Concat std::string and format hex number and literal to std::string_stddev 30.5 ns 30.5 ns 10 -Concat std::string and format hex number and literal to std::string_cv 2.18 % 2.18 % 10 -std::format std::string and hex number by literal to std::string_mean 1628 ns 1628 ns 10 -std::format std::string and hex number by literal to std::string_median 1628 ns 1628 ns 10 -std::format std::string and hex number by literal to std::string_stddev 49.2 ns 49.2 ns 10 -std::format std::string and hex number by literal to std::string_cv 3.02 % 3.02 % 10 -Concat std::string and std::tochars and string to std::string_mean 627 ns 627 ns 10 -Concat std::string and std::tochars and string to std::string_median 632 ns 632 ns 10 -Concat std::string and std::tochars and string to std::string_stddev 24.8 ns 24.8 ns 10 -Concat std::string and std::tochars and string to std::string_cv 3.96 % 3.96 % 10 -Concat std::string and hex number and literal by StrExpr to std::string_mean 396 ns 396 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_median 396 ns 396 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_stddev 13.5 ns 13.5 ns 10 -Concat std::string and hex number and literal by StrExpr to std::string_cv 3.41 % 3.41 % 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 209 ns 209 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 209 ns 209 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 8.66 ns 8.66 ns 10 -Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 4.13 % 4.13 % 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 221 ns 221 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_median 216 ns 216 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 13.5 ns 13.5 ns 10 -Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 6.14 % 6.14 % 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_mean 450 ns 450 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_median 440 ns 440 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 33.5 ns 33.5 ns 10 -Subst stringa and hex number by e_subst literal to simstr::stringa_cv 7.45 % 7.45 % 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 740 ns 740 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 727 ns 727 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 39.4 ns 39.4 ns 10 -Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 5.32 % 5.32 % 10 +Concat std::string and format hex number and literal to std::string_mean 1423 ns 1423 ns 4 +Concat std::string and format hex number and literal to std::string_median 1421 ns 1421 ns 4 +Concat std::string and format hex number and literal to std::string_stddev 41.6 ns 41.6 ns 4 +Concat std::string and format hex number and literal to std::string_cv 2.92 % 2.92 % 4 +std::format std::string and hex number by literal to std::string_mean 1601 ns 1601 ns 4 +std::format std::string and hex number by literal to std::string_median 1604 ns 1604 ns 4 +std::format std::string and hex number by literal to std::string_stddev 39.1 ns 39.1 ns 4 +std::format std::string and hex number by literal to std::string_cv 2.44 % 2.44 % 4 +Concat std::string and std::to_chars and string to std::string_mean 640 ns 640 ns 4 +Concat std::string and std::to_chars and string to std::string_median 630 ns 630 ns 4 +Concat std::string and std::to_chars and string to std::string_stddev 23.5 ns 23.5 ns 4 +Concat std::string and std::to_chars and string to std::string_cv 3.67 % 3.67 % 4 +Concat std::string and hex number and literal by StrExpr to std::string_mean 422 ns 422 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_median 416 ns 416 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_stddev 31.7 ns 31.7 ns 4 +Concat std::string and hex number and literal by StrExpr to std::string_cv 7.51 % 7.51 % 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 212 ns 212 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 212 ns 212 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 10.8 ns 10.8 ns 4 +Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 5.10 % 5.10 % 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 213 ns 213 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_median 209 ns 209 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 10.1 ns 10.1 ns 4 +Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 4.72 % 4.72 % 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_mean 486 ns 486 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_median 479 ns 479 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 20.9 ns 20.9 ns 4 +Subst stringa and hex number by e_subst literal to simstr::stringa_cv 4.31 % 4.31 % 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 773 ns 773 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 787 ns 787 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 53.1 ns 53.1 ns 4 +Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 6.87 % 6.87 % 4 +----- format/vformat and subst/vsubst octal number ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_mean 641 ns 641 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_median 632 ns 632 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_stddev 32.5 ns 32.5 ns 4 +e_subst("art {} end", e_int<8, f::w<10> | f::p | f::z>(i))_cv 5.07 % 5.07 % 4 +std::format("art {:#010o} end", i)_mean 1750 ns 1750 ns 4 +std::format("art {:#010o} end", i)_median 1747 ns 1747 ns 4 +std::format("art {:#010o} end", i)_stddev 62.7 ns 62.7 ns 4 +std::format("art {:#010o} end", i)_cv 3.58 % 3.58 % 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_mean 1016 ns 1016 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_median 1001 ns 1001 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_stddev 50.7 ns 50.7 ns 4 +e_vsubst(pattern, e_int<8, f::w<10> | f::p | f::z>(i))_cv 4.99 % 4.99 % 4 +std::vformat(pattern, std::make_format_args(i))_mean 1747 ns 1747 ns 4 +std::vformat(pattern, std::make_format_args(i))_median 1728 ns 1728 ns 4 +std::vformat(pattern, std::make_format_args(i))_stddev 51.6 ns 51.6 ns 4 +std::vformat(pattern, std::make_format_args(i))_cv 2.95 % 2.95 % 4 ----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat std::string by std to std::string_mean 101 ns 101 ns 10 -Concat std::string by std to std::string_median 99.3 ns 99.3 ns 10 -Concat std::string by std to std::string_stddev 5.64 ns 5.64 ns 10 -Concat std::string by std to std::string_cv 5.60 % 5.60 % 10 -Concat std::string by StrExpr to std::string_mean 108 ns 108 ns 10 -Concat std::string by StrExpr to std::string_median 108 ns 108 ns 10 -Concat std::string by StrExpr to std::string_stddev 5.10 ns 5.10 ns 10 -Concat std::string by StrExpr to std::string_cv 4.71 % 4.71 % 10 -Concat stringa by StrExpr to stringa_mean 96.7 ns 96.7 ns 10 -Concat stringa by StrExpr to stringa_median 98.6 ns 98.6 ns 10 -Concat stringa by StrExpr to stringa_stddev 5.39 ns 5.42 ns 10 -Concat stringa by StrExpr to stringa_cv 5.58 % 5.60 % 10 +Concat std::string by std to std::string_mean 96.4 ns 96.4 ns 4 +Concat std::string by std to std::string_median 96.9 ns 96.9 ns 4 +Concat std::string by std to std::string_stddev 1.68 ns 1.68 ns 4 +Concat std::string by std to std::string_cv 1.74 % 1.74 % 4 +Concat std::string by StrExpr to std::string_mean 111 ns 111 ns 4 +Concat std::string by StrExpr to std::string_median 109 ns 109 ns 4 +Concat std::string by StrExpr to std::string_stddev 5.51 ns 5.51 ns 4 +Concat std::string by StrExpr to std::string_cv 4.98 % 4.98 % 4 +Concat stringa by StrExpr to stringa_mean 101 ns 101 ns 4 +Concat stringa by StrExpr to stringa_median 102 ns 102 ns 4 +Concat stringa by StrExpr to stringa_stddev 4.02 ns 4.02 ns 4 +Concat stringa by StrExpr to stringa_cv 4.00 % 4.00 % 4 ----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Find concat three std::string_mean 187 ns 187 ns 10 -Find concat three std::string_median 187 ns 187 ns 10 -Find concat three std::string_stddev 6.98 ns 6.98 ns 10 -Find concat three std::string_cv 3.73 % 3.73 % 10 -Find concat three strexpr_mean 107 ns 107 ns 10 -Find concat three strexpr_median 106 ns 106 ns 10 -Find concat three strexpr_stddev 4.93 ns 4.93 ns 10 -Find concat three strexpr_cv 4.62 % 4.62 % 10 -Find concat three simstr_mean 76.4 ns 76.4 ns 10 -Find concat three simstr_median 75.7 ns 75.7 ns 10 -Find concat three simstr_stddev 2.65 ns 2.65 ns 10 -Find concat three simstr_cv 3.47 % 3.47 % 10 +Find concat three std::string_mean 149 ns 149 ns 4 +Find concat three std::string_median 151 ns 151 ns 4 +Find concat three std::string_stddev 5.11 ns 5.11 ns 4 +Find concat three std::string_cv 3.42 % 3.42 % 4 +Find concat three strexpr_mean 106 ns 106 ns 4 +Find concat three strexpr_median 106 ns 106 ns 4 +Find concat three strexpr_stddev 2.66 ns 2.66 ns 4 +Find concat three strexpr_cv 2.51 % 2.51 % 4 +Find concat three simstr_mean 73.1 ns 73.1 ns 4 +Find concat three simstr_median 72.7 ns 72.7 ns 4 +Find concat three simstr_stddev 2.42 ns 2.42 ns 4 +Find concat three simstr_cv 3.32 % 3.32 % 4 ----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -BuildTypeNameStr 0/0_mean 17.3 ns 17.3 ns 10 -BuildTypeNameStr 0/0_median 17.4 ns 17.4 ns 10 -BuildTypeNameStr 0/0_stddev 0.700 ns 0.700 ns 10 -BuildTypeNameStr 0/0_cv 4.04 % 4.04 % 10 -BuildTypeNameExp 0/0_mean 16.1 ns 16.1 ns 10 -BuildTypeNameExp 0/0_median 16.0 ns 16.0 ns 10 -BuildTypeNameExp 0/0_stddev 0.541 ns 0.539 ns 10 -BuildTypeNameExp 0/0_cv 3.35 % 3.34 % 10 -BuildTypeNameSim 0/0_mean 16.4 ns 16.4 ns 10 -BuildTypeNameSim 0/0_median 15.8 ns 15.8 ns 10 -BuildTypeNameSim 0/0_stddev 0.989 ns 0.989 ns 10 -BuildTypeNameSim 0/0_cv 6.04 % 6.04 % 10 -BuildTypeNameStr 10/10_mean 274 ns 274 ns 10 -BuildTypeNameStr 10/10_median 269 ns 269 ns 10 -BuildTypeNameStr 10/10_stddev 18.9 ns 18.9 ns 10 -BuildTypeNameStr 10/10_cv 6.91 % 6.91 % 10 -BuildTypeNameExp 10/10_mean 94.7 ns 94.7 ns 10 -BuildTypeNameExp 10/10_median 95.1 ns 95.1 ns 10 -BuildTypeNameExp 10/10_stddev 3.09 ns 3.06 ns 10 -BuildTypeNameExp 10/10_cv 3.26 % 3.23 % 10 -BuildTypeNameSim 10/10_mean 68.8 ns 68.8 ns 10 -BuildTypeNameSim 10/10_median 68.6 ns 68.6 ns 10 -BuildTypeNameSim 10/10_stddev 2.17 ns 2.17 ns 10 -BuildTypeNameSim 10/10_cv 3.16 % 3.16 % 10 +BuildTypeNameStr 0/0_mean 18.0 ns 18.0 ns 4 +BuildTypeNameStr 0/0_median 18.0 ns 18.0 ns 4 +BuildTypeNameStr 0/0_stddev 0.794 ns 0.794 ns 4 +BuildTypeNameStr 0/0_cv 4.41 % 4.41 % 4 +BuildTypeNameExp 0/0_mean 17.5 ns 17.5 ns 4 +BuildTypeNameExp 0/0_median 17.5 ns 17.5 ns 4 +BuildTypeNameExp 0/0_stddev 0.955 ns 0.955 ns 4 +BuildTypeNameExp 0/0_cv 5.47 % 5.47 % 4 +BuildTypeNameSim 0/0_mean 15.6 ns 15.6 ns 4 +BuildTypeNameSim 0/0_median 15.7 ns 15.7 ns 4 +BuildTypeNameSim 0/0_stddev 0.798 ns 0.798 ns 4 +BuildTypeNameSim 0/0_cv 5.11 % 5.11 % 4 +BuildTypeNameStr 10/10_mean 296 ns 296 ns 4 +BuildTypeNameStr 10/10_median 298 ns 298 ns 4 +BuildTypeNameStr 10/10_stddev 28.0 ns 28.0 ns 4 +BuildTypeNameStr 10/10_cv 9.47 % 9.47 % 4 +BuildTypeNameExp 10/10_mean 106 ns 106 ns 4 +BuildTypeNameExp 10/10_median 105 ns 105 ns 4 +BuildTypeNameExp 10/10_stddev 7.19 ns 7.19 ns 4 +BuildTypeNameExp 10/10_cv 6.80 % 6.80 % 4 +BuildTypeNameSim 10/10_mean 72.9 ns 72.9 ns 4 +BuildTypeNameSim 10/10_median 71.5 ns 71.5 ns 4 +BuildTypeNameSim 10/10_stddev 6.88 ns 6.88 ns 4 +BuildTypeNameSim 10/10_cv 9.43 % 9.43 % 4 ----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000 -Concat with replace str_mean 444 ns 444 ns 10 -Concat with replace str_median 434 ns 434 ns 10 -Concat with replace str_stddev 29.8 ns 29.8 ns 10 -Concat with replace str_cv 6.72 % 6.72 % 10 -Concat with replace exp_mean 252 ns 252 ns 10 -Concat with replace exp_median 251 ns 251 ns 10 -Concat with replace exp_stddev 14.6 ns 14.6 ns 10 -Concat with replace exp_cv 5.79 % 5.79 % 10 +Concat with replace str_mean 496 ns 496 ns 4 +Concat with replace str_median 485 ns 485 ns 4 +Concat with replace str_stddev 42.6 ns 42.6 ns 4 +Concat with replace str_cv 8.60 % 8.60 % 4 +Concat with replace exp_mean 284 ns 284 ns 4 +Concat with replace exp_median 284 ns 284 ns 4 +Concat with replace exp_stddev 14.1 ns 14.1 ns 4 +Concat with replace exp_cv 4.95 % 4.95 % 4 ----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e;_mean 2.15 ns 2.15 ns 10 -std::string e;_median 2.15 ns 2.15 ns 10 -std::string e;_stddev 0.017 ns 0.017 ns 10 -std::string e;_cv 0.78 % 0.78 % 10 -std::string_view e;_mean 0.974 ns 0.974 ns 10 -std::string_view e;_median 0.973 ns 0.973 ns 10 -std::string_view e;_stddev 0.013 ns 0.013 ns 10 -std::string_view e;_cv 1.30 % 1.30 % 10 -ssa e;_mean 0.939 ns 0.939 ns 10 -ssa e;_median 0.937 ns 0.937 ns 10 -ssa e;_stddev 0.006 ns 0.006 ns 10 -ssa e;_cv 0.59 % 0.59 % 10 -stringa e;_mean 2.19 ns 2.19 ns 10 -stringa e;_median 2.18 ns 2.18 ns 10 -stringa e;_stddev 0.054 ns 0.054 ns 10 -stringa e;_cv 2.46 % 2.46 % 10 -lstringa<20> e;_mean 2.21 ns 2.21 ns 10 -lstringa<20> e;_median 2.19 ns 2.19 ns 10 -lstringa<20> e;_stddev 0.059 ns 0.059 ns 10 -lstringa<20> e;_cv 2.68 % 2.68 % 10 -lstringa<40> e;_mean 2.57 ns 2.57 ns 10 -lstringa<40> e;_median 2.57 ns 2.57 ns 10 -lstringa<40> e;_stddev 0.031 ns 0.031 ns 10 -lstringa<40> e;_cv 1.19 % 1.19 % 10 +std::string e;_mean 2.16 ns 2.16 ns 4 +std::string e;_median 2.16 ns 2.16 ns 4 +std::string e;_stddev 0.034 ns 0.034 ns 4 +std::string e;_cv 1.57 % 1.57 % 4 +std::string_view e;_mean 0.989 ns 0.989 ns 4 +std::string_view e;_median 0.990 ns 0.990 ns 4 +std::string_view e;_stddev 0.011 ns 0.011 ns 4 +std::string_view e;_cv 1.10 % 1.10 % 4 +ssa e;_mean 0.945 ns 0.945 ns 4 +ssa e;_median 0.940 ns 0.940 ns 4 +ssa e;_stddev 0.013 ns 0.013 ns 4 +ssa e;_cv 1.39 % 1.39 % 4 +stringa e;_mean 2.16 ns 2.16 ns 4 +stringa e;_median 2.16 ns 2.16 ns 4 +stringa e;_stddev 0.029 ns 0.029 ns 4 +stringa e;_cv 1.34 % 1.34 % 4 +lstringa<20> e;_mean 2.22 ns 2.22 ns 4 +lstringa<20> e;_median 2.22 ns 2.22 ns 4 +lstringa<20> e;_stddev 0.049 ns 0.049 ns 4 +lstringa<20> e;_cv 2.22 % 2.22 % 4 +lstringa<40> e;_mean 2.54 ns 2.54 ns 4 +lstringa<40> e;_median 2.54 ns 2.54 ns 4 +lstringa<40> e;_stddev 0.017 ns 0.017 ns 4 +lstringa<40> e;_cv 0.68 % 0.68 % 4 ----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text";_mean 2.34 ns 2.34 ns 10 -std::string e = "Test text";_median 2.33 ns 2.33 ns 10 -std::string e = "Test text";_stddev 0.058 ns 0.058 ns 10 -std::string e = "Test text";_cv 2.50 % 2.50 % 10 -std::string_view e = "Test text";_mean 1.26 ns 1.26 ns 10 -std::string_view e = "Test text";_median 1.23 ns 1.23 ns 10 -std::string_view e = "Test text";_stddev 0.067 ns 0.067 ns 10 -std::string_view e = "Test text";_cv 5.32 % 5.32 % 10 -ssa e = "Test text";_mean 0.978 ns 0.978 ns 10 -ssa e = "Test text";_median 0.973 ns 0.973 ns 10 -ssa e = "Test text";_stddev 0.015 ns 0.015 ns 10 -ssa e = "Test text";_cv 1.50 % 1.50 % 10 -stringa e = "Test text";_mean 2.18 ns 2.18 ns 10 -stringa e = "Test text";_median 2.18 ns 2.18 ns 10 -stringa e = "Test text";_stddev 0.035 ns 0.035 ns 10 -stringa e = "Test text";_cv 1.61 % 1.61 % 10 -lstringa<20> e = "Test text";_mean 2.66 ns 2.66 ns 10 -lstringa<20> e = "Test text";_median 2.66 ns 2.66 ns 10 -lstringa<20> e = "Test text";_stddev 0.074 ns 0.074 ns 10 -lstringa<20> e = "Test text";_cv 2.79 % 2.79 % 10 -lstringa<40> e = "Test text";_mean 2.67 ns 2.67 ns 10 -lstringa<40> e = "Test text";_median 2.66 ns 2.66 ns 10 -lstringa<40> e = "Test text";_stddev 0.063 ns 0.063 ns 10 -lstringa<40> e = "Test text";_cv 2.35 % 2.35 % 10 +std::string e = "Test text";_mean 2.29 ns 2.29 ns 4 +std::string e = "Test text";_median 2.29 ns 2.29 ns 4 +std::string e = "Test text";_stddev 0.019 ns 0.019 ns 4 +std::string e = "Test text";_cv 0.84 % 0.84 % 4 +std::string_view e = "Test text";_mean 1.24 ns 1.24 ns 4 +std::string_view e = "Test text";_median 1.24 ns 1.24 ns 4 +std::string_view e = "Test text";_stddev 0.013 ns 0.013 ns 4 +std::string_view e = "Test text";_cv 1.04 % 1.04 % 4 +ssa e = "Test text";_mean 0.976 ns 0.976 ns 4 +ssa e = "Test text";_median 0.976 ns 0.976 ns 4 +ssa e = "Test text";_stddev 0.011 ns 0.011 ns 4 +ssa e = "Test text";_cv 1.14 % 1.14 % 4 +stringa e = "Test text";_mean 2.22 ns 2.22 ns 4 +stringa e = "Test text";_median 2.22 ns 2.22 ns 4 +stringa e = "Test text";_stddev 0.044 ns 0.044 ns 4 +stringa e = "Test text";_cv 1.97 % 1.97 % 4 +lstringa<20> e = "Test text";_mean 2.64 ns 2.64 ns 4 +lstringa<20> e = "Test text";_median 2.60 ns 2.60 ns 4 +lstringa<20> e = "Test text";_stddev 0.073 ns 0.073 ns 4 +lstringa<20> e = "Test text";_cv 2.78 % 2.78 % 4 +lstringa<40> e = "Test text";_mean 2.65 ns 2.65 ns 4 +lstringa<40> e = "Test text";_median 2.63 ns 2.63 ns 4 +lstringa<40> e = "Test text";_stddev 0.064 ns 0.064 ns 4 +lstringa<40> e = "Test text";_cv 2.40 % 2.40 % 4 ----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890";_mean 15.9 ns 15.9 ns 10 -std::string e = "123456789012345678901234567890";_median 15.8 ns 15.8 ns 10 -std::string e = "123456789012345678901234567890";_stddev 0.411 ns 0.411 ns 10 -std::string e = "123456789012345678901234567890";_cv 2.58 % 2.58 % 10 -std::string_view e = "123456789012345678901234567890";_mean 1.25 ns 1.25 ns 10 -std::string_view e = "123456789012345678901234567890";_median 1.25 ns 1.25 ns 10 -std::string_view e = "123456789012345678901234567890";_stddev 0.034 ns 0.034 ns 10 -std::string_view e = "123456789012345678901234567890";_cv 2.74 % 2.74 % 10 -ssa e = "123456789012345678901234567890";_mean 0.981 ns 0.981 ns 10 -ssa e = "123456789012345678901234567890";_median 0.978 ns 0.978 ns 10 -ssa e = "123456789012345678901234567890";_stddev 0.018 ns 0.018 ns 10 -ssa e = "123456789012345678901234567890";_cv 1.79 % 1.79 % 10 -stringa e = "123456789012345678901234567890";_mean 2.24 ns 2.24 ns 10 -stringa e = "123456789012345678901234567890";_median 2.22 ns 2.22 ns 10 -stringa e = "123456789012345678901234567890";_stddev 0.073 ns 0.073 ns 10 -stringa e = "123456789012345678901234567890";_cv 3.28 % 3.28 % 10 -lstringa<20> e = "123456789012345678901234567890";_mean 17.2 ns 17.2 ns 10 -lstringa<20> e = "123456789012345678901234567890";_median 17.2 ns 17.2 ns 10 -lstringa<20> e = "123456789012345678901234567890";_stddev 0.407 ns 0.407 ns 10 -lstringa<20> e = "123456789012345678901234567890";_cv 2.36 % 2.36 % 10 -lstringa<40> e = "123456789012345678901234567890";_mean 2.99 ns 2.99 ns 10 -lstringa<40> e = "123456789012345678901234567890";_median 2.98 ns 2.98 ns 10 -lstringa<40> e = "123456789012345678901234567890";_stddev 0.067 ns 0.067 ns 10 -lstringa<40> e = "123456789012345678901234567890";_cv 2.26 % 2.26 % 10 +std::string e = "123456789012345678901234567890";_mean 16.3 ns 16.3 ns 4 +std::string e = "123456789012345678901234567890";_median 16.3 ns 16.3 ns 4 +std::string e = "123456789012345678901234567890";_stddev 0.257 ns 0.257 ns 4 +std::string e = "123456789012345678901234567890";_cv 1.58 % 1.58 % 4 +std::string_view e = "123456789012345678901234567890";_mean 1.23 ns 1.23 ns 4 +std::string_view e = "123456789012345678901234567890";_median 1.23 ns 1.23 ns 4 +std::string_view e = "123456789012345678901234567890";_stddev 0.022 ns 0.022 ns 4 +std::string_view e = "123456789012345678901234567890";_cv 1.79 % 1.79 % 4 +ssa e = "123456789012345678901234567890";_mean 0.976 ns 0.976 ns 4 +ssa e = "123456789012345678901234567890";_median 0.976 ns 0.976 ns 4 +ssa e = "123456789012345678901234567890";_stddev 0.016 ns 0.016 ns 4 +ssa e = "123456789012345678901234567890";_cv 1.61 % 1.61 % 4 +stringa e = "123456789012345678901234567890";_mean 2.27 ns 2.28 ns 4 +stringa e = "123456789012345678901234567890";_median 2.27 ns 2.27 ns 4 +stringa e = "123456789012345678901234567890";_stddev 0.062 ns 0.061 ns 4 +stringa e = "123456789012345678901234567890";_cv 2.72 % 2.69 % 4 +lstringa<20> e = "123456789012345678901234567890";_mean 17.1 ns 17.1 ns 4 +lstringa<20> e = "123456789012345678901234567890";_median 17.2 ns 17.2 ns 4 +lstringa<20> e = "123456789012345678901234567890";_stddev 0.533 ns 0.533 ns 4 +lstringa<20> e = "123456789012345678901234567890";_cv 3.11 % 3.11 % 4 +lstringa<40> e = "123456789012345678901234567890";_mean 3.01 ns 3.01 ns 4 +lstringa<40> e = "123456789012345678901234567890";_median 2.99 ns 2.99 ns 4 +lstringa<40> e = "123456789012345678901234567890";_stddev 0.045 ns 0.045 ns 4 +lstringa<40> e = "123456789012345678901234567890";_cv 1.50 % 1.50 % 4 ----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "Test text"; auto c{e};_mean 2.26 ns 2.26 ns 10 -std::string e = "Test text"; auto c{e};_median 2.27 ns 2.27 ns 10 -std::string e = "Test text"; auto c{e};_stddev 0.075 ns 0.075 ns 10 -std::string e = "Test text"; auto c{e};_cv 3.31 % 3.31 % 10 -std::string_view e = "Test text"; auto c{e};_mean 1.25 ns 1.25 ns 10 -std::string_view e = "Test text"; auto c{e};_median 1.25 ns 1.25 ns 10 -std::string_view e = "Test text"; auto c{e};_stddev 0.029 ns 0.029 ns 10 -std::string_view e = "Test text"; auto c{e};_cv 2.30 % 2.30 % 10 -ssa e = "Test text"; auto c{e};_mean 1.24 ns 1.24 ns 10 -ssa e = "Test text"; auto c{e};_median 1.23 ns 1.23 ns 10 -ssa e = "Test text"; auto c{e};_stddev 0.044 ns 0.044 ns 10 -ssa e = "Test text"; auto c{e};_cv 3.56 % 3.56 % 10 -stringa e = "Test text"; auto c{e};_mean 2.58 ns 2.58 ns 10 -stringa e = "Test text"; auto c{e};_median 2.57 ns 2.57 ns 10 -stringa e = "Test text"; auto c{e};_stddev 0.045 ns 0.045 ns 10 -stringa e = "Test text"; auto c{e};_cv 1.73 % 1.73 % 10 -lstringa<20> e = "Test text"; auto c{e};_mean 15.2 ns 15.2 ns 10 -lstringa<20> e = "Test text"; auto c{e};_median 15.3 ns 15.3 ns 10 -lstringa<20> e = "Test text"; auto c{e};_stddev 0.758 ns 0.758 ns 10 -lstringa<20> e = "Test text"; auto c{e};_cv 5.00 % 5.00 % 10 -lstringa<40> e = "Test text"; auto c{e};_mean 14.8 ns 14.8 ns 10 -lstringa<40> e = "Test text"; auto c{e};_median 14.8 ns 14.8 ns 10 -lstringa<40> e = "Test text"; auto c{e};_stddev 0.826 ns 0.826 ns 10 -lstringa<40> e = "Test text"; auto c{e};_cv 5.58 % 5.58 % 10 +std::string e = "Test text"; auto c{e};_mean 2.21 ns 2.21 ns 4 +std::string e = "Test text"; auto c{e};_median 2.22 ns 2.22 ns 4 +std::string e = "Test text"; auto c{e};_stddev 0.039 ns 0.039 ns 4 +std::string e = "Test text"; auto c{e};_cv 1.77 % 1.77 % 4 +std::string_view e = "Test text"; auto c{e};_mean 1.24 ns 1.24 ns 4 +std::string_view e = "Test text"; auto c{e};_median 1.23 ns 1.23 ns 4 +std::string_view e = "Test text"; auto c{e};_stddev 0.026 ns 0.026 ns 4 +std::string_view e = "Test text"; auto c{e};_cv 2.11 % 2.11 % 4 +ssa e = "Test text"; auto c{e};_mean 1.23 ns 1.23 ns 4 +ssa e = "Test text"; auto c{e};_median 1.24 ns 1.24 ns 4 +ssa e = "Test text"; auto c{e};_stddev 0.032 ns 0.032 ns 4 +ssa e = "Test text"; auto c{e};_cv 2.60 % 2.60 % 4 +stringa e = "Test text"; auto c{e};_mean 2.64 ns 2.64 ns 4 +stringa e = "Test text"; auto c{e};_median 2.66 ns 2.66 ns 4 +stringa e = "Test text"; auto c{e};_stddev 0.081 ns 0.081 ns 4 +stringa e = "Test text"; auto c{e};_cv 3.07 % 3.07 % 4 +lstringa<20> e = "Test text"; auto c{e};_mean 15.5 ns 15.5 ns 4 +lstringa<20> e = "Test text"; auto c{e};_median 15.7 ns 15.7 ns 4 +lstringa<20> e = "Test text"; auto c{e};_stddev 0.843 ns 0.843 ns 4 +lstringa<20> e = "Test text"; auto c{e};_cv 5.43 % 5.43 % 4 +lstringa<40> e = "Test text"; auto c{e};_mean 14.8 ns 14.8 ns 4 +lstringa<40> e = "Test text"; auto c{e};_median 14.8 ns 14.8 ns 4 +lstringa<40> e = "Test text"; auto c{e};_stddev 0.518 ns 0.518 ns 4 +lstringa<40> e = "Test text"; auto c{e};_cv 3.49 % 3.49 % 4 ----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string e = "123456789012345678901234567890"; auto c{e};_mean 33.9 ns 33.9 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_median 33.7 ns 33.7 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.974 ns 0.974 ns 10 -std::string e = "123456789012345678901234567890"; auto c{e};_cv 2.87 % 2.87 % 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 1.25 ns 1.25 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_median 1.25 ns 1.25 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.039 ns 0.039 ns 10 -std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 3.09 % 3.09 % 10 -ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.972 ns 0.972 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_median 0.977 ns 0.977 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.019 ns 0.019 ns 10 -ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.93 % 1.93 % 10 -stringa e = "123456789012345678901234567890"; auto c{e};_mean 2.22 ns 2.22 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_median 2.22 ns 2.22 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.052 ns 0.052 ns 10 -stringa e = "123456789012345678901234567890"; auto c{e};_cv 2.33 % 2.33 % 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 16.3 ns 16.3 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 16.1 ns 16.1 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.405 ns 0.402 ns 10 -lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.49 % 2.47 % 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 14.0 ns 14.0 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 13.6 ns 13.6 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 1.45 ns 1.45 ns 10 -lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 10.32 % 10.32 % 10 +std::string e = "123456789012345678901234567890"; auto c{e};_mean 36.8 ns 36.8 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_median 36.6 ns 36.6 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_stddev 2.54 ns 2.54 ns 4 +std::string e = "123456789012345678901234567890"; auto c{e};_cv 6.89 % 6.89 % 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 1.25 ns 1.25 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_median 1.25 ns 1.25 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.020 ns 0.020 ns 4 +std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.57 % 1.60 % 4 +ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.975 ns 0.975 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_median 0.975 ns 0.975 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.012 ns 0.012 ns 4 +ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.25 % 1.25 % 4 +stringa e = "123456789012345678901234567890"; auto c{e};_mean 2.24 ns 2.24 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_median 2.22 ns 2.22 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.069 ns 0.069 ns 4 +stringa e = "123456789012345678901234567890"; auto c{e};_cv 3.07 % 3.07 % 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 15.9 ns 15.9 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 15.9 ns 15.9 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.371 ns 0.371 ns 4 +lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.33 % 2.33 % 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 14.8 ns 14.8 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 14.8 ns 14.8 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.454 ns 0.454 ns 4 +lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 3.06 % 3.06 % 4 ----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find;_mean 45.3 ns 45.3 ns 10 -std::string::find;_median 44.5 ns 44.5 ns 10 -std::string::find;_stddev 1.49 ns 1.49 ns 10 -std::string::find;_cv 3.29 % 3.29 % 10 -std::string_view::find;_mean 49.9 ns 49.9 ns 10 -std::string_view::find;_median 49.8 ns 49.8 ns 10 -std::string_view::find;_stddev 1.42 ns 1.42 ns 10 -std::string_view::find;_cv 2.84 % 2.84 % 10 -ssa::find;_mean 49.3 ns 49.3 ns 10 -ssa::find;_median 49.1 ns 49.1 ns 10 -ssa::find;_stddev 0.854 ns 0.855 ns 10 -ssa::find;_cv 1.73 % 1.73 % 10 -stringa::find;_mean 51.1 ns 51.1 ns 10 -stringa::find;_median 51.3 ns 51.3 ns 10 -stringa::find;_stddev 1.20 ns 1.20 ns 10 -stringa::find;_cv 2.35 % 2.35 % 10 -lstringa<20>::find;_mean 43.8 ns 43.8 ns 10 -lstringa<20>::find;_median 43.2 ns 43.2 ns 10 -lstringa<20>::find;_stddev 1.24 ns 1.24 ns 10 -lstringa<20>::find;_cv 2.84 % 2.84 % 10 -lstringa<40>::find;_mean 43.8 ns 43.8 ns 10 -lstringa<40>::find;_median 43.7 ns 43.7 ns 10 -lstringa<40>::find;_stddev 0.555 ns 0.555 ns 10 -lstringa<40>::find;_cv 1.27 % 1.27 % 10 +std::string::find;_mean 44.9 ns 44.9 ns 4 +std::string::find;_median 44.9 ns 44.9 ns 4 +std::string::find;_stddev 0.762 ns 0.762 ns 4 +std::string::find;_cv 1.70 % 1.70 % 4 +std::string_view::find;_mean 51.6 ns 51.6 ns 4 +std::string_view::find;_median 51.5 ns 51.5 ns 4 +std::string_view::find;_stddev 1.28 ns 1.28 ns 4 +std::string_view::find;_cv 2.49 % 2.49 % 4 +ssa::find;_mean 49.0 ns 49.0 ns 4 +ssa::find;_median 48.7 ns 48.7 ns 4 +ssa::find;_stddev 0.800 ns 0.800 ns 4 +ssa::find;_cv 1.63 % 1.63 % 4 +stringa::find;_mean 51.1 ns 51.1 ns 4 +stringa::find;_median 51.1 ns 51.1 ns 4 +stringa::find;_stddev 0.781 ns 0.781 ns 4 +stringa::find;_cv 1.53 % 1.53 % 4 +lstringa<20>::find;_mean 43.9 ns 43.9 ns 4 +lstringa<20>::find;_median 43.8 ns 43.9 ns 4 +lstringa<20>::find;_stddev 1.06 ns 1.05 ns 4 +lstringa<20>::find;_cv 2.42 % 2.40 % 4 +lstringa<40>::find;_mean 44.6 ns 44.6 ns 4 +lstringa<40>::find;_median 44.5 ns 44.5 ns 4 +lstringa<40>::find;_stddev 1.12 ns 1.12 ns 4 +lstringa<40>::find;_cv 2.52 % 2.52 % 4 ------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string copy{str_with_len_N};/15_mean 34.6 ns 34.6 ns 10 -std::string copy{str_with_len_N};/15_median 33.9 ns 33.9 ns 10 -std::string copy{str_with_len_N};/15_stddev 2.22 ns 2.22 ns 10 -std::string copy{str_with_len_N};/15_cv 6.41 % 6.41 % 10 -std::string copy{str_with_len_N};/16_mean 34.9 ns 34.9 ns 10 -std::string copy{str_with_len_N};/16_median 34.8 ns 34.8 ns 10 -std::string copy{str_with_len_N};/16_stddev 1.36 ns 1.36 ns 10 -std::string copy{str_with_len_N};/16_cv 3.89 % 3.89 % 10 -std::string copy{str_with_len_N};/23_mean 36.1 ns 36.1 ns 10 -std::string copy{str_with_len_N};/23_median 36.3 ns 36.3 ns 10 -std::string copy{str_with_len_N};/23_stddev 1.30 ns 1.30 ns 10 -std::string copy{str_with_len_N};/23_cv 3.60 % 3.60 % 10 -std::string copy{str_with_len_N};/24_mean 34.4 ns 34.4 ns 10 -std::string copy{str_with_len_N};/24_median 33.8 ns 33.8 ns 10 -std::string copy{str_with_len_N};/24_stddev 1.34 ns 1.34 ns 10 -std::string copy{str_with_len_N};/24_cv 3.91 % 3.91 % 10 -std::string copy{str_with_len_N};/32_mean 37.9 ns 37.9 ns 10 -std::string copy{str_with_len_N};/32_median 38.0 ns 38.0 ns 10 -std::string copy{str_with_len_N};/32_stddev 0.886 ns 0.886 ns 10 -std::string copy{str_with_len_N};/32_cv 2.34 % 2.34 % 10 -std::string copy{str_with_len_N};/64_mean 37.7 ns 37.7 ns 10 -std::string copy{str_with_len_N};/64_median 37.9 ns 37.9 ns 10 -std::string copy{str_with_len_N};/64_stddev 1.11 ns 1.11 ns 10 -std::string copy{str_with_len_N};/64_cv 2.95 % 2.95 % 10 -std::string copy{str_with_len_N};/128_mean 39.1 ns 39.1 ns 10 -std::string copy{str_with_len_N};/128_median 38.9 ns 38.9 ns 10 -std::string copy{str_with_len_N};/128_stddev 1.39 ns 1.39 ns 10 -std::string copy{str_with_len_N};/128_cv 3.56 % 3.56 % 10 -std::string copy{str_with_len_N};/256_mean 59.2 ns 59.2 ns 10 -std::string copy{str_with_len_N};/256_median 65.5 ns 65.5 ns 10 -std::string copy{str_with_len_N};/256_stddev 12.9 ns 12.9 ns 10 -std::string copy{str_with_len_N};/256_cv 21.79 % 21.79 % 10 -std::string copy{str_with_len_N};/512_mean 55.7 ns 55.7 ns 10 -std::string copy{str_with_len_N};/512_median 54.6 ns 54.6 ns 10 -std::string copy{str_with_len_N};/512_stddev 12.4 ns 12.4 ns 10 -std::string copy{str_with_len_N};/512_cv 22.19 % 22.19 % 10 -std::string copy{str_with_len_N};/1024_mean 54.8 ns 54.8 ns 10 -std::string copy{str_with_len_N};/1024_median 54.7 ns 54.7 ns 10 -std::string copy{str_with_len_N};/1024_stddev 4.68 ns 4.68 ns 10 -std::string copy{str_with_len_N};/1024_cv 8.54 % 8.54 % 10 -std::string copy{str_with_len_N};/2048_mean 78.0 ns 78.0 ns 10 -std::string copy{str_with_len_N};/2048_median 77.7 ns 77.7 ns 10 -std::string copy{str_with_len_N};/2048_stddev 6.47 ns 6.47 ns 10 -std::string copy{str_with_len_N};/2048_cv 8.29 % 8.29 % 10 -std::string copy{str_with_len_N};/4096_mean 112 ns 112 ns 10 -std::string copy{str_with_len_N};/4096_median 118 ns 118 ns 10 -std::string copy{str_with_len_N};/4096_stddev 15.6 ns 15.6 ns 10 -std::string copy{str_with_len_N};/4096_cv 13.86 % 13.86 % 10 -stringa copy{str_with_len_N};/15_mean 2.56 ns 2.56 ns 10 -stringa copy{str_with_len_N};/15_median 2.55 ns 2.55 ns 10 -stringa copy{str_with_len_N};/15_stddev 0.080 ns 0.080 ns 10 -stringa copy{str_with_len_N};/15_cv 3.14 % 3.14 % 10 -stringa copy{str_with_len_N};/16_mean 4.87 ns 4.87 ns 10 -stringa copy{str_with_len_N};/16_median 4.84 ns 4.84 ns 10 -stringa copy{str_with_len_N};/16_stddev 0.178 ns 0.178 ns 10 -stringa copy{str_with_len_N};/16_cv 3.66 % 3.66 % 10 -stringa copy{str_with_len_N};/23_mean 4.85 ns 4.85 ns 10 -stringa copy{str_with_len_N};/23_median 4.85 ns 4.85 ns 10 -stringa copy{str_with_len_N};/23_stddev 0.071 ns 0.071 ns 10 -stringa copy{str_with_len_N};/23_cv 1.47 % 1.47 % 10 -stringa copy{str_with_len_N};/24_mean 4.91 ns 4.91 ns 10 -stringa copy{str_with_len_N};/24_median 4.85 ns 4.85 ns 10 -stringa copy{str_with_len_N};/24_stddev 0.155 ns 0.155 ns 10 -stringa copy{str_with_len_N};/24_cv 3.16 % 3.16 % 10 -stringa copy{str_with_len_N};/32_mean 4.87 ns 4.87 ns 10 -stringa copy{str_with_len_N};/32_median 4.88 ns 4.88 ns 10 -stringa copy{str_with_len_N};/32_stddev 0.128 ns 0.128 ns 10 -stringa copy{str_with_len_N};/32_cv 2.64 % 2.64 % 10 -stringa copy{str_with_len_N};/64_mean 4.81 ns 4.81 ns 10 -stringa copy{str_with_len_N};/64_median 4.78 ns 4.78 ns 10 -stringa copy{str_with_len_N};/64_stddev 0.077 ns 0.077 ns 10 -stringa copy{str_with_len_N};/64_cv 1.60 % 1.60 % 10 -stringa copy{str_with_len_N};/128_mean 4.84 ns 4.84 ns 10 -stringa copy{str_with_len_N};/128_median 4.82 ns 4.82 ns 10 -stringa copy{str_with_len_N};/128_stddev 0.092 ns 0.092 ns 10 -stringa copy{str_with_len_N};/128_cv 1.90 % 1.90 % 10 -stringa copy{str_with_len_N};/256_mean 4.87 ns 4.87 ns 10 -stringa copy{str_with_len_N};/256_median 4.88 ns 4.88 ns 10 -stringa copy{str_with_len_N};/256_stddev 0.079 ns 0.079 ns 10 -stringa copy{str_with_len_N};/256_cv 1.62 % 1.62 % 10 -stringa copy{str_with_len_N};/512_mean 4.82 ns 4.82 ns 10 -stringa copy{str_with_len_N};/512_median 4.83 ns 4.83 ns 10 -stringa copy{str_with_len_N};/512_stddev 0.073 ns 0.073 ns 10 -stringa copy{str_with_len_N};/512_cv 1.52 % 1.52 % 10 -stringa copy{str_with_len_N};/1024_mean 4.98 ns 4.98 ns 10 -stringa copy{str_with_len_N};/1024_median 5.00 ns 5.00 ns 10 -stringa copy{str_with_len_N};/1024_stddev 0.185 ns 0.185 ns 10 -stringa copy{str_with_len_N};/1024_cv 3.71 % 3.71 % 10 -stringa copy{str_with_len_N};/2048_mean 4.90 ns 4.90 ns 10 -stringa copy{str_with_len_N};/2048_median 4.90 ns 4.90 ns 10 -stringa copy{str_with_len_N};/2048_stddev 0.130 ns 0.130 ns 10 -stringa copy{str_with_len_N};/2048_cv 2.66 % 2.66 % 10 -stringa copy{str_with_len_N};/4096_mean 4.84 ns 4.84 ns 10 -stringa copy{str_with_len_N};/4096_median 4.84 ns 4.84 ns 10 -stringa copy{str_with_len_N};/4096_stddev 0.078 ns 0.078 ns 10 -stringa copy{str_with_len_N};/4096_cv 1.62 % 1.62 % 10 -lstringa<16> copy{str_with_len_N};/15_mean 14.3 ns 14.3 ns 10 -lstringa<16> copy{str_with_len_N};/15_median 14.3 ns 14.3 ns 10 -lstringa<16> copy{str_with_len_N};/15_stddev 0.383 ns 0.383 ns 10 -lstringa<16> copy{str_with_len_N};/15_cv 2.68 % 2.68 % 10 -lstringa<16> copy{str_with_len_N};/16_mean 15.0 ns 15.0 ns 10 -lstringa<16> copy{str_with_len_N};/16_median 14.8 ns 14.8 ns 10 -lstringa<16> copy{str_with_len_N};/16_stddev 1.15 ns 1.15 ns 10 -lstringa<16> copy{str_with_len_N};/16_cv 7.62 % 7.62 % 10 -lstringa<16> copy{str_with_len_N};/23_mean 28.8 ns 28.8 ns 10 -lstringa<16> copy{str_with_len_N};/23_median 28.8 ns 28.8 ns 10 -lstringa<16> copy{str_with_len_N};/23_stddev 0.914 ns 0.914 ns 10 -lstringa<16> copy{str_with_len_N};/23_cv 3.17 % 3.17 % 10 -lstringa<16> copy{str_with_len_N};/24_mean 29.8 ns 29.8 ns 10 -lstringa<16> copy{str_with_len_N};/24_median 29.7 ns 29.7 ns 10 -lstringa<16> copy{str_with_len_N};/24_stddev 1.67 ns 1.67 ns 10 -lstringa<16> copy{str_with_len_N};/24_cv 5.60 % 5.60 % 10 -lstringa<16> copy{str_with_len_N};/32_mean 31.9 ns 31.9 ns 10 -lstringa<16> copy{str_with_len_N};/32_median 32.1 ns 32.1 ns 10 -lstringa<16> copy{str_with_len_N};/32_stddev 1.10 ns 1.10 ns 10 -lstringa<16> copy{str_with_len_N};/32_cv 3.45 % 3.45 % 10 -lstringa<16> copy{str_with_len_N};/64_mean 31.3 ns 31.3 ns 10 -lstringa<16> copy{str_with_len_N};/64_median 31.2 ns 31.2 ns 10 -lstringa<16> copy{str_with_len_N};/64_stddev 1.26 ns 1.26 ns 10 -lstringa<16> copy{str_with_len_N};/64_cv 4.04 % 4.04 % 10 -lstringa<16> copy{str_with_len_N};/128_mean 32.5 ns 32.5 ns 10 -lstringa<16> copy{str_with_len_N};/128_median 32.9 ns 32.9 ns 10 -lstringa<16> copy{str_with_len_N};/128_stddev 1.25 ns 1.25 ns 10 -lstringa<16> copy{str_with_len_N};/128_cv 3.84 % 3.84 % 10 -lstringa<16> copy{str_with_len_N};/256_mean 54.6 ns 54.6 ns 10 -lstringa<16> copy{str_with_len_N};/256_median 62.2 ns 62.2 ns 10 -lstringa<16> copy{str_with_len_N};/256_stddev 13.3 ns 13.3 ns 10 -lstringa<16> copy{str_with_len_N};/256_cv 24.40 % 24.40 % 10 -lstringa<16> copy{str_with_len_N};/512_mean 51.6 ns 51.6 ns 10 -lstringa<16> copy{str_with_len_N};/512_median 51.5 ns 51.5 ns 10 -lstringa<16> copy{str_with_len_N};/512_stddev 12.7 ns 12.7 ns 10 -lstringa<16> copy{str_with_len_N};/512_cv 24.61 % 24.61 % 10 -lstringa<16> copy{str_with_len_N};/1024_mean 51.0 ns 51.0 ns 10 -lstringa<16> copy{str_with_len_N};/1024_median 50.4 ns 50.4 ns 10 -lstringa<16> copy{str_with_len_N};/1024_stddev 5.42 ns 5.42 ns 10 -lstringa<16> copy{str_with_len_N};/1024_cv 10.62 % 10.62 % 10 -lstringa<16> copy{str_with_len_N};/2048_mean 74.1 ns 74.1 ns 10 -lstringa<16> copy{str_with_len_N};/2048_median 72.6 ns 72.6 ns 10 -lstringa<16> copy{str_with_len_N};/2048_stddev 5.47 ns 5.47 ns 10 -lstringa<16> copy{str_with_len_N};/2048_cv 7.39 % 7.39 % 10 -lstringa<16> copy{str_with_len_N};/4096_mean 110 ns 110 ns 10 -lstringa<16> copy{str_with_len_N};/4096_median 118 ns 118 ns 10 -lstringa<16> copy{str_with_len_N};/4096_stddev 18.3 ns 18.3 ns 10 -lstringa<16> copy{str_with_len_N};/4096_cv 16.65 % 16.65 % 10 -lstringa<512> copy{str_with_len_N};/15_mean 14.4 ns 14.4 ns 10 -lstringa<512> copy{str_with_len_N};/15_median 14.3 ns 14.3 ns 10 -lstringa<512> copy{str_with_len_N};/15_stddev 0.718 ns 0.718 ns 10 -lstringa<512> copy{str_with_len_N};/15_cv 4.97 % 4.97 % 10 -lstringa<512> copy{str_with_len_N};/16_mean 14.2 ns 14.2 ns 10 -lstringa<512> copy{str_with_len_N};/16_median 14.0 ns 14.0 ns 10 -lstringa<512> copy{str_with_len_N};/16_stddev 0.764 ns 0.764 ns 10 -lstringa<512> copy{str_with_len_N};/16_cv 5.40 % 5.40 % 10 -lstringa<512> copy{str_with_len_N};/23_mean 14.0 ns 14.0 ns 10 -lstringa<512> copy{str_with_len_N};/23_median 13.9 ns 13.9 ns 10 -lstringa<512> copy{str_with_len_N};/23_stddev 0.592 ns 0.592 ns 10 -lstringa<512> copy{str_with_len_N};/23_cv 4.24 % 4.24 % 10 -lstringa<512> copy{str_with_len_N};/24_mean 14.2 ns 14.2 ns 10 -lstringa<512> copy{str_with_len_N};/24_median 14.1 ns 14.1 ns 10 -lstringa<512> copy{str_with_len_N};/24_stddev 0.767 ns 0.767 ns 10 -lstringa<512> copy{str_with_len_N};/24_cv 5.41 % 5.41 % 10 -lstringa<512> copy{str_with_len_N};/32_mean 17.8 ns 17.8 ns 10 -lstringa<512> copy{str_with_len_N};/32_median 17.7 ns 17.7 ns 10 -lstringa<512> copy{str_with_len_N};/32_stddev 1.14 ns 1.14 ns 10 -lstringa<512> copy{str_with_len_N};/32_cv 6.39 % 6.39 % 10 -lstringa<512> copy{str_with_len_N};/64_mean 17.4 ns 17.4 ns 10 -lstringa<512> copy{str_with_len_N};/64_median 17.4 ns 17.4 ns 10 -lstringa<512> copy{str_with_len_N};/64_stddev 0.526 ns 0.526 ns 10 -lstringa<512> copy{str_with_len_N};/64_cv 3.03 % 3.03 % 10 -lstringa<512> copy{str_with_len_N};/128_mean 17.6 ns 17.6 ns 10 -lstringa<512> copy{str_with_len_N};/128_median 17.5 ns 17.5 ns 10 -lstringa<512> copy{str_with_len_N};/128_stddev 0.582 ns 0.582 ns 10 -lstringa<512> copy{str_with_len_N};/128_cv 3.30 % 3.30 % 10 -lstringa<512> copy{str_with_len_N};/256_mean 19.4 ns 19.4 ns 10 -lstringa<512> copy{str_with_len_N};/256_median 19.2 ns 19.2 ns 10 -lstringa<512> copy{str_with_len_N};/256_stddev 0.740 ns 0.740 ns 10 -lstringa<512> copy{str_with_len_N};/256_cv 3.82 % 3.82 % 10 -lstringa<512> copy{str_with_len_N};/512_mean 21.6 ns 21.6 ns 10 -lstringa<512> copy{str_with_len_N};/512_median 21.6 ns 21.6 ns 10 -lstringa<512> copy{str_with_len_N};/512_stddev 0.553 ns 0.553 ns 10 -lstringa<512> copy{str_with_len_N};/512_cv 2.56 % 2.56 % 10 -lstringa<512> copy{str_with_len_N};/1024_mean 52.8 ns 52.8 ns 10 -lstringa<512> copy{str_with_len_N};/1024_median 53.5 ns 53.5 ns 10 -lstringa<512> copy{str_with_len_N};/1024_stddev 3.77 ns 3.77 ns 10 -lstringa<512> copy{str_with_len_N};/1024_cv 7.13 % 7.13 % 10 -lstringa<512> copy{str_with_len_N};/2048_mean 74.7 ns 74.7 ns 10 -lstringa<512> copy{str_with_len_N};/2048_median 72.3 ns 72.3 ns 10 -lstringa<512> copy{str_with_len_N};/2048_stddev 8.28 ns 8.28 ns 10 -lstringa<512> copy{str_with_len_N};/2048_cv 11.08 % 11.08 % 10 -lstringa<512> copy{str_with_len_N};/4096_mean 111 ns 111 ns 10 -lstringa<512> copy{str_with_len_N};/4096_median 120 ns 120 ns 10 -lstringa<512> copy{str_with_len_N};/4096_stddev 19.0 ns 19.0 ns 10 -lstringa<512> copy{str_with_len_N};/4096_cv 17.15 % 17.15 % 10 +std::string copy{str_with_len_N};/15_mean 35.7 ns 35.7 ns 4 +std::string copy{str_with_len_N};/15_median 35.6 ns 35.6 ns 4 +std::string copy{str_with_len_N};/15_stddev 1.49 ns 1.49 ns 4 +std::string copy{str_with_len_N};/15_cv 4.17 % 4.17 % 4 +std::string copy{str_with_len_N};/16_mean 35.9 ns 35.9 ns 4 +std::string copy{str_with_len_N};/16_median 35.7 ns 35.7 ns 4 +std::string copy{str_with_len_N};/16_stddev 0.839 ns 0.839 ns 4 +std::string copy{str_with_len_N};/16_cv 2.34 % 2.34 % 4 +std::string copy{str_with_len_N};/23_mean 36.3 ns 36.3 ns 4 +std::string copy{str_with_len_N};/23_median 36.3 ns 36.3 ns 4 +std::string copy{str_with_len_N};/23_stddev 1.18 ns 1.18 ns 4 +std::string copy{str_with_len_N};/23_cv 3.26 % 3.26 % 4 +std::string copy{str_with_len_N};/24_mean 37.4 ns 37.4 ns 4 +std::string copy{str_with_len_N};/24_median 37.4 ns 37.4 ns 4 +std::string copy{str_with_len_N};/24_stddev 2.12 ns 2.12 ns 4 +std::string copy{str_with_len_N};/24_cv 5.66 % 5.66 % 4 +std::string copy{str_with_len_N};/32_mean 41.8 ns 41.8 ns 4 +std::string copy{str_with_len_N};/32_median 42.2 ns 42.2 ns 4 +std::string copy{str_with_len_N};/32_stddev 1.32 ns 1.32 ns 4 +std::string copy{str_with_len_N};/32_cv 3.15 % 3.15 % 4 +std::string copy{str_with_len_N};/64_mean 40.9 ns 40.9 ns 4 +std::string copy{str_with_len_N};/64_median 41.0 ns 41.0 ns 4 +std::string copy{str_with_len_N};/64_stddev 1.54 ns 1.54 ns 4 +std::string copy{str_with_len_N};/64_cv 3.77 % 3.77 % 4 +std::string copy{str_with_len_N};/128_mean 43.9 ns 43.9 ns 4 +std::string copy{str_with_len_N};/128_median 44.0 ns 44.0 ns 4 +std::string copy{str_with_len_N};/128_stddev 1.55 ns 1.55 ns 4 +std::string copy{str_with_len_N};/128_cv 3.53 % 3.53 % 4 +std::string copy{str_with_len_N};/256_mean 53.7 ns 53.7 ns 4 +std::string copy{str_with_len_N};/256_median 48.1 ns 48.1 ns 4 +std::string copy{str_with_len_N};/256_stddev 11.6 ns 11.6 ns 4 +std::string copy{str_with_len_N};/256_cv 21.59 % 21.59 % 4 +std::string copy{str_with_len_N};/512_mean 50.9 ns 50.9 ns 4 +std::string copy{str_with_len_N};/512_median 50.3 ns 50.3 ns 4 +std::string copy{str_with_len_N};/512_stddev 2.22 ns 2.22 ns 4 +std::string copy{str_with_len_N};/512_cv 4.36 % 4.36 % 4 +std::string copy{str_with_len_N};/1024_mean 58.1 ns 58.1 ns 4 +std::string copy{str_with_len_N};/1024_median 57.0 ns 57.0 ns 4 +std::string copy{str_with_len_N};/1024_stddev 3.32 ns 3.32 ns 4 +std::string copy{str_with_len_N};/1024_cv 5.72 % 5.72 % 4 +std::string copy{str_with_len_N};/2048_mean 83.5 ns 83.5 ns 4 +std::string copy{str_with_len_N};/2048_median 83.9 ns 83.9 ns 4 +std::string copy{str_with_len_N};/2048_stddev 4.41 ns 4.41 ns 4 +std::string copy{str_with_len_N};/2048_cv 5.28 % 5.28 % 4 +std::string copy{str_with_len_N};/4096_mean 126 ns 126 ns 4 +std::string copy{str_with_len_N};/4096_median 126 ns 126 ns 4 +std::string copy{str_with_len_N};/4096_stddev 2.21 ns 2.21 ns 4 +std::string copy{str_with_len_N};/4096_cv 1.75 % 1.75 % 4 +stringa copy{str_with_len_N};/15_mean 2.57 ns 2.57 ns 4 +stringa copy{str_with_len_N};/15_median 2.55 ns 2.55 ns 4 +stringa copy{str_with_len_N};/15_stddev 0.056 ns 0.056 ns 4 +stringa copy{str_with_len_N};/15_cv 2.19 % 2.19 % 4 +stringa copy{str_with_len_N};/16_mean 4.88 ns 4.88 ns 4 +stringa copy{str_with_len_N};/16_median 4.88 ns 4.88 ns 4 +stringa copy{str_with_len_N};/16_stddev 0.131 ns 0.131 ns 4 +stringa copy{str_with_len_N};/16_cv 2.68 % 2.68 % 4 +stringa copy{str_with_len_N};/23_mean 4.85 ns 4.85 ns 4 +stringa copy{str_with_len_N};/23_median 4.82 ns 4.82 ns 4 +stringa copy{str_with_len_N};/23_stddev 0.130 ns 0.130 ns 4 +stringa copy{str_with_len_N};/23_cv 2.69 % 2.69 % 4 +stringa copy{str_with_len_N};/24_mean 4.88 ns 4.88 ns 4 +stringa copy{str_with_len_N};/24_median 4.90 ns 4.90 ns 4 +stringa copy{str_with_len_N};/24_stddev 0.083 ns 0.083 ns 4 +stringa copy{str_with_len_N};/24_cv 1.70 % 1.70 % 4 +stringa copy{str_with_len_N};/32_mean 4.97 ns 4.97 ns 4 +stringa copy{str_with_len_N};/32_median 4.97 ns 4.97 ns 4 +stringa copy{str_with_len_N};/32_stddev 0.060 ns 0.060 ns 4 +stringa copy{str_with_len_N};/32_cv 1.20 % 1.20 % 4 +stringa copy{str_with_len_N};/64_mean 4.98 ns 4.98 ns 4 +stringa copy{str_with_len_N};/64_median 4.97 ns 4.97 ns 4 +stringa copy{str_with_len_N};/64_stddev 0.051 ns 0.051 ns 4 +stringa copy{str_with_len_N};/64_cv 1.02 % 1.02 % 4 +stringa copy{str_with_len_N};/128_mean 4.88 ns 4.88 ns 4 +stringa copy{str_with_len_N};/128_median 4.89 ns 4.89 ns 4 +stringa copy{str_with_len_N};/128_stddev 0.094 ns 0.094 ns 4 +stringa copy{str_with_len_N};/128_cv 1.93 % 1.93 % 4 +stringa copy{str_with_len_N};/256_mean 4.84 ns 4.84 ns 4 +stringa copy{str_with_len_N};/256_median 4.85 ns 4.85 ns 4 +stringa copy{str_with_len_N};/256_stddev 0.054 ns 0.054 ns 4 +stringa copy{str_with_len_N};/256_cv 1.11 % 1.11 % 4 +stringa copy{str_with_len_N};/512_mean 4.82 ns 4.82 ns 4 +stringa copy{str_with_len_N};/512_median 4.82 ns 4.82 ns 4 +stringa copy{str_with_len_N};/512_stddev 0.069 ns 0.069 ns 4 +stringa copy{str_with_len_N};/512_cv 1.44 % 1.44 % 4 +stringa copy{str_with_len_N};/1024_mean 4.85 ns 4.85 ns 4 +stringa copy{str_with_len_N};/1024_median 4.86 ns 4.86 ns 4 +stringa copy{str_with_len_N};/1024_stddev 0.078 ns 0.078 ns 4 +stringa copy{str_with_len_N};/1024_cv 1.60 % 1.60 % 4 +stringa copy{str_with_len_N};/2048_mean 4.85 ns 4.85 ns 4 +stringa copy{str_with_len_N};/2048_median 4.84 ns 4.84 ns 4 +stringa copy{str_with_len_N};/2048_stddev 0.071 ns 0.071 ns 4 +stringa copy{str_with_len_N};/2048_cv 1.47 % 1.47 % 4 +stringa copy{str_with_len_N};/4096_mean 4.80 ns 4.80 ns 4 +stringa copy{str_with_len_N};/4096_median 4.79 ns 4.79 ns 4 +stringa copy{str_with_len_N};/4096_stddev 0.059 ns 0.059 ns 4 +stringa copy{str_with_len_N};/4096_cv 1.23 % 1.23 % 4 +lstringa<16> copy{str_with_len_N};/15_mean 14.3 ns 14.3 ns 4 +lstringa<16> copy{str_with_len_N};/15_median 14.1 ns 14.1 ns 4 +lstringa<16> copy{str_with_len_N};/15_stddev 0.543 ns 0.543 ns 4 +lstringa<16> copy{str_with_len_N};/15_cv 3.80 % 3.80 % 4 +lstringa<16> copy{str_with_len_N};/16_mean 14.7 ns 14.7 ns 4 +lstringa<16> copy{str_with_len_N};/16_median 14.7 ns 14.7 ns 4 +lstringa<16> copy{str_with_len_N};/16_stddev 0.980 ns 0.980 ns 4 +lstringa<16> copy{str_with_len_N};/16_cv 6.66 % 6.66 % 4 +lstringa<16> copy{str_with_len_N};/23_mean 29.7 ns 29.7 ns 4 +lstringa<16> copy{str_with_len_N};/23_median 29.2 ns 29.2 ns 4 +lstringa<16> copy{str_with_len_N};/23_stddev 1.70 ns 1.70 ns 4 +lstringa<16> copy{str_with_len_N};/23_cv 5.71 % 5.71 % 4 +lstringa<16> copy{str_with_len_N};/24_mean 29.6 ns 29.6 ns 4 +lstringa<16> copy{str_with_len_N};/24_median 29.6 ns 29.6 ns 4 +lstringa<16> copy{str_with_len_N};/24_stddev 1.16 ns 1.16 ns 4 +lstringa<16> copy{str_with_len_N};/24_cv 3.92 % 3.92 % 4 +lstringa<16> copy{str_with_len_N};/32_mean 32.2 ns 32.2 ns 4 +lstringa<16> copy{str_with_len_N};/32_median 32.0 ns 32.0 ns 4 +lstringa<16> copy{str_with_len_N};/32_stddev 1.53 ns 1.53 ns 4 +lstringa<16> copy{str_with_len_N};/32_cv 4.76 % 4.76 % 4 +lstringa<16> copy{str_with_len_N};/64_mean 34.5 ns 34.5 ns 4 +lstringa<16> copy{str_with_len_N};/64_median 33.1 ns 33.1 ns 4 +lstringa<16> copy{str_with_len_N};/64_stddev 3.54 ns 3.54 ns 4 +lstringa<16> copy{str_with_len_N};/64_cv 10.28 % 10.28 % 4 +lstringa<16> copy{str_with_len_N};/128_mean 34.3 ns 34.3 ns 4 +lstringa<16> copy{str_with_len_N};/128_median 33.6 ns 33.6 ns 4 +lstringa<16> copy{str_with_len_N};/128_stddev 3.05 ns 3.05 ns 4 +lstringa<16> copy{str_with_len_N};/128_cv 8.90 % 8.90 % 4 +lstringa<16> copy{str_with_len_N};/256_mean 48.1 ns 48.1 ns 4 +lstringa<16> copy{str_with_len_N};/256_median 45.6 ns 45.6 ns 4 +lstringa<16> copy{str_with_len_N};/256_stddev 10.0 ns 10.0 ns 4 +lstringa<16> copy{str_with_len_N};/256_cv 20.88 % 20.88 % 4 +lstringa<16> copy{str_with_len_N};/512_mean 47.2 ns 47.2 ns 4 +lstringa<16> copy{str_with_len_N};/512_median 47.9 ns 47.9 ns 4 +lstringa<16> copy{str_with_len_N};/512_stddev 2.80 ns 2.80 ns 4 +lstringa<16> copy{str_with_len_N};/512_cv 5.94 % 5.94 % 4 +lstringa<16> copy{str_with_len_N};/1024_mean 53.7 ns 53.7 ns 4 +lstringa<16> copy{str_with_len_N};/1024_median 53.9 ns 53.9 ns 4 +lstringa<16> copy{str_with_len_N};/1024_stddev 2.38 ns 2.38 ns 4 +lstringa<16> copy{str_with_len_N};/1024_cv 4.42 % 4.42 % 4 +lstringa<16> copy{str_with_len_N};/2048_mean 79.5 ns 79.5 ns 4 +lstringa<16> copy{str_with_len_N};/2048_median 81.1 ns 81.1 ns 4 +lstringa<16> copy{str_with_len_N};/2048_stddev 4.94 ns 4.94 ns 4 +lstringa<16> copy{str_with_len_N};/2048_cv 6.22 % 6.22 % 4 +lstringa<16> copy{str_with_len_N};/4096_mean 123 ns 123 ns 4 +lstringa<16> copy{str_with_len_N};/4096_median 124 ns 124 ns 4 +lstringa<16> copy{str_with_len_N};/4096_stddev 6.50 ns 6.50 ns 4 +lstringa<16> copy{str_with_len_N};/4096_cv 5.30 % 5.30 % 4 +lstringa<512> copy{str_with_len_N};/15_mean 14.8 ns 14.8 ns 4 +lstringa<512> copy{str_with_len_N};/15_median 14.7 ns 14.7 ns 4 +lstringa<512> copy{str_with_len_N};/15_stddev 0.742 ns 0.742 ns 4 +lstringa<512> copy{str_with_len_N};/15_cv 5.01 % 5.01 % 4 +lstringa<512> copy{str_with_len_N};/16_mean 15.7 ns 15.7 ns 4 +lstringa<512> copy{str_with_len_N};/16_median 15.7 ns 15.7 ns 4 +lstringa<512> copy{str_with_len_N};/16_stddev 0.708 ns 0.708 ns 4 +lstringa<512> copy{str_with_len_N};/16_cv 4.51 % 4.51 % 4 +lstringa<512> copy{str_with_len_N};/23_mean 15.3 ns 15.3 ns 4 +lstringa<512> copy{str_with_len_N};/23_median 15.0 ns 15.0 ns 4 +lstringa<512> copy{str_with_len_N};/23_stddev 0.749 ns 0.749 ns 4 +lstringa<512> copy{str_with_len_N};/23_cv 4.91 % 4.91 % 4 +lstringa<512> copy{str_with_len_N};/24_mean 15.2 ns 15.2 ns 4 +lstringa<512> copy{str_with_len_N};/24_median 15.3 ns 15.3 ns 4 +lstringa<512> copy{str_with_len_N};/24_stddev 1.15 ns 1.15 ns 4 +lstringa<512> copy{str_with_len_N};/24_cv 7.54 % 7.54 % 4 +lstringa<512> copy{str_with_len_N};/32_mean 18.3 ns 18.3 ns 4 +lstringa<512> copy{str_with_len_N};/32_median 18.5 ns 18.5 ns 4 +lstringa<512> copy{str_with_len_N};/32_stddev 0.581 ns 0.566 ns 4 +lstringa<512> copy{str_with_len_N};/32_cv 3.17 % 3.09 % 4 +lstringa<512> copy{str_with_len_N};/64_mean 18.2 ns 18.2 ns 4 +lstringa<512> copy{str_with_len_N};/64_median 17.7 ns 17.7 ns 4 +lstringa<512> copy{str_with_len_N};/64_stddev 1.53 ns 1.53 ns 4 +lstringa<512> copy{str_with_len_N};/64_cv 8.39 % 8.39 % 4 +lstringa<512> copy{str_with_len_N};/128_mean 19.2 ns 19.2 ns 4 +lstringa<512> copy{str_with_len_N};/128_median 18.5 ns 18.5 ns 4 +lstringa<512> copy{str_with_len_N};/128_stddev 1.98 ns 1.97 ns 4 +lstringa<512> copy{str_with_len_N};/128_cv 10.30 % 10.26 % 4 +lstringa<512> copy{str_with_len_N};/256_mean 19.6 ns 19.6 ns 4 +lstringa<512> copy{str_with_len_N};/256_median 19.8 ns 19.8 ns 4 +lstringa<512> copy{str_with_len_N};/256_stddev 0.928 ns 0.928 ns 4 +lstringa<512> copy{str_with_len_N};/256_cv 4.74 % 4.74 % 4 +lstringa<512> copy{str_with_len_N};/512_mean 22.9 ns 22.9 ns 4 +lstringa<512> copy{str_with_len_N};/512_median 23.1 ns 23.1 ns 4 +lstringa<512> copy{str_with_len_N};/512_stddev 1.17 ns 1.17 ns 4 +lstringa<512> copy{str_with_len_N};/512_cv 5.12 % 5.12 % 4 +lstringa<512> copy{str_with_len_N};/1024_mean 57.1 ns 57.1 ns 4 +lstringa<512> copy{str_with_len_N};/1024_median 56.8 ns 56.8 ns 4 +lstringa<512> copy{str_with_len_N};/1024_stddev 3.27 ns 3.27 ns 4 +lstringa<512> copy{str_with_len_N};/1024_cv 5.73 % 5.73 % 4 +lstringa<512> copy{str_with_len_N};/2048_mean 79.9 ns 79.9 ns 4 +lstringa<512> copy{str_with_len_N};/2048_median 80.3 ns 80.3 ns 4 +lstringa<512> copy{str_with_len_N};/2048_stddev 4.01 ns 4.01 ns 4 +lstringa<512> copy{str_with_len_N};/2048_cv 5.02 % 5.02 % 4 +lstringa<512> copy{str_with_len_N};/4096_mean 123 ns 123 ns 4 +lstringa<512> copy{str_with_len_N};/4096_median 124 ns 124 ns 4 +lstringa<512> copy{str_with_len_N};/4096_stddev 4.11 ns 4.11 ns 4 +lstringa<512> copy{str_with_len_N};/4096_cv 3.34 % 3.34 % 4 ----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 70.3 ns 70.3 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 70.4 ns 70.4 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 2.09 ns 2.09 ns 10 -std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.97 % 2.97 % 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 27.4 ns 27.4 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 27.1 ns 27.1 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.829 ns 0.829 ns 10 -std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 3.03 % 3.03 % 10 -stringa s = "123456789"; int res = s.to_int_mean 18.8 ns 18.8 ns 10 -stringa s = "123456789"; int res = s.to_int_median 18.7 ns 18.7 ns 10 -stringa s = "123456789"; int res = s.to_int_stddev 0.495 ns 0.495 ns 10 -stringa s = "123456789"; int res = s.to_int_cv 2.64 % 2.64 % 10 -ssa s = "123456789"; int res = s.to_int_mean 16.9 ns 16.9 ns 10 -ssa s = "123456789"; int res = s.to_int_median 16.9 ns 16.9 ns 10 -ssa s = "123456789"; int res = s.to_int_stddev 0.239 ns 0.239 ns 10 -ssa s = "123456789"; int res = s.to_int_cv 1.42 % 1.42 % 10 -lstringa<20> s = "123456789"; int res = s.to_int_mean 16.7 ns 16.7 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_median 16.7 ns 16.7 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.321 ns 0.321 ns 10 -lstringa<20> s = "123456789"; int res = s.to_int_cv 1.92 % 1.92 % 10 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 71.7 ns 71.7 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 71.9 ns 71.9 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 1.71 ns 1.71 ns 4 +std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.39 % 2.39 % 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 27.1 ns 27.1 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 27.1 ns 27.1 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.311 ns 0.311 ns 4 +std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 1.15 % 1.15 % 4 +stringa s = "123456789"; int res = s.to_int_mean 18.7 ns 18.7 ns 4 +stringa s = "123456789"; int res = s.to_int_median 18.7 ns 18.7 ns 4 +stringa s = "123456789"; int res = s.to_int_stddev 0.374 ns 0.374 ns 4 +stringa s = "123456789"; int res = s.to_int_cv 2.00 % 2.00 % 4 +ssa s = "123456789"; int res = s.to_int_mean 17.0 ns 17.0 ns 4 +ssa s = "123456789"; int res = s.to_int_median 16.7 ns 16.7 ns 4 +ssa s = "123456789"; int res = s.to_int_stddev 0.591 ns 0.591 ns 4 +ssa s = "123456789"; int res = s.to_int_cv 3.48 % 3.48 % 4 +lstringa<20> s = "123456789"; int res = s.to_int_mean 16.9 ns 16.9 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_median 16.7 ns 16.7 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.529 ns 0.529 ns 4 +lstringa<20> s = "123456789"; int res = s.to_int_cv 3.14 % 3.14 % 4 ----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 54.8 ns 54.8 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 54.3 ns 54.3 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 1.11 ns 1.11 ns 10 -std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.03 % 2.03 % 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 28.7 ns 28.7 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 28.7 ns 28.7 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.874 ns 0.874 ns 10 -std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 3.04 % 3.04 % 10 -stringa s = "abcDef"; int res = s.to_int_mean 17.4 ns 17.4 ns 10 -stringa s = "abcDef"; int res = s.to_int_median 17.3 ns 17.3 ns 10 -stringa s = "abcDef"; int res = s.to_int_stddev 0.332 ns 0.332 ns 10 -stringa s = "abcDef"; int res = s.to_int_cv 1.91 % 1.91 % 10 -ssa s = "abcDef"; int res = s.to_int_mean 16.0 ns 16.0 ns 10 -ssa s = "abcDef"; int res = s.to_int_median 16.0 ns 16.0 ns 10 -ssa s = "abcDef"; int res = s.to_int_stddev 0.275 ns 0.275 ns 10 -ssa s = "abcDef"; int res = s.to_int_cv 1.72 % 1.72 % 10 -lstringa<20> s = "abcDef"; int res = s.to_int_mean 16.2 ns 16.2 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_median 16.1 ns 16.1 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.390 ns 0.390 ns 10 -lstringa<20> s = "abcDef"; int res = s.to_int_cv 2.41 % 2.41 % 10 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 54.3 ns 54.3 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 54.5 ns 54.5 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.768 ns 0.768 ns 4 +std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 1.42 % 1.42 % 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 28.7 ns 28.7 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 28.7 ns 28.7 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.768 ns 0.768 ns 4 +std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 2.68 % 2.68 % 4 +stringa s = "abcDef"; int res = s.to_int_mean 17.7 ns 17.7 ns 4 +stringa s = "abcDef"; int res = s.to_int_median 17.7 ns 17.7 ns 4 +stringa s = "abcDef"; int res = s.to_int_stddev 0.613 ns 0.613 ns 4 +stringa s = "abcDef"; int res = s.to_int_cv 3.46 % 3.46 % 4 +ssa s = "abcDef"; int res = s.to_int_mean 16.0 ns 16.0 ns 4 +ssa s = "abcDef"; int res = s.to_int_median 16.0 ns 16.0 ns 4 +ssa s = "abcDef"; int res = s.to_int_stddev 0.157 ns 0.157 ns 4 +ssa s = "abcDef"; int res = s.to_int_cv 0.98 % 0.98 % 4 +lstringa<20> s = "abcDef"; int res = s.to_int_mean 16.0 ns 16.0 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_median 15.9 ns 15.9 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.261 ns 0.261 ns 4 +lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.63 % 1.63 % 4 ----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 77.9 ns 77.9 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 76.7 ns 76.7 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 3.26 ns 3.26 ns 10 -std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 4.18 % 4.18 % 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 24.1 ns 24.1 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 24.0 ns 24.0 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.358 ns 0.358 ns 10 -stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 1.49 % 1.49 % 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 23.2 ns 23.2 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 22.7 ns 22.7 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 1.10 ns 1.10 ns 10 -ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 4.71 % 4.71 % 10 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 81.3 ns 81.3 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 79.5 ns 79.5 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 6.70 ns 6.70 ns 4 +std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 8.24 % 8.24 % 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 24.5 ns 24.5 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 24.6 ns 24.6 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 1.10 ns 1.10 ns 4 +stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 4.51 % 4.51 % 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 23.2 ns 23.2 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 22.6 ns 22.6 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 1.13 ns 1.13 ns 4 +ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 4.88 % 4.88 % 4 ----- Convert to double '1234.567e10' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 198 ns 198 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 196 ns 196 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 6.87 ns 6.87 ns 10 -std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 3.47 % 3.47 % 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 107 ns 107 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 106 ns 106 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 2.55 ns 2.55 ns 10 -std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.37 % 2.37 % 10 -ssa s = "1234.567e10"; double res = *s.to_double()_mean 43.0 ns 43.0 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_median 42.5 ns 42.5 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_stddev 1.94 ns 1.94 ns 10 -ssa s = "1234.567e10"; double res = *s.to_double()_cv 4.50 % 4.50 % 10 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 197 ns 197 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 194 ns 194 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 9.55 ns 9.55 ns 4 +std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 4.85 % 4.85 % 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 107 ns 107 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 107 ns 107 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 1.93 ns 1.93 ns 4 +std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.81 % 1.81 % 4 +ssa s = "1234.567e10"; double res = *s.to_double()_mean 42.3 ns 42.3 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_median 42.0 ns 42.0 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.944 ns 0.944 ns 4 +ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.23 % 2.23 % 4 -- Append const literal of 16 bytes 64 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << "abbaabbaabbaabba";_mean 4315 ns 4315 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_median 4214 ns 4214 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 286 ns 286 ns 10 -std::stringstream str; ... str << "abbaabbaabbaabba";_cv 6.64 % 6.64 % 10 -std::string str; ... str += "abbaabbaabbaabba";_mean 608 ns 608 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_median 616 ns 616 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_stddev 39.0 ns 39.0 ns 10 -std::string str; ... str += "abbaabbaabbaabba";_cv 6.42 % 6.42 % 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 727 ns 727 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_median 716 ns 716 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 26.7 ns 26.7 ns 10 -lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 3.67 % 3.67 % 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 564 ns 564 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_median 575 ns 575 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 26.0 ns 26.0 ns 10 -lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 4.61 % 4.61 % 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 466 ns 466 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_median 470 ns 470 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 16.7 ns 16.7 ns 10 -lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 3.59 % 3.59 % 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 391 ns 391 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 390 ns 390 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 4.49 ns 4.49 ns 10 -lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.15 % 1.15 % 10 +std::stringstream str; ... str << "abbaabbaabbaabba";_mean 4356 ns 4356 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_median 4372 ns 4372 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 80.7 ns 80.7 ns 4 +std::stringstream str; ... str << "abbaabbaabbaabba";_cv 1.85 % 1.85 % 4 +std::string str; ... str += "abbaabbaabbaabba";_mean 595 ns 595 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_median 598 ns 598 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_stddev 8.25 ns 8.25 ns 4 +std::string str; ... str += "abbaabbaabbaabba";_cv 1.39 % 1.39 % 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 741 ns 741 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_median 743 ns 743 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 12.1 ns 12.1 ns 4 +lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 1.64 % 1.64 % 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 571 ns 571 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_median 568 ns 568 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 10.6 ns 10.6 ns 4 +lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 1.86 % 1.86 % 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 464 ns 464 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_median 463 ns 463 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 13.8 ns 13.8 ns 4 +lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 2.98 % 2.98 % 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 396 ns 396 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 397 ns 397 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 4.18 ns 4.18 ns 4 +lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.06 % 1.06 % 4 -- Append string of 16 bytes and const literal of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 4263 ns 4263 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 4251 ns 4251 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 123 ns 123 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.88 % 2.88 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1852 ns 1852 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1868 ns 1868 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 65.3 ns 65.3 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 3.53 % 3.53 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 801 ns 801 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 794 ns 794 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 35.1 ns 35.1 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.38 % 4.38 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 707 ns 707 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 706 ns 706 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 35.5 ns 35.5 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.01 % 5.01 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 609 ns 609 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 601 ns 601 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 47.6 ns 47.6 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 7.81 % 7.81 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 530 ns 530 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 530 ns 530 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 23.9 ns 23.9 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.51 % 4.51 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_mean 4443 ns 4443 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 4455 ns 4455 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 98.6 ns 98.6 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.22 % 2.22 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1968 ns 1968 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1969 ns 1969 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 54.7 ns 54.7 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 2.78 % 2.78 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 921 ns 921 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 934 ns 934 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 43.3 ns 43.3 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.70 % 4.70 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 694 ns 694 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 671 ns 671 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 80.4 ns 80.4 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 11.59 % 11.59 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 656 ns 656 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 651 ns 651 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 78.9 ns 78.9 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 12.04 % 12.04 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 543 ns 543 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 541 ns 541 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 33.4 ns 33.4 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 6.16 % 6.16 % 4 -- Append string of 16 bytes and const literal of 16 bytes 2048 times, 65536 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 223824 ns 223824 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 224385 ns 224385 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 9144 ns 9144 ns 10 -std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 4.09 % 4.09 % 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 107632 ns 107632 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 108000 ns 108000 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 3975 ns 3975 ns 10 -std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.69 % 3.69 % 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 40520 ns 40520 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 40257 ns 40257 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 682 ns 682 ns 10 -lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.68 % 1.68 % 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 37619 ns 37619 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 37456 ns 37456 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1537 ns 1537 ns 10 -lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.09 % 4.09 % 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 36261 ns 36261 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 36226 ns 36226 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 979 ns 979 ns 10 -lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.70 % 2.70 % 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 37537 ns 37542 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 37109 ns 37135 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1440 ns 1439 ns 10 -lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.84 % 3.83 % 10 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_mean 223755 ns 223755 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 224389 ns 224389 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 3498 ns 3498 ns 4 +std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 1.56 % 1.56 % 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 106717 ns 106717 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 106313 ns 106313 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 3516 ns 3516 ns 4 +std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.29 % 3.29 % 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 40706 ns 40706 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 40797 ns 40797 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1694 ns 1694 ns 4 +lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.16 % 4.16 % 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 39893 ns 39893 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 40571 ns 40571 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2253 ns 2253 ns 4 +lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.65 % 5.65 % 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 39281 ns 39281 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 39334 ns 39334 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1299 ns 1299 ns 4 +lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.31 % 3.31 % 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 39556 ns 39556 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 39444 ns 39444 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 682 ns 682 ns 4 +lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.72 % 1.72 % 4 -- Append 2 string of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; ... str << str_var1 << str_var2;_mean 4561 ns 4561 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_median 4509 ns 4509 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_stddev 415 ns 415 ns 10 -std::stringstream str; ... str << str_var1 << str_var2;_cv 9.11 % 9.11 % 10 -std::string str; ... str += str_var1 + str_var2;_mean 2331 ns 2331 ns 10 -std::string str; ... str += str_var1 + str_var2;_median 2327 ns 2327 ns 10 -std::string str; ... str += str_var1 + str_var2;_stddev 84.1 ns 84.1 ns 10 -std::string str; ... str += str_var1 + str_var2;_cv 3.61 % 3.61 % 10 -lstringa<16> str; ... str += str_var1 + str_var2;_mean 1151 ns 1151 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_median 1137 ns 1137 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_stddev 48.6 ns 48.7 ns 10 -lstringa<16> str; ... str += str_var1 + str_var2;_cv 4.22 % 4.23 % 10 -lstringa<128> str; ... str += str_var1 + str_var2;_mean 1032 ns 1032 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_median 1026 ns 1026 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_stddev 37.0 ns 37.0 ns 10 -lstringa<128> str; ... str += str_var1 + str_var2;_cv 3.58 % 3.58 % 10 -lstringa<512> str; ... str += str_var1 + str_var2;_mean 908 ns 908 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_median 907 ns 907 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_stddev 33.0 ns 33.0 ns 10 -lstringa<512> str; ... str += str_var1 + str_var2;_cv 3.63 % 3.63 % 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_mean 848 ns 848 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_median 838 ns 838 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 31.1 ns 31.1 ns 10 -lstringa<1024> str; ... str += str_var1 + str_var2;_cv 3.67 % 3.67 % 10 +std::stringstream str; ... str << str_var1 << str_var2;_mean 4753 ns 4753 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_median 4650 ns 4650 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_stddev 325 ns 325 ns 4 +std::stringstream str; ... str << str_var1 << str_var2;_cv 6.83 % 6.83 % 4 +std::string str; ... str += str_var1 + str_var2;_mean 2557 ns 2557 ns 4 +std::string str; ... str += str_var1 + str_var2;_median 2555 ns 2555 ns 4 +std::string str; ... str += str_var1 + str_var2;_stddev 64.5 ns 64.5 ns 4 +std::string str; ... str += str_var1 + str_var2;_cv 2.52 % 2.52 % 4 +lstringa<16> str; ... str += str_var1 + str_var2;_mean 1248 ns 1248 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_median 1211 ns 1211 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_stddev 173 ns 173 ns 4 +lstringa<16> str; ... str += str_var1 + str_var2;_cv 13.85 % 13.85 % 4 +lstringa<128> str; ... str += str_var1 + str_var2;_mean 1085 ns 1085 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_median 1074 ns 1074 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_stddev 35.5 ns 35.5 ns 4 +lstringa<128> str; ... str += str_var1 + str_var2;_cv 3.27 % 3.27 % 4 +lstringa<512> str; ... str += str_var1 + str_var2;_mean 934 ns 934 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_median 920 ns 920 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_stddev 75.8 ns 75.8 ns 4 +lstringa<512> str; ... str += str_var1 + str_var2;_cv 8.12 % 8.12 % 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_mean 850 ns 850 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_median 835 ns 835 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 37.4 ns 37.4 ns 4 +lstringa<1024> str; ... str += str_var1 + str_var2;_cv 4.40 % 4.40 % 4 -- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::stringstream str; str << "test = " << k << " times";_mean 6485 ns 6485 ns 10 -std::stringstream str; str << "test = " << k << " times";_median 6482 ns 6482 ns 10 -std::stringstream str; str << "test = " << k << " times";_stddev 283 ns 283 ns 10 -std::stringstream str; str << "test = " << k << " times";_cv 4.36 % 4.36 % 10 -std::string str = "test = " + std::to_string(k) + " times";_mean 1595 ns 1595 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_median 1614 ns 1614 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_stddev 46.1 ns 46.1 ns 10 -std::string str = "test = " + std::to_string(k) + " times";_cv 2.89 % 2.89 % 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2803 ns 2804 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2764 ns 2764 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 92.1 ns 91.6 ns 10 -char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 3.28 % 3.27 % 10 -std::string str = std::format("test = {} times", k);_mean 2056 ns 2056 ns 10 -std::string str = std::format("test = {} times", k);_median 2015 ns 2015 ns 10 -std::string str = std::format("test = {} times", k);_stddev 94.5 ns 94.5 ns 10 -std::string str = std::format("test = {} times", k);_cv 4.59 % 4.59 % 10 -lstringa<8> str; str.format("test = {} times", k);_mean 3049 ns 3049 ns 10 -lstringa<8> str; str.format("test = {} times", k);_median 3032 ns 3032 ns 10 -lstringa<8> str; str.format("test = {} times", k);_stddev 86.5 ns 86.5 ns 10 -lstringa<8> str; str.format("test = {} times", k);_cv 2.84 % 2.84 % 10 -lstringa<32> str; str.format("test = {} times", k);_mean 2473 ns 2473 ns 10 -lstringa<32> str; str.format("test = {} times", k);_median 2458 ns 2458 ns 10 -lstringa<32> str; str.format("test = {} times", k);_stddev 40.3 ns 40.3 ns 10 -lstringa<32> str; str.format("test = {} times", k);_cv 1.63 % 1.63 % 10 -lstringa<8> str = "test = " + k + " times";_mean 588 ns 588 ns 10 -lstringa<8> str = "test = " + k + " times";_median 592 ns 592 ns 10 -lstringa<8> str = "test = " + k + " times";_stddev 28.3 ns 28.3 ns 10 -lstringa<8> str = "test = " + k + " times";_cv 4.81 % 4.81 % 10 -lstringa<32> str = "test = " + k + " times";_mean 362 ns 362 ns 10 -lstringa<32> str = "test = " + k + " times";_median 359 ns 359 ns 10 -lstringa<32> str = "test = " + k + " times";_stddev 35.8 ns 35.8 ns 10 -lstringa<32> str = "test = " + k + " times";_cv 9.87 % 9.87 % 10 -stringa str = "test = " + k + " times";_mean 556 ns 556 ns 10 -stringa str = "test = " + k + " times";_median 557 ns 557 ns 10 -stringa str = "test = " + k + " times";_stddev 22.7 ns 22.7 ns 10 -stringa str = "test = " + k + " times";_cv 4.08 % 4.08 % 10 +std::stringstream str; str << "test = " << k << " times";_mean 6507 ns 6507 ns 4 +std::stringstream str; str << "test = " << k << " times";_median 6556 ns 6556 ns 4 +std::stringstream str; str << "test = " << k << " times";_stddev 189 ns 189 ns 4 +std::stringstream str; str << "test = " << k << " times";_cv 2.90 % 2.90 % 4 +std::string str = "test = " + std::to_string(k) + " times";_mean 1696 ns 1696 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_median 1668 ns 1668 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_stddev 116 ns 116 ns 4 +std::string str = "test = " + std::to_string(k) + " times";_cv 6.81 % 6.81 % 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2885 ns 2885 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2885 ns 2885 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 38.2 ns 38.2 ns 4 +char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.32 % 1.32 % 4 +std::string str = std::format("test = {} times", k);_mean 2102 ns 2102 ns 4 +std::string str = std::format("test = {} times", k);_median 2077 ns 2077 ns 4 +std::string str = std::format("test = {} times", k);_stddev 89.9 ns 89.9 ns 4 +std::string str = std::format("test = {} times", k);_cv 4.28 % 4.28 % 4 +lstringa<8> str; str.format("test = {} times", k);_mean 3013 ns 3013 ns 4 +lstringa<8> str; str.format("test = {} times", k);_median 3015 ns 3015 ns 4 +lstringa<8> str; str.format("test = {} times", k);_stddev 44.0 ns 44.0 ns 4 +lstringa<8> str; str.format("test = {} times", k);_cv 1.46 % 1.46 % 4 +lstringa<32> str; str.format("test = {} times", k);_mean 2433 ns 2433 ns 4 +lstringa<32> str; str.format("test = {} times", k);_median 2438 ns 2438 ns 4 +lstringa<32> str; str.format("test = {} times", k);_stddev 56.8 ns 56.8 ns 4 +lstringa<32> str; str.format("test = {} times", k);_cv 2.33 % 2.33 % 4 +lstringa<8> str = "test = " + k + " times";_mean 641 ns 641 ns 4 +lstringa<8> str = "test = " + k + " times";_median 647 ns 647 ns 4 +lstringa<8> str = "test = " + k + " times";_stddev 44.8 ns 44.8 ns 4 +lstringa<8> str = "test = " + k + " times";_cv 7.00 % 7.00 % 4 +lstringa<32> str = "test = " + k + " times";_mean 374 ns 374 ns 4 +lstringa<32> str = "test = " + k + " times";_median 384 ns 384 ns 4 +lstringa<32> str = "test = " + k + " times";_stddev 31.6 ns 31.6 ns 4 +lstringa<32> str = "test = " + k + " times";_cv 8.45 % 8.45 % 4 +stringa str = "test = " + k + " times";_mean 561 ns 561 ns 4 +stringa str = "test = " + k + " times";_median 559 ns 559 ns 4 +stringa str = "test = " + k + " times";_stddev 9.54 ns 9.54 ns 4 +stringa str = "test = " + k + " times";_cv 1.70 % 1.70 % 4 -- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000 -std::string::find + substr + std::strtol_mean 619 ns 619 ns 10 -std::string::find + substr + std::strtol_median 613 ns 613 ns 10 -std::string::find + substr + std::strtol_stddev 29.1 ns 29.1 ns 10 -std::string::find + substr + std::strtol_cv 4.69 % 4.69 % 10 -ssa::splitter + ssa::as_int_mean 274 ns 274 ns 10 -ssa::splitter + ssa::as_int_median 270 ns 270 ns 10 -ssa::splitter + ssa::as_int_stddev 11.7 ns 11.7 ns 10 -ssa::splitter + ssa::as_int_cv 4.27 % 4.28 % 10 -ssa::splitf + functor_mean 332 ns 332 ns 10 -ssa::splitf + functor_median 331 ns 331 ns 10 -ssa::splitf + functor_stddev 5.01 ns 5.01 ns 10 -ssa::splitf + functor_cv 1.51 % 1.51 % 10 +std::string::find + substr + std::strtol_mean 643 ns 643 ns 4 +std::string::find + substr + std::strtol_median 639 ns 639 ns 4 +std::string::find + substr + std::strtol_stddev 15.4 ns 15.4 ns 4 +std::string::find + substr + std::strtol_cv 2.39 % 2.39 % 4 +ssa::splitter + ssa::as_int_mean 278 ns 278 ns 4 +ssa::splitter + ssa::as_int_median 278 ns 278 ns 4 +ssa::splitter + ssa::as_int_stddev 4.84 ns 4.84 ns 4 +ssa::splitter + ssa::as_int_cv 1.74 % 1.74 % 4 +ssa::splitf + functor_mean 337 ns 337 ns 4 +ssa::splitf + functor_median 336 ns 336 ns 4 +ssa::splitf + functor_stddev 21.0 ns 21.0 ns 4 +ssa::splitf + functor_cv 6.23 % 6.23 % 4 -- Replace symbols in text ~400 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Naive (and wrong) replace symbols with std::string find + replace_mean 2905 ns 2905 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_median 2875 ns 2875 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_stddev 143 ns 143 ns 10 -Naive (and wrong) replace symbols with std::string find + replace_cv 4.92 % 4.92 % 10 -replace symbols with std::string find_first_of + replace_mean 3870 ns 3870 ns 10 -replace symbols with std::string find_first_of + replace_median 3840 ns 3840 ns 10 -replace symbols with std::string find_first_of + replace_stddev 221 ns 221 ns 10 -replace symbols with std::string find_first_of + replace_cv 5.72 % 5.72 % 10 -replace symbols with std::string_view find_first_of + copy_mean 2942 ns 2942 ns 10 -replace symbols with std::string_view find_first_of + copy_median 2927 ns 2927 ns 10 -replace symbols with std::string_view find_first_of + copy_stddev 72.3 ns 72.3 ns 10 -replace symbols with std::string_view find_first_of + copy_cv 2.46 % 2.46 % 10 -replace runtime symbols with string expressions and without remembering all search results_mean 3121 ns 3121 ns 10 -replace runtime symbols with string expressions and without remembering all search results_median 3137 ns 3137 ns 10 -replace runtime symbols with string expressions and without remembering all search results_stddev 138 ns 138 ns 10 -replace runtime symbols with string expressions and without remembering all search results_cv 4.41 % 4.41 % 10 -replace runtime symbols with simstr and memorization of all search results_mean 2807 ns 2807 ns 10 -replace runtime symbols with simstr and memorization of all search results_median 2754 ns 2754 ns 10 -replace runtime symbols with simstr and memorization of all search results_stddev 152 ns 152 ns 10 -replace runtime symbols with simstr and memorization of all search results_cv 5.41 % 5.41 % 10 -replace const symbols with string expressions and without remembering all search results_mean 2448 ns 2448 ns 10 -replace const symbols with string expressions and without remembering all search results_median 2449 ns 2449 ns 10 -replace const symbols with string expressions and without remembering all search results_stddev 80.0 ns 80.0 ns 10 -replace const symbols with string expressions and without remembering all search results_cv 3.27 % 3.27 % 10 -replace const symbols with string expressions and memorization of all search results_mean 2383 ns 2383 ns 10 -replace const symbols with string expressions and memorization of all search results_median 2358 ns 2358 ns 10 -replace const symbols with string expressions and memorization of all search results_stddev 125 ns 125 ns 10 -replace const symbols with string expressions and memorization of all search results_cv 5.26 % 5.26 % 10 +Naive (and wrong) replace symbols with std::string find + replace_mean 3545 ns 3545 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_median 3430 ns 3430 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_stddev 366 ns 366 ns 4 +Naive (and wrong) replace symbols with std::string find + replace_cv 10.33 % 10.33 % 4 +replace symbols with std::string find_first_of + replace_mean 4741 ns 4741 ns 4 +replace symbols with std::string find_first_of + replace_median 4711 ns 4711 ns 4 +replace symbols with std::string find_first_of + replace_stddev 140 ns 140 ns 4 +replace symbols with std::string find_first_of + replace_cv 2.96 % 2.96 % 4 +replace symbols with std::string_view find_first_of + copy_mean 3504 ns 3504 ns 4 +replace symbols with std::string_view find_first_of + copy_median 3441 ns 3441 ns 4 +replace symbols with std::string_view find_first_of + copy_stddev 200 ns 200 ns 4 +replace symbols with std::string_view find_first_of + copy_cv 5.72 % 5.72 % 4 +replace runtime symbols with string expressions and without remembering all search results_mean 3605 ns 3605 ns 4 +replace runtime symbols with string expressions and without remembering all search results_median 3614 ns 3614 ns 4 +replace runtime symbols with string expressions and without remembering all search results_stddev 171 ns 171 ns 4 +replace runtime symbols with string expressions and without remembering all search results_cv 4.76 % 4.76 % 4 +replace runtime symbols with simstr and memorization of all search results_mean 3154 ns 3154 ns 4 +replace runtime symbols with simstr and memorization of all search results_median 3170 ns 3170 ns 4 +replace runtime symbols with simstr and memorization of all search results_stddev 73.9 ns 73.9 ns 4 +replace runtime symbols with simstr and memorization of all search results_cv 2.34 % 2.34 % 4 +replace const symbols with string expressions and without remembering all search results_mean 2939 ns 2939 ns 4 +replace const symbols with string expressions and without remembering all search results_median 2894 ns 2894 ns 4 +replace const symbols with string expressions and without remembering all search results_stddev 125 ns 125 ns 4 +replace const symbols with string expressions and without remembering all search results_cv 4.25 % 4.25 % 4 +replace const symbols with string expressions and memorization of all search results_mean 2859 ns 2859 ns 4 +replace const symbols with string expressions and memorization of all search results_median 2870 ns 2870 ns 4 +replace const symbols with string expressions and memorization of all search results_stddev 77.1 ns 77.1 ns 4 +replace const symbols with string expressions and memorization of all search results_cv 2.69 % 2.69 % 4 -- Replace symbols in text ~40 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000 -Short Naive (and wrong) replace symbols with std::string find + replace_mean 429 ns 429 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_median 427 ns 427 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_stddev 17.1 ns 17.1 ns 10 -Short Naive (and wrong) replace symbols with std::string find + replace_cv 3.98 % 3.98 % 10 -Short replace symbols with std::string find_first_of + replace_mean 526 ns 526 ns 10 -Short replace symbols with std::string find_first_of + replace_median 522 ns 522 ns 10 -Short replace symbols with std::string find_first_of + replace_stddev 23.6 ns 23.6 ns 10 -Short replace symbols with std::string find_first_of + replace_cv 4.49 % 4.49 % 10 -Short replace symbols with std::string_view find_first_of + copy_mean 413 ns 413 ns 10 -Short replace symbols with std::string_view find_first_of + copy_median 409 ns 409 ns 10 -Short replace symbols with std::string_view find_first_of + copy_stddev 13.6 ns 13.6 ns 10 -Short replace symbols with std::string_view find_first_of + copy_cv 3.28 % 3.28 % 10 -Short replace runtime symbols with string expressions and without remembering all search results_mean 390 ns 390 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_median 386 ns 386 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_stddev 18.8 ns 18.8 ns 10 -Short replace runtime symbols with string expressions and without remembering all search results_cv 4.81 % 4.81 % 10 -Short replace runtime symbols with simstr and memorization of all search results_mean 403 ns 403 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_median 402 ns 402 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_stddev 17.6 ns 17.6 ns 10 -Short replace runtime symbols with simstr and memorization of all search results_cv 4.37 % 4.37 % 10 -Short replace const symbols with string expressions and without remembering all search results_mean 243 ns 243 ns 10 -Short replace const symbols with string expressions and without remembering all search results_median 245 ns 245 ns 10 -Short replace const symbols with string expressions and without remembering all search results_stddev 16.2 ns 16.2 ns 10 -Short replace const symbols with string expressions and without remembering all search results_cv 6.66 % 6.66 % 10 -Short replace const symbols with string expressions and memorization of all search results_mean 313 ns 313 ns 10 -Short replace const symbols with string expressions and memorization of all search results_median 317 ns 317 ns 10 -Short replace const symbols with string expressions and memorization of all search results_stddev 14.0 ns 14.0 ns 10 -Short replace const symbols with string expressions and memorization of all search results_cv 4.47 % 4.47 % 10 +Short Naive (and wrong) replace symbols with std::string find + replace_mean 436 ns 436 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_median 433 ns 433 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_stddev 15.4 ns 15.4 ns 4 +Short Naive (and wrong) replace symbols with std::string find + replace_cv 3.53 % 3.53 % 4 +Short replace symbols with std::string find_first_of + replace_mean 510 ns 510 ns 4 +Short replace symbols with std::string find_first_of + replace_median 516 ns 516 ns 4 +Short replace symbols with std::string find_first_of + replace_stddev 14.7 ns 14.7 ns 4 +Short replace symbols with std::string find_first_of + replace_cv 2.89 % 2.89 % 4 +Short replace symbols with std::string_view find_first_of + copy_mean 440 ns 440 ns 4 +Short replace symbols with std::string_view find_first_of + copy_median 428 ns 428 ns 4 +Short replace symbols with std::string_view find_first_of + copy_stddev 58.6 ns 58.6 ns 4 +Short replace symbols with std::string_view find_first_of + copy_cv 13.30 % 13.30 % 4 +Short replace runtime symbols with string expressions and without remembering all search results_mean 386 ns 386 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_median 384 ns 384 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_stddev 9.16 ns 9.16 ns 4 +Short replace runtime symbols with string expressions and without remembering all search results_cv 2.37 % 2.37 % 4 +Short replace runtime symbols with simstr and memorization of all search results_mean 420 ns 420 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_median 423 ns 423 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_stddev 19.6 ns 19.6 ns 4 +Short replace runtime symbols with simstr and memorization of all search results_cv 4.66 % 4.66 % 4 +Short replace const symbols with string expressions and without remembering all search results_mean 260 ns 260 ns 4 +Short replace const symbols with string expressions and without remembering all search results_median 257 ns 257 ns 4 +Short replace const symbols with string expressions and without remembering all search results_stddev 17.1 ns 17.0 ns 4 +Short replace const symbols with string expressions and without remembering all search results_cv 6.56 % 6.54 % 4 +Short replace const symbols with string expressions and memorization of all search results_mean 313 ns 313 ns 4 +Short replace const symbols with string expressions and memorization of all search results_median 314 ns 314 ns 4 +Short replace const symbols with string expressions and memorization of all search results_stddev 14.3 ns 14.3 ns 4 +Short replace const symbols with string expressions and memorization of all search results_cv 4.57 % 4.57 % 4 ----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to ---- in std::string|64_mean 382 ns 382 ns 10 -replace bb to ---- in std::string|64_median 375 ns 375 ns 10 -replace bb to ---- in std::string|64_stddev 23.0 ns 23.0 ns 10 -replace bb to ---- in std::string|64_cv 6.03 % 6.03 % 10 -replace bb to ---- in std::string|256_mean 1318 ns 1318 ns 10 -replace bb to ---- in std::string|256_median 1296 ns 1296 ns 10 -replace bb to ---- in std::string|256_stddev 68.0 ns 68.0 ns 10 -replace bb to ---- in std::string|256_cv 5.15 % 5.15 % 10 -replace bb to ---- in std::string|512_mean 2632 ns 2632 ns 10 -replace bb to ---- in std::string|512_median 2569 ns 2569 ns 10 -replace bb to ---- in std::string|512_stddev 195 ns 195 ns 10 -replace bb to ---- in std::string|512_cv 7.43 % 7.43 % 10 -replace bb to ---- in std::string|1024_mean 5262 ns 5262 ns 10 -replace bb to ---- in std::string|1024_median 5236 ns 5236 ns 10 -replace bb to ---- in std::string|1024_stddev 137 ns 137 ns 10 -replace bb to ---- in std::string|1024_cv 2.60 % 2.60 % 10 -replace bb to ---- in std::string|2048_mean 12723 ns 12723 ns 10 -replace bb to ---- in std::string|2048_median 12716 ns 12716 ns 10 -replace bb to ---- in std::string|2048_stddev 459 ns 459 ns 10 -replace bb to ---- in std::string|2048_cv 3.61 % 3.61 % 10 -replace bb to ---- in lstringa<8>|64_mean 296 ns 296 ns 10 -replace bb to ---- in lstringa<8>|64_median 297 ns 297 ns 10 -replace bb to ---- in lstringa<8>|64_stddev 8.74 ns 8.74 ns 10 -replace bb to ---- in lstringa<8>|64_cv 2.95 % 2.95 % 10 -replace bb to ---- in lstringa<8>|256_mean 1106 ns 1106 ns 10 -replace bb to ---- in lstringa<8>|256_median 1111 ns 1111 ns 10 -replace bb to ---- in lstringa<8>|256_stddev 32.8 ns 32.8 ns 10 -replace bb to ---- in lstringa<8>|256_cv 2.96 % 2.96 % 10 -replace bb to ---- in lstringa<8>|512_mean 1998 ns 1998 ns 10 -replace bb to ---- in lstringa<8>|512_median 1999 ns 1999 ns 10 -replace bb to ---- in lstringa<8>|512_stddev 80.5 ns 80.5 ns 10 -replace bb to ---- in lstringa<8>|512_cv 4.03 % 4.03 % 10 -replace bb to ---- in lstringa<8>|1024_mean 3708 ns 3708 ns 10 -replace bb to ---- in lstringa<8>|1024_median 3692 ns 3692 ns 10 -replace bb to ---- in lstringa<8>|1024_stddev 93.0 ns 93.0 ns 10 -replace bb to ---- in lstringa<8>|1024_cv 2.51 % 2.51 % 10 -replace bb to ---- in lstringa<8>|2048_mean 7236 ns 7236 ns 10 -replace bb to ---- in lstringa<8>|2048_median 7238 ns 7238 ns 10 -replace bb to ---- in lstringa<8>|2048_stddev 225 ns 225 ns 10 -replace bb to ---- in lstringa<8>|2048_cv 3.11 % 3.11 % 10 -replace bb to ---- by init stringa|64_mean 208 ns 208 ns 10 -replace bb to ---- by init stringa|64_median 209 ns 209 ns 10 -replace bb to ---- by init stringa|64_stddev 6.08 ns 6.08 ns 10 -replace bb to ---- by init stringa|64_cv 2.92 % 2.92 % 10 -replace bb to ---- by init stringa|256_mean 745 ns 745 ns 10 -replace bb to ---- by init stringa|256_median 738 ns 738 ns 10 -replace bb to ---- by init stringa|256_stddev 29.5 ns 29.5 ns 10 -replace bb to ---- by init stringa|256_cv 3.95 % 3.95 % 10 -replace bb to ---- by init stringa|512_mean 1649 ns 1649 ns 10 -replace bb to ---- by init stringa|512_median 1650 ns 1650 ns 10 -replace bb to ---- by init stringa|512_stddev 23.4 ns 23.4 ns 10 -replace bb to ---- by init stringa|512_cv 1.42 % 1.42 % 10 -replace bb to ---- by init stringa|1024_mean 3458 ns 3458 ns 10 -replace bb to ---- by init stringa|1024_median 3433 ns 3433 ns 10 -replace bb to ---- by init stringa|1024_stddev 72.9 ns 72.9 ns 10 -replace bb to ---- by init stringa|1024_cv 2.11 % 2.11 % 10 -replace bb to ---- by init stringa|2048_mean 7119 ns 7119 ns 10 -replace bb to ---- by init stringa|2048_median 7145 ns 7145 ns 10 -replace bb to ---- by init stringa|2048_stddev 182 ns 182 ns 10 -replace bb to ---- by init stringa|2048_cv 2.55 % 2.55 % 10 +replace bb to ---- in std::string|64_mean 377 ns 377 ns 4 +replace bb to ---- in std::string|64_median 371 ns 371 ns 4 +replace bb to ---- in std::string|64_stddev 19.8 ns 19.8 ns 4 +replace bb to ---- in std::string|64_cv 5.25 % 5.25 % 4 +replace bb to ---- in std::string|256_mean 1421 ns 1421 ns 4 +replace bb to ---- in std::string|256_median 1420 ns 1420 ns 4 +replace bb to ---- in std::string|256_stddev 20.1 ns 20.1 ns 4 +replace bb to ---- in std::string|256_cv 1.41 % 1.41 % 4 +replace bb to ---- in std::string|512_mean 2623 ns 2623 ns 4 +replace bb to ---- in std::string|512_median 2613 ns 2613 ns 4 +replace bb to ---- in std::string|512_stddev 61.2 ns 61.2 ns 4 +replace bb to ---- in std::string|512_cv 2.33 % 2.33 % 4 +replace bb to ---- in std::string|1024_mean 5482 ns 5482 ns 4 +replace bb to ---- in std::string|1024_median 5450 ns 5450 ns 4 +replace bb to ---- in std::string|1024_stddev 212 ns 212 ns 4 +replace bb to ---- in std::string|1024_cv 3.86 % 3.86 % 4 +replace bb to ---- in std::string|2048_mean 13478 ns 13478 ns 4 +replace bb to ---- in std::string|2048_median 13589 ns 13589 ns 4 +replace bb to ---- in std::string|2048_stddev 460 ns 460 ns 4 +replace bb to ---- in std::string|2048_cv 3.42 % 3.42 % 4 +replace bb to ---- in lstringa<8>|64_mean 311 ns 311 ns 4 +replace bb to ---- in lstringa<8>|64_median 311 ns 311 ns 4 +replace bb to ---- in lstringa<8>|64_stddev 3.83 ns 3.83 ns 4 +replace bb to ---- in lstringa<8>|64_cv 1.23 % 1.23 % 4 +replace bb to ---- in lstringa<8>|256_mean 1149 ns 1149 ns 4 +replace bb to ---- in lstringa<8>|256_median 1140 ns 1140 ns 4 +replace bb to ---- in lstringa<8>|256_stddev 116 ns 115 ns 4 +replace bb to ---- in lstringa<8>|256_cv 10.06 % 10.03 % 4 +replace bb to ---- in lstringa<8>|512_mean 2165 ns 2165 ns 4 +replace bb to ---- in lstringa<8>|512_median 2136 ns 2136 ns 4 +replace bb to ---- in lstringa<8>|512_stddev 90.9 ns 90.9 ns 4 +replace bb to ---- in lstringa<8>|512_cv 4.20 % 4.20 % 4 +replace bb to ---- in lstringa<8>|1024_mean 3868 ns 3868 ns 4 +replace bb to ---- in lstringa<8>|1024_median 3870 ns 3870 ns 4 +replace bb to ---- in lstringa<8>|1024_stddev 88.0 ns 88.0 ns 4 +replace bb to ---- in lstringa<8>|1024_cv 2.28 % 2.28 % 4 +replace bb to ---- in lstringa<8>|2048_mean 7737 ns 7737 ns 4 +replace bb to ---- in lstringa<8>|2048_median 7562 ns 7562 ns 4 +replace bb to ---- in lstringa<8>|2048_stddev 699 ns 699 ns 4 +replace bb to ---- in lstringa<8>|2048_cv 9.03 % 9.03 % 4 +replace bb to ---- by init stringa|64_mean 226 ns 226 ns 4 +replace bb to ---- by init stringa|64_median 226 ns 226 ns 4 +replace bb to ---- by init stringa|64_stddev 7.57 ns 7.57 ns 4 +replace bb to ---- by init stringa|64_cv 3.35 % 3.35 % 4 +replace bb to ---- by init stringa|256_mean 790 ns 790 ns 4 +replace bb to ---- by init stringa|256_median 776 ns 776 ns 4 +replace bb to ---- by init stringa|256_stddev 50.7 ns 50.7 ns 4 +replace bb to ---- by init stringa|256_cv 6.41 % 6.41 % 4 +replace bb to ---- by init stringa|512_mean 1685 ns 1685 ns 4 +replace bb to ---- by init stringa|512_median 1675 ns 1675 ns 4 +replace bb to ---- by init stringa|512_stddev 54.3 ns 54.3 ns 4 +replace bb to ---- by init stringa|512_cv 3.22 % 3.22 % 4 +replace bb to ---- by init stringa|1024_mean 3603 ns 3603 ns 4 +replace bb to ---- by init stringa|1024_median 3555 ns 3555 ns 4 +replace bb to ---- by init stringa|1024_stddev 122 ns 122 ns 4 +replace bb to ---- by init stringa|1024_cv 3.39 % 3.39 % 4 +replace bb to ---- by init stringa|2048_mean 7600 ns 7600 ns 4 +replace bb to ---- by init stringa|2048_median 7529 ns 7529 ns 4 +replace bb to ---- by init stringa|2048_stddev 240 ns 240 ns 4 +replace bb to ---- by init stringa|2048_cv 3.16 % 3.16 % 4 ----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -replace bb to -- in std::string|64_mean 275 ns 275 ns 10 -replace bb to -- in std::string|64_median 273 ns 273 ns 10 -replace bb to -- in std::string|64_stddev 18.3 ns 18.3 ns 10 -replace bb to -- in std::string|64_cv 6.66 % 6.66 % 10 -replace bb to -- in std::string|256_mean 1017 ns 1017 ns 10 -replace bb to -- in std::string|256_median 1011 ns 1011 ns 10 -replace bb to -- in std::string|256_stddev 49.8 ns 49.8 ns 10 -replace bb to -- in std::string|256_cv 4.90 % 4.90 % 10 -replace bb to -- in std::string|512_mean 1834 ns 1834 ns 10 -replace bb to -- in std::string|512_median 1822 ns 1822 ns 10 -replace bb to -- in std::string|512_stddev 59.6 ns 59.6 ns 10 -replace bb to -- in std::string|512_cv 3.25 % 3.25 % 10 -replace bb to -- in std::string|1024_mean 3524 ns 3524 ns 10 -replace bb to -- in std::string|1024_median 3512 ns 3512 ns 10 -replace bb to -- in std::string|1024_stddev 88.8 ns 88.8 ns 10 -replace bb to -- in std::string|1024_cv 2.52 % 2.52 % 10 -replace bb to -- in std::string|2048_mean 7031 ns 7031 ns 10 -replace bb to -- in std::string|2048_median 7054 ns 7054 ns 10 -replace bb to -- in std::string|2048_stddev 216 ns 216 ns 10 -replace bb to -- in std::string|2048_cv 3.07 % 3.07 % 10 -replace bb to -- in lstringa<8>|64_mean 217 ns 217 ns 10 -replace bb to -- in lstringa<8>|64_median 214 ns 214 ns 10 -replace bb to -- in lstringa<8>|64_stddev 17.0 ns 17.0 ns 10 -replace bb to -- in lstringa<8>|64_cv 7.82 % 7.82 % 10 -replace bb to -- in lstringa<8>|256_mean 764 ns 764 ns 10 -replace bb to -- in lstringa<8>|256_median 764 ns 764 ns 10 -replace bb to -- in lstringa<8>|256_stddev 29.2 ns 29.2 ns 10 -replace bb to -- in lstringa<8>|256_cv 3.82 % 3.82 % 10 -replace bb to -- in lstringa<8>|512_mean 1417 ns 1417 ns 10 -replace bb to -- in lstringa<8>|512_median 1406 ns 1406 ns 10 -replace bb to -- in lstringa<8>|512_stddev 43.5 ns 43.5 ns 10 -replace bb to -- in lstringa<8>|512_cv 3.07 % 3.07 % 10 -replace bb to -- in lstringa<8>|1024_mean 2732 ns 2732 ns 10 -replace bb to -- in lstringa<8>|1024_median 2686 ns 2686 ns 10 -replace bb to -- in lstringa<8>|1024_stddev 115 ns 115 ns 10 -replace bb to -- in lstringa<8>|1024_cv 4.22 % 4.22 % 10 -replace bb to -- in lstringa<8>|2048_mean 5398 ns 5398 ns 10 -replace bb to -- in lstringa<8>|2048_median 5361 ns 5361 ns 10 -replace bb to -- in lstringa<8>|2048_stddev 179 ns 179 ns 10 -replace bb to -- in lstringa<8>|2048_cv 3.31 % 3.31 % 10 -replace bb to -- by init stringa|64_mean 183 ns 183 ns 10 -replace bb to -- by init stringa|64_median 185 ns 185 ns 10 -replace bb to -- by init stringa|64_stddev 9.36 ns 9.36 ns 10 -replace bb to -- by init stringa|64_cv 5.11 % 5.11 % 10 -replace bb to -- by init stringa|256_mean 637 ns 637 ns 10 -replace bb to -- by init stringa|256_median 635 ns 635 ns 10 -replace bb to -- by init stringa|256_stddev 25.8 ns 25.8 ns 10 -replace bb to -- by init stringa|256_cv 4.04 % 4.04 % 10 -replace bb to -- by init stringa|512_mean 1165 ns 1165 ns 10 -replace bb to -- by init stringa|512_median 1151 ns 1151 ns 10 -replace bb to -- by init stringa|512_stddev 45.4 ns 45.4 ns 10 -replace bb to -- by init stringa|512_cv 3.90 % 3.90 % 10 -replace bb to -- by init stringa|1024_mean 2294 ns 2294 ns 10 -replace bb to -- by init stringa|1024_median 2322 ns 2322 ns 10 -replace bb to -- by init stringa|1024_stddev 103 ns 103 ns 10 -replace bb to -- by init stringa|1024_cv 4.50 % 4.50 % 10 -replace bb to -- by init stringa|2048_mean 4391 ns 4391 ns 10 -replace bb to -- by init stringa|2048_median 4400 ns 4400 ns 10 -replace bb to -- by init stringa|2048_stddev 93.2 ns 93.2 ns 10 -replace bb to -- by init stringa|2048_cv 2.12 % 2.12 % 10 +replace bb to -- in std::string|64_mean 268 ns 268 ns 4 +replace bb to -- in std::string|64_median 259 ns 259 ns 4 +replace bb to -- in std::string|64_stddev 21.3 ns 21.3 ns 4 +replace bb to -- in std::string|64_cv 7.93 % 7.93 % 4 +replace bb to -- in std::string|256_mean 987 ns 987 ns 4 +replace bb to -- in std::string|256_median 989 ns 989 ns 4 +replace bb to -- in std::string|256_stddev 36.6 ns 36.6 ns 4 +replace bb to -- in std::string|256_cv 3.71 % 3.71 % 4 +replace bb to -- in std::string|512_mean 1942 ns 1942 ns 4 +replace bb to -- in std::string|512_median 1922 ns 1922 ns 4 +replace bb to -- in std::string|512_stddev 68.6 ns 68.6 ns 4 +replace bb to -- in std::string|512_cv 3.53 % 3.53 % 4 +replace bb to -- in std::string|1024_mean 3660 ns 3660 ns 4 +replace bb to -- in std::string|1024_median 3649 ns 3649 ns 4 +replace bb to -- in std::string|1024_stddev 96.8 ns 96.8 ns 4 +replace bb to -- in std::string|1024_cv 2.65 % 2.65 % 4 +replace bb to -- in std::string|2048_mean 7038 ns 7038 ns 4 +replace bb to -- in std::string|2048_median 6972 ns 6972 ns 4 +replace bb to -- in std::string|2048_stddev 221 ns 221 ns 4 +replace bb to -- in std::string|2048_cv 3.14 % 3.14 % 4 +replace bb to -- in lstringa<8>|64_mean 229 ns 229 ns 4 +replace bb to -- in lstringa<8>|64_median 228 ns 228 ns 4 +replace bb to -- in lstringa<8>|64_stddev 9.54 ns 9.54 ns 4 +replace bb to -- in lstringa<8>|64_cv 4.17 % 4.17 % 4 +replace bb to -- in lstringa<8>|256_mean 776 ns 776 ns 4 +replace bb to -- in lstringa<8>|256_median 771 ns 771 ns 4 +replace bb to -- in lstringa<8>|256_stddev 23.4 ns 23.4 ns 4 +replace bb to -- in lstringa<8>|256_cv 3.02 % 3.02 % 4 +replace bb to -- in lstringa<8>|512_mean 1461 ns 1461 ns 4 +replace bb to -- in lstringa<8>|512_median 1459 ns 1459 ns 4 +replace bb to -- in lstringa<8>|512_stddev 69.2 ns 69.2 ns 4 +replace bb to -- in lstringa<8>|512_cv 4.74 % 4.74 % 4 +replace bb to -- in lstringa<8>|1024_mean 2897 ns 2897 ns 4 +replace bb to -- in lstringa<8>|1024_median 2889 ns 2889 ns 4 +replace bb to -- in lstringa<8>|1024_stddev 188 ns 188 ns 4 +replace bb to -- in lstringa<8>|1024_cv 6.50 % 6.50 % 4 +replace bb to -- in lstringa<8>|2048_mean 5674 ns 5674 ns 4 +replace bb to -- in lstringa<8>|2048_median 5564 ns 5564 ns 4 +replace bb to -- in lstringa<8>|2048_stddev 453 ns 453 ns 4 +replace bb to -- in lstringa<8>|2048_cv 7.99 % 7.99 % 4 +replace bb to -- by init stringa|64_mean 187 ns 187 ns 4 +replace bb to -- by init stringa|64_median 189 ns 189 ns 4 +replace bb to -- by init stringa|64_stddev 8.53 ns 8.53 ns 4 +replace bb to -- by init stringa|64_cv 4.57 % 4.57 % 4 +replace bb to -- by init stringa|256_mean 652 ns 652 ns 4 +replace bb to -- by init stringa|256_median 655 ns 655 ns 4 +replace bb to -- by init stringa|256_stddev 8.48 ns 8.48 ns 4 +replace bb to -- by init stringa|256_cv 1.30 % 1.30 % 4 +replace bb to -- by init stringa|512_mean 1221 ns 1221 ns 4 +replace bb to -- by init stringa|512_median 1224 ns 1224 ns 4 +replace bb to -- by init stringa|512_stddev 28.7 ns 28.7 ns 4 +replace bb to -- by init stringa|512_cv 2.35 % 2.35 % 4 +replace bb to -- by init stringa|1024_mean 2366 ns 2366 ns 4 +replace bb to -- by init stringa|1024_median 2351 ns 2351 ns 4 +replace bb to -- by init stringa|1024_stddev 42.5 ns 42.5 ns 4 +replace bb to -- by init stringa|1024_cv 1.80 % 1.80 % 4 +replace bb to -- by init stringa|2048_mean 5259 ns 5259 ns 4 +replace bb to -- by init stringa|2048_median 5407 ns 5407 ns 4 +replace bb to -- by init stringa|2048_stddev 496 ns 496 ns 4 +replace bb to -- by init stringa|2048_cv 9.43 % 9.43 % 4 ----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -hashStrMapA emplace & find stringa;_mean 3100858 ns 3100858 ns 10 -hashStrMapA emplace & find stringa;_median 3100858 ns 3100858 ns 10 -hashStrMapA emplace & find stringa;_stddev 52535 ns 52535 ns 10 -hashStrMapA emplace & find stringa;_cv 1.69 % 1.69 % 10 -std::unordered_map emplace & find std::string;_mean 3377674 ns 3377209 ns 10 -std::unordered_map emplace & find std::string;_median 3348837 ns 3346512 ns 10 -std::unordered_map emplace & find std::string;_stddev 111796 ns 111831 ns 10 -std::unordered_map emplace & find std::string;_cv 3.31 % 3.31 % 10 -hashStrMapA emplace & find ssa;_mean 3119903 ns 3119903 ns 10 -hashStrMapA emplace & find ssa;_median 3111650 ns 3111650 ns 10 -hashStrMapA emplace & find ssa;_stddev 87918 ns 87918 ns 10 -hashStrMapA emplace & find ssa;_cv 2.82 % 2.82 % 10 -std::unordered_map emplace & find std::string_view;_mean 3635000 ns 3635000 ns 10 -std::unordered_map emplace & find std::string_view;_median 3635000 ns 3635000 ns 10 -std::unordered_map emplace & find std::string_view;_stddev 95917 ns 95917 ns 10 -std::unordered_map emplace & find std::string_view;_cv 2.64 % 2.64 % 10 +hashStrMapA emplace & find stringa;_mean 3192661 ns 3192661 ns 4 +hashStrMapA emplace & find stringa;_median 3204128 ns 3204128 ns 4 +hashStrMapA emplace & find stringa;_stddev 65411 ns 65411 ns 4 +hashStrMapA emplace & find stringa;_cv 2.05 % 2.05 % 4 +std::unordered_map emplace & find std::string;_mean 3399083 ns 3399083 ns 4 +std::unordered_map emplace & find std::string;_median 3389908 ns 3389908 ns 4 +std::unordered_map emplace & find std::string;_stddev 52033 ns 52033 ns 4 +std::unordered_map emplace & find std::string;_cv 1.53 % 1.53 % 4 +hashStrMapA emplace & find ssa;_mean 3300905 ns 3300905 ns 4 +hashStrMapA emplace & find ssa;_median 3285068 ns 3285068 ns 4 +hashStrMapA emplace & find ssa;_stddev 66348 ns 66348 ns 4 +hashStrMapA emplace & find ssa;_cv 2.01 % 2.01 % 4 +std::unordered_map emplace & find std::string_view;_mean 3845092 ns 3845092 ns 4 +std::unordered_map emplace & find std::string_view;_median 3723926 ns 3723926 ns 4 +std::unordered_map emplace & find std::string_view;_stddev 349796 ns 349796 ns 4 +std::unordered_map emplace & find std::string_view;_cv 9.10 % 9.10 % 4 ----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 -Build func full name std::string;_mean 2745 ns 2745 ns 10 -Build func full name std::string;_median 2710 ns 2710 ns 10 -Build func full name std::string;_stddev 102 ns 102 ns 10 -Build func full name std::string;_cv 3.72 % 3.72 % 10 -Build func full name std::string 1;_mean 2859 ns 2859 ns 10 -Build func full name std::string 1;_median 2821 ns 2821 ns 10 -Build func full name std::string 1;_stddev 128 ns 128 ns 10 -Build func full name std::string 1;_cv 4.46 % 4.46 % 10 -Build func full name std::stream;_mean 6461 ns 6461 ns 10 -Build func full name std::stream;_median 6527 ns 6527 ns 10 -Build func full name std::stream;_stddev 172 ns 172 ns 10 -Build func full name std::stream;_cv 2.67 % 2.67 % 10 -Build func full name stringa;_mean 1302 ns 1302 ns 10 -Build func full name stringa;_median 1292 ns 1292 ns 10 -Build func full name stringa;_stddev 118 ns 118 ns 10 -Build func full name stringa;_cv 9.05 % 9.05 % 10 -Build func full name stringa 1;_mean 1478 ns 1478 ns 10 -Build func full name stringa 1;_median 1479 ns 1479 ns 10 -Build func full name stringa 1;_stddev 57.9 ns 57.9 ns 10 -Build func full name stringa 1;_cv 3.92 % 3.92 % 10 +Build func full name std::string;_mean 3032 ns 3032 ns 4 +Build func full name std::string;_median 3092 ns 3092 ns 4 +Build func full name std::string;_stddev 250 ns 250 ns 4 +Build func full name std::string;_cv 8.24 % 8.24 % 4 +Build func full name std::string 1;_mean 3434 ns 3434 ns 4 +Build func full name std::string 1;_median 3546 ns 3546 ns 4 +Build func full name std::string 1;_stddev 322 ns 322 ns 4 +Build func full name std::string 1;_cv 9.39 % 9.39 % 4 +Build func full name std::stream;_mean 7330 ns 7330 ns 4 +Build func full name std::stream;_median 7275 ns 7275 ns 4 +Build func full name std::stream;_stddev 502 ns 502 ns 4 +Build func full name std::stream;_cv 6.85 % 6.85 % 4 +Build func full name stringa;_mean 1429 ns 1429 ns 4 +Build func full name stringa;_median 1427 ns 1427 ns 4 +Build func full name stringa;_stddev 94.1 ns 94.1 ns 4 +Build func full name stringa;_cv 6.58 % 6.58 % 4 +Build func full name stringa 1;_mean 1643 ns 1643 ns 4 +Build func full name stringa 1;_median 1646 ns 1646 ns 4 +Build func full name stringa 1;_stddev 68.1 ns 68.1 ns 4 +Build func full name stringa 1;_cv 4.14 % 4.14 % 4 diff --git a/docs/Doxyfile b/docs/Doxyfile index 9a2f3e4..21ef08a 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = "simstr" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.6.2 +PROJECT_NUMBER = 1.6.3 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewers a diff --git a/docs/Doxyfile_ru b/docs/Doxyfile_ru index e72a35e..a7e3d42 100644 --- a/docs/Doxyfile_ru +++ b/docs/Doxyfile_ru @@ -48,7 +48,7 @@ PROJECT_NAME = "simstr" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.6.2 +PROJECT_NUMBER = 1.6.3 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewers a diff --git a/include/simstr/simple_unicode.h b/include/simstr/simple_unicode.h index 65110df..8726b77 100644 --- a/include/simstr/simple_unicode.h +++ b/include/simstr/simple_unicode.h @@ -1,6 +1,6 @@ /* * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com - * ver. 1.6.2 + * ver. 1.6.3 */ #pragma once diff --git a/include/simstr/sstring.h b/include/simstr/sstring.h index 212fa73..7b97ae7 100644 --- a/include/simstr/sstring.h +++ b/include/simstr/sstring.h @@ -1,9 +1,9 @@ /* * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com - * ver. 1.6.2 + * ver. 1.6.3 * Классы для работы со строками * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com -* ver. 1.6.2 +* ver. 1.6.3 * Classes for working with strings */ @@ -3822,6 +3822,7 @@ class decl_empty_bases cestring : public null_terminated> //, public from_utf_convertible> { +public: using symb_type = K; using my_type = cestring; diff --git a/include/simstr/strexpr.h b/include/simstr/strexpr.h index dbf46ff..48b070a 100644 --- a/include/simstr/strexpr.h +++ b/include/simstr/strexpr.h @@ -1,5 +1,5 @@ /* - * ver. 1.6.2 + * ver. 1.6.3 * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * База для строковых конкатенаций через выражения времени компиляции * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com @@ -490,9 +490,6 @@ concept StrExpr = requires(const A& a) { template concept StrExprForType = StrExpr && is_equal_str_type_v::symb_type>; -//template -//concept StdString = StrExpr && is_equal_str_type_v::value_type>; - template struct convert_to_strexpr; @@ -1638,11 +1635,11 @@ struct expr_num : expr_to_std_string> { using my_type = expr_num; enum { bufSize = 24 }; - mutable T value; mutable K buf[bufSize]; + mutable T value; constexpr expr_num(T t) : value(t) {} - constexpr expr_num(expr_num&& t) : value(t.value) {} + constexpr expr_num(expr_num&& t) noexcept : value(t.value) {} constexpr size_t length() const noexcept { value = (T)fromInt(buf + bufSize, value); @@ -1690,6 +1687,508 @@ constexpr expr_num e_num(T t) { return {t}; } +namespace f{ + +enum class int_align { none, left, right, center }; +enum class int_plus_sign {none, plus, space}; + +enum fmt_kinds : unsigned { + fmt_none = 0, + fmt_align = 1, + fmt_width = 2, + fmt_fill = 4, + fmt_sign = 8, + fmt_upper = 16, + fmt_prefix = 32, + fmt_zero = 64, +}; + +template +struct fmt_info { + using a_t = A; + using b_t = B; + inline static constexpr unsigned kind = Kind; +}; + +struct fmt_default { + inline static constexpr unsigned kind = fmt_none; +}; + +template +struct align_info{ + inline static constexpr unsigned kind = fmt_align; +}; + +template +struct width_info { + inline static constexpr unsigned kind = fmt_width; +}; + +template +struct fill_info { + inline static constexpr unsigned kind = fmt_fill; +}; + +template +struct sign_info { + inline static constexpr unsigned kind = fmt_sign; +}; + +struct upper_info { + inline static constexpr unsigned kind = fmt_upper; +}; + +struct prefix_info { + inline static constexpr unsigned kind = fmt_prefix; +}; + +struct zero_info { + inline static constexpr unsigned kind = fmt_zero; +}; + +template +concept FmtParam = requires { + {std::remove_cvref_t::kind} -> std::same_as; +}; + +template +requires((A::kind ^ B::kind) != 0) +constexpr auto operator | (const A&, const B&) { + return fmt_info{}; +} + +inline constexpr align_info l; +inline constexpr align_info r; +inline constexpr align_info c; + +template +inline constexpr width_info w; + +template +inline constexpr fill_info f; + +inline constexpr sign_info sp; +inline constexpr sign_info ss; +inline constexpr upper_info u; +inline constexpr prefix_info p; +inline constexpr zero_info z; + +inline constexpr width_info wp; +inline constexpr fmt_default df; + +template +struct extract_align : std::false_type { + inline static constexpr int_align align = int_align::none; +}; + +template +struct extract_align> : std::true_type { + inline static constexpr int_align align = A; +}; + +template +struct extract_align> { + inline static constexpr bool in_a = extract_align::value, in_b = extract_align::value, value = in_a | in_b; + inline static constexpr int_align align = extract_align>>>::align; +}; + +template +struct extract_width : std::false_type { + inline static constexpr size_t width = 0; +}; + +template +struct extract_width> : std::true_type { + inline static constexpr size_t width = W; +}; + +template +struct extract_width> { + inline static constexpr bool in_a = extract_width::value, in_b = extract_width::value, value = in_a | in_b; + inline static constexpr size_t width = extract_width>>>::width; +}; + +template +struct extract_fill : std::false_type { + inline static constexpr unsigned fill = ' '; +}; + +template +struct extract_fill> : std::true_type { + inline static constexpr unsigned fill = F; +}; + +template +struct extract_fill> { + inline static constexpr bool in_a = extract_fill::value, in_b = extract_fill::value, value = in_a | in_b; + inline static constexpr unsigned fill = extract_fill>>>::fill; +}; + +template +struct extract_sign : std::false_type { + inline static constexpr int_plus_sign sign = int_plus_sign::none; +}; + +template +struct extract_sign> : std::true_type { + inline static constexpr int_plus_sign sign = S; +}; + +template +struct extract_sign> { + inline static constexpr bool in_a = extract_sign::value, in_b = extract_sign::value, value = in_a | in_b; + inline static constexpr int_plus_sign sign = extract_sign>>>::sign; +}; + +template +struct extract_upper : std::false_type {}; + +template<> +struct extract_upper : std::true_type {}; + +template +struct extract_upper> { + inline static constexpr bool in_a = extract_upper::value, in_b = extract_upper::value, + value = extract_upper>>::value; +}; + +template +struct extract_prefix : std::false_type{}; + +template<> +struct extract_prefix : std::true_type {}; + +template +struct extract_prefix> { + inline static constexpr bool in_a = extract_prefix::value, in_b = extract_prefix::value, + value = extract_prefix>>::value; +}; + +template +struct extract_zero : std::false_type{}; + +template<> +struct extract_zero : std::true_type {}; + +template +struct extract_zero> { + inline static constexpr bool in_a = extract_zero::value, in_b = extract_zero::value, + value = extract_zero>>::value; +}; + +template +struct fmt_params { + inline static constexpr int_align align = Align; + inline static constexpr unsigned width = Width; + inline static constexpr unsigned fill = Fill; + inline static constexpr int_plus_sign sign = Sign; + inline static constexpr bool upper = Upper; + inline static constexpr bool prefix = Prefix; + inline static constexpr bool zero = Zero; +}; + +template +using p_to_fmt_t = fmt_params< + extract_align::align, + extract_width::width, + extract_fill::fill, + extract_sign::sign, + extract_upper::value, + extract_prefix::value, + extract_zero::value>; + +template +using to_fmt_t = p_to_fmt_t>; + +template +struct is_fmt_params : std::false_type{}; + +template +struct is_fmt_params> : std::true_type{}; + +template +concept FmtParamSet = is_fmt_params::value; + +} // namespace f + +template +constexpr K digits_symbols[36] = {K('0'), K('1'), K('2'), K('3'), K('4'), K('5'), K('6'), K('7'), K('8'), K('9'), + K(Ucase ? 'A' : 'a'), K(Ucase ? 'B' : 'b'), K(Ucase ? 'C' : 'c'), K(Ucase ? 'D' : 'd'), K(Ucase ? 'E' : 'e'), + K(Ucase ? 'F' : 'f'), K(Ucase ? 'G' : 'g'), K(Ucase ? 'H' : 'h'), K(Ucase ? 'I' : 'i'), K(Ucase ? 'J' : 'j'), + K(Ucase ? 'K' : 'k'), K(Ucase ? 'L' : 'l'), K(Ucase ? 'M' : 'm'), K(Ucase ? 'N' : 'n'), K(Ucase ? 'O' : 'o'), + K(Ucase ? 'P' : 'p'), K(Ucase ? 'Q' : 'q'), K(Ucase ? 'R' : 'r'), K(Ucase ? 'S' : 's'), K(Ucase ? 'T' : 't'), + K(Ucase ? 'U' : 'u'), K(Ucase ? 'V' : 'v'), K(Ucase ? 'W' : 'w'), K(Ucase ? 'X' : 'x'), K(Ucase ? 'Y' : 'y'), + K(Ucase ? 'Z' : 'z'), +}; + +template +requires (Radix > 1 && Radix <= 36) +struct expr_integer_src { + T value_; + unsigned width_{}; + constexpr expr_integer_src(T v) : value_(v){} + constexpr expr_integer_src(T v, unsigned w) : value_(v), width_(w){} +}; + +template +requires (Radix > 1 && Radix <= 36 && (FP::align == f::int_align::none || !FP::zero)) +struct expr_integer : expr_to_std_string> { + using symb_type = K; + using my_type = expr_num; + + enum { bufSize = 64 }; + mutable K buf[bufSize]; + mutable T value_; + unsigned width_{}; + + mutable bool negate_{}; + + constexpr expr_integer(T t) : value_(t){} + constexpr expr_integer(T t, unsigned w) : value_(t), width_(w){} + constexpr expr_integer(const expr_integer_src& v) : value_(v.value_), width_(v.width_){} + + constexpr expr_integer(expr_integer&& t) noexcept : value_(t.value_), width_(t.width_){} + + constexpr size_t length() const noexcept { + K* bufEnd = std::end(buf), *itr = bufEnd; + + if (value_) { + need_sign, T> store(value_); + while (store.val) { + *--itr = digits_symbols[store.val % Radix]; + store.val /= Radix; + } + if constexpr (std::is_signed_v) { + negate_ = store.negate; + } + } else { + *--itr = digits_symbols[0]; + } + size_t len = bufEnd - itr; + value_ = T(len); + if constexpr (std::is_signed_v) { + if constexpr (FP::sign != f::int_plus_sign::none) { + len++; + } else { + if (negate_) { + len++; + } + } + } + if constexpr (FP::prefix && (Radix == 2 || Radix == 8 || Radix == 16)) { + len++; // add 0 + if constexpr (Radix != 8) { // for octo just add 0, + len++; // for other b or x + } + } + if constexpr (FP::width == unsigned(-1)) { + return std::max(width_, len); + } else { + return std::max(FP::width, len); + } + } + constexpr K* place(K* ptr) const noexcept { + size_t len = (size_t)value_, all_len = len; + if constexpr (std::is_signed_v) { + if constexpr (FP::sign != f::int_plus_sign::none) { + all_len++; + } else { + if (negate_) { + all_len++; + } + } + } + if constexpr (FP::prefix && (Radix == 2 || Radix == 8 || Radix == 16)) { + all_len++; // add 0 + if constexpr (Radix != 8) { // for octo just add 0, + all_len++; // for other b or x + } + } + if constexpr (FP::zero) { + if constexpr (std::is_signed_v) { + if (negate_) { + *ptr++ = K('-'); + } else { + if constexpr (FP::sign == f::int_plus_sign::plus) { + *ptr++ = K('+'); + } else if constexpr (FP::sign == f::int_plus_sign::space) { + *ptr++ = K(' '); + } + } + } + if constexpr (FP::prefix && (Radix == 2 || Radix == 8 || Radix == 16)) { + *ptr++ = K('0'); + if constexpr (Radix == 2) { + *ptr++ = K('b'); + } else if constexpr (Radix == 16) { + *ptr++ = K('x'); + } + } + size_t before = 0; + if constexpr (FP::width == unsigned(-1)) { + if (width_ > all_len) { + before = width_ - all_len; + } + } else { + if (FP::width > all_len) { + before = FP::width - all_len; + } + } + if (before) { + ch_traits::assign(ptr, before, K('0')); + ptr += before; + } + ch_traits::copy(ptr, std::end(buf) - len, len); + ptr += len; + } else { + size_t before = 0, after = 0; + if constexpr (FP::width == unsigned(-1)) { + if (width_ > all_len) { + if constexpr (FP::align == f::int_align::left) { + after = width_ - all_len; + } else if constexpr (FP::align == f::int_align::center) { + before = (width_ - all_len) / 2; + after = width_ - all_len - before; + } else { + before = width_ - all_len; + } + } + } else { + if (FP::width > all_len) { + if constexpr (FP::align == f::int_align::left) { + after = FP::width - all_len; + } else if constexpr (FP::align == f::int_align::center) { + before = (FP::width - all_len) / 2; + after = FP::width - all_len - before; + } else { + before = FP::width - all_len; + } + } + } + if (before) { + ch_traits::assign(ptr, before, K(FP::fill)); + ptr += before; + } + if constexpr (std::is_signed_v) { + if (negate_) { + *ptr++ = K('-'); + } else { + if constexpr (FP::sign == f::int_plus_sign::plus) { + *ptr++ = K('+'); + } else if constexpr (FP::sign == f::int_plus_sign::space) { + *ptr++ = K(' '); + } + } + } + if constexpr (FP::prefix && (Radix == 2 || Radix == 8 || Radix == 16)) { + *ptr++ = K('0'); + if constexpr (Radix == 2) { + *ptr++ = K('b'); + } else if constexpr (Radix == 16) { + *ptr++ = K('x'); + } + } + ch_traits::copy(ptr, std::end(buf) - len, len); + ptr += len; + + if (after) { + ch_traits::assign(ptr, after, K(FP::fill)); + ptr += after; + } + } + return ptr; + } +}; + +template +struct convert_to_strexpr> { + using type = expr_integer; +}; + +template +struct flags_checker { + using val_t = T; + using flags_t = f::to_fmt_t; + inline static constexpr unsigned Radix = R; +}; + +template +concept good_int_flags = + T::Radix > 1 && T::Radix <= 36 + // Должно быть задано только или выравнивание, или заполнение нулём. + // Only either alignment or zero-padding must be specified. + && (T::flags_t::align == f::int_align::none || !T::flags_t::zero) + // Флаг вывода знака должен задаваться только для знаковых чисел + // The sign output flag should only be set for signed numbers. + && (std::is_signed_v || T::flags_t::sign == f::int_plus_sign::none) + // Неверное поле ширины + // Invalid width field + && (T::flags_t::width == unsigned(-1)) == ArgWidth; + +/*! + * @ingroup StrExprs + * @ru @brief Создает объект, который преобразовывается в строковое выражение, генерирующее строковое представление числа. + * @tparam R - Основание счисления, должно быть от 2 до 36. + * @tparam fp - параметры для форматирования числа. + * @tparam T - тип числа, выводится из аргумента. + * @param v - число. + * @return источник для строкового выражения expr_integer_src. + * @details параметры форматирования числа задаются набором констант, через '|'. + * - f::l: при задании ширины поля выравнивать влево. + * - f::r: при задании ширины поля выравнивать вправо. + * - f::с: при задании ширины поля выравнивать по центру. + * - f::p: выводить префикс системы счисления, 0b для 2, 0 для 8, 0x для 16. + * - f::z: дополнять число до заданной ширины нулями справа. Не совместимо с опциями выравнивания. + * - f::u: Для систем счисления более 10, выводить символы в верхнем регистре. + * - f::sp: Для знаковых типов чисел для положительных значений выводить '+' перед числом. + * - f::ss: Для знаковых типов чисел для положительных значений выводить пробел перед числом. + * - f::f<'c'>`: Задаёт символ-заполнитель при указании ширины поля. По умолчанию - пробел. + * - f::w: Задаёт ширину поля. При указании ширины можно либо указать желаемое выравнивание (r, l, c), + * либо дополнение нулями (z), но не оба сразу. Если ничего из этого не указано, применяется выравнивание вправо. + * Число дополняется до заданной ширины, если оно короче. Если длиннее, то выводится всё число. + * - f::wp: То же самое, что и f::w<-1>. В этом случае ширина должна передаваться дополнительным аргументом e_int. + * @en @brief Creates an object that is converted to a string expression that generates a string representation of a number. + * @tparam R - Number base, must be from 2 to 36. + * @tparam fp - parameters for format number. + * @tparam T - number type, deduced from the argument. + * @param v - number. + * @return the source for the string expression expr_integer_src. + * @details number formatting parameters are specified by a set of constants, via '|'. + * - f::l: when setting the field width, align to the left. + * - f::r: when setting the field width, align to the right. + * - f::с: when setting the field width, align to the center. + * - f::p: print number system prefix, 0b for 2, 0 for 8, 0x for 16. + * - f::z: pad the number to the specified width with zeros on the right. Not compatible with alignment options. + * - f::u: For number systems greater than 10, output characters in uppercase. + * - f::sp: For signed number types, print '+' before the number for positive values. + * - f::ss: For signed number types, print a space before the number for positive values. + * - f::f<'c'>: Specifies a placeholder character when specifying the field width. Default is space. + * - f::w: Sets the field width. When specifying the width, you can either specify the desired alignment (r, l, c), + * or zero padding (z), but not both. If none of these are specified, right alignment is applied. + * The number is padded to the given width if it is shorter. If it is longer, then the entire number is displayed. + * - f::wp: Same as f::w<-1>. In this case, the width must be passed as an additional argument e_int. + * + * @ru Пример: @en Example: @~ + * ```cpp + * stringu u16t = u"Number "_ss + num + " in octal is " + e_int<8, f::w<16> | f::z>(num) + + * ", in bin is " + e_int<2, f::w<32> | f::p | f::z>(num); + * ``` + */ +template requires good_int_flags, false> +constexpr auto e_int(T v) { + using fmt_param = f::to_fmt_t; + return expr_integer_src{v}; +} +/*! + * @ru @brief То же самое, что `e_int(num)`, только дополнительно передаётся ширина поля. + * @en @brief Same as `e_int(num)`, only the field width is additionally specified. + */ +template requires good_int_flags, true> +constexpr auto e_int(T v, unsigned w) { + using fmt_param = f::to_fmt_t; + return expr_integer_src{v, w}; +} + template struct expr_real : expr_to_std_string> { using symb_type = K; @@ -1753,11 +2252,6 @@ struct expr_hex_src { Val v_; }; -template -constexpr K hex_symbols[16] = {K('0'), K('1'), K('2'), K('3'), K('4'), K('5'), K('6'), - K('7'), K('8'), K('9'), K(Ucase ? 'A' : 'a'), K(Ucase ? 'B' : 'b'), K(Ucase ? 'C' : 'c'), - K(Ucase ? 'D' : 'd'), K(Ucase ? 'E' : 'e'), K(Ucase ? 'F' : 'f')}; - template struct expr_hex : expr_to_std_string> { using symb_type = K; @@ -1771,11 +2265,11 @@ struct expr_hex : expr_to_std_string> { K *ptr = buf_ + std::size(buf_); size_t l = 0; for (;;) { - *--ptr = hex_symbols[v_.val & 0xF]; + *--ptr = digits_symbols[v_.val & 0xF]; v_.val >>= 4; l++; if (v_.val) { - *--ptr = hex_symbols[v_.val & 0xF]; + *--ptr = digits_symbols[v_.val & 0xF]; v_.val >>= 4; l++; } @@ -5355,26 +5849,57 @@ template using to_str_exp_t = decltype(to_subst(std::declval())); /*! - * @ru @brief Строковое выражение для объединения более чем одного строкового выражения, с указанием разделителя. - * Создаётся при вызове функции `e_concat`. - * @tparam K - тип символов. - * @tparam G - тип разделителя. - * @tparam Args... - типы строковых выражений. - * @en @brief A string expression for concatenating more than one string expression, specifying a separator. - * Created when calling the `e_concat` function. - * @tparam K - character type. - * @tparam G - separator type. - * @tparam Args... - string expression types. */ + * @ingroup StrExprs + * @ru @brief Строковое выражения, объединяющее указанные строковые выражения, с использованием заданного разделителя. + * @tparam K - тип символов, выводится из типа разделителя. + * @en @brief String expression concatenating the specified string expressions using the specified delimiter. + * @tparam K - character type, deduced from the separator type. + */ template -struct expr_concat : expr_to_std_string> { +struct e_concat : expr_to_std_string> { using symb_type = K; - using store_t = std::tuple; - G glue_; - Arg arg_; + using store_t = std::tuple...>; + using arg_t = to_str_exp_t; + to_str_exp_t glue_; + arg_t arg_; store_t args_; mutable size_t glue_len_; - - constexpr expr_concat(G&& glue, Arg&& arg, Args&&...args) : glue_(std::forward(glue)), arg_(std::forward(arg)), args_(std::forward(args)...) {} + /*! + * @ru @brief Создание строкового выражения, объединяющего указанные строковые выражения, с использованием заданного разделителя. + * @param glue - "клей", используемый при соединении аргументов, вставляется между ними. + * @param arg, args... - объединяемые аргументы, не менее двух. + * @details "Склеивает" переданные аргументы, вставляя между ними заданный "клей". + * Соединителем и аргументами могут быть строковые литералы, строковые выражения, стандартные строки. + * Аргументами также могут быть любые типы, для которых есть преобразование в строковое выражение. + * (см. @ref ConvertToStrExpr "Конвертация типов в в строковые выражения"). + * Для аргументов, которые сами являются строковыми выражениями, `e_concat` сохраняет только ссылку на них. + * Обычно это не является проблемой, если ссылка не на временный объект, или строковое выражение материализуется + * сейчас же, до ';'. Если же вам необходимо вернуть `e_concat` как строковое выражение из функции, + * можно заставить его сохранить аргументы строковые выражения по копии, обернув их в `force_copy{}`. + * См. пример в tests/test_tostrexpr.cpp, Method4. + * @en @brief Create a string expression concatenating the specified string expressions using the specified delimiter. + * @param glue - the "glue" used when connecting arguments is inserted between them. + * @param arg, args... - the arguments to be combined, at least two. + * @details "Glues" the passed arguments, inserting the specified "glue" between them. + * The connector and arguments can be string literals, string expressions, standard strings. + * Arguments can also be any type for which there is a conversion to a string expression. + * (see @ref ConvertToStrExpr "Converting types to string expressions"). + * For arguments that are themselves string expressions, `e_concat` stores only a reference to them. + * This is usually not a problem if the reference is not to a temporary object, or the string expression is materialized + * now, before ';'. If you need to return `e_concat` as a string expression from a function, + * you can force it to preserve string expression arguments over a copy by wrapping them in `force_copy{}`. + * See tests/test_tostrexpr.cpp, Method4 for an example. + * @ru Пример: @en Example @~ + * ```cpp + * std::string t = e_concat("", text, " = ", count, " times."); + * .... + * std::string t = "msg=" + e_concat(", ", text1, text3, text3, count1, count2); + * ``` + */ + constexpr e_concat(G&& glue, Arg&& arg, Args&&...args) + : glue_(to_subst(std::forward(glue))) + , arg_(to_subst(std::forward(arg))) + , args_(to_subst(std::forward(args))...) {} constexpr size_t length() const noexcept { return [this](std::index_sequence) { @@ -5386,7 +5911,7 @@ struct expr_concat : expr_to_std_string> { } constexpr K* place(K* ptr) const noexcept { return [this](K* ptr, std::index_sequence) { - ptr = (K*)arg_.place((typename std::remove_cvref_t::symb_type*)ptr); + ptr = (K*)arg_.place((typename std::remove_cvref_t::symb_type*)ptr); const K* glueStart = ptr; ptr = glue_.place(ptr); ( @@ -5399,51 +5924,9 @@ struct expr_concat : expr_to_std_string> { }(ptr, std::make_index_sequence()); } }; - -/*! - * @ingroup StrExprs - * @ru @brief Создание строкового выражения, объединяющего указанные строковые выражения, с использованием - * заданного разделителя. - * @tparam T - тип разделителя, выводится из аргумента. - * @tparam K - тип символов, выводится из типа разделителя. - * @tparam Args... - склеиваемые аргументы. - * @param glue - "клей", используемый при соединении аргументов, вставляется между ними. - * @param args... - объединяемые аргументы, не менее двух. - * @details "Склеивает" переданные аргументы, вставляя между ними заданный "клей". - * Соединителем и аргументами могут быть строковые литералы, строковые выражения, стандартные строки. - * Аргументами также могут быть любые типы, для которых есть преобразование в строковое выражение. - * (см. @ref ConvertToStrExpr "Конвертация типов в в строковые выражения"). - * Для аргументов, которые сами являются строковыми выражениями, `e_concat` сохраняет только ссылку на них. - * Обычно это не является проблемой, если ссылка не на временный объект, или строковое выражение материализуется - * сейчас же, до ';'. Если же вам необходимо вернуть `e_concat` как строковое выражение из функции, - * можно заставить его сохранить аргументы строковые выражения по копии, обернув их в `force_copy{}`. - * См. пример в tests/test_tostrexpr.cpp, Method4. - * @en @brief Create a string expression concatenating the specified string expressions using the specified delimiter. - * @tparam T - delimiter type, deduced from the argument. - * @tparam K - character type, deduced from the separator type. - * @tparam Args... - arguments to be merged. - * @param glue - the "glue" used when connecting arguments is inserted between them. - * @param args... - the arguments to be combined, at least two. - * @details "Glues" the passed arguments, inserting the specified "glue" between them. - * The connector and arguments can be string literals, string expressions, standard strings. - * Arguments can also be any type for which there is a conversion to a string expression. - * (see @ref ConvertToStrExpr "Converting types to string expressions"). - * For arguments that are themselves string expressions, `e_concat` stores only a reference to them. - * This is usually not a problem if the reference is not to a temporary object, or the string expression is materialized - * now, before ';'. If you need to return `e_concat` as a string expression from a function, - * you can force it to preserve string expression arguments over a copy by wrapping them in `force_copy{}`. -* See tests/test_tostrexpr.cpp, Method4 for an example. - * @ru Пример: @en Example @~ - * ```cpp - * std::string t = e_concat("", text, " = ", count, " times."); - * .... - * std::string t = "msg=" + e_concat(", ", text1, text3, text3, count1, count2); - * ``` - */ -template, typename ... Args> requires (sizeof...(Args) > 1) -constexpr expr_concat, to_str_exp_t...> e_concat(T&& glue, Args&&...args) { - return { to_subst(std::forward(glue)), to_subst(std::forward(args))...}; -} +// CTAD deducing rule for e_concat +template requires (sizeof...(Args) > 1) +e_concat(T&&, Args&&...) -> e_concat, T, Args...>; struct parse_subst_string_error { parse_subst_string_error(const char*){} @@ -5452,7 +5935,7 @@ struct parse_subst_string_error { namespace details { template -constexpr size_t parse_pattern_string(str_src pattern, const auto& add_part, const auto& add_param) { +constexpr size_t parse_pattern_string(str_src pattern, auto&& add_part, auto&& add_param) { char used_args[NParams] = {0}; const K* first = pattern.begin(), *last = pattern.end(), *start = first; size_t all_len = 0; @@ -5466,10 +5949,9 @@ constexpr size_t parse_pattern_string(str_src pattern, const auto& add_part, } return from; }; - size_t idx_in_data = 0, idx_in_params = 0; + size_t idx_in_params = 0; while (first != last) { - bool cont = false; const K* open_pos = first; if (*first != '{') { open_pos = find(first, last, '{'); @@ -5477,16 +5959,9 @@ constexpr size_t parse_pattern_string(str_src pattern, const auto& add_part, for (;;) { const K* close_pos = find(first, open_pos, '}'); if (close_pos == open_pos) { - if (open_pos < last && open_pos[1] == '{') { - unsigned len = open_pos - first + 1; - all_len += len; - add_part(first - start, len); - first = open_pos + 2; - cont = true; - } else if (unsigned len = open_pos - first) { - add_part(first - start, len); - all_len += len; - } + unsigned len = open_pos - first; + add_part(first - start, len); + all_len += len; break; } ++close_pos; @@ -5502,10 +5977,6 @@ constexpr size_t parse_pattern_string(str_src pattern, const auto& add_part, break; } } - if (cont) { - continue; - } - if (++open_pos == last) { throw parse_subst_string_error{"unescaped {"}; } @@ -5513,6 +5984,9 @@ constexpr size_t parse_pattern_string(str_src pattern, const auto& add_part, if (idx_in_params == -1) { throw parse_subst_string_error{"already used param ids"}; } + if (idx_in_params == NParams) { + throw parse_subst_string_error{"too many params"}; + } used_args[idx_in_params] = 1; add_param(idx_in_params++); first = open_pos + 1; @@ -5570,47 +6044,88 @@ struct portion { } }; -template +template struct subst_params { - - inline static constexpr size_t NParams = sizeof...(Args); - inline static constexpr size_t PtLen = const_lit::Count; - - Pt source_; + const K(&source_)[PtLen]; unsigned all_len_{}; unsigned actual_{}; // The pattern string can be divided into a maximum of this number of portions. - // "a{}a{}a{}a" - Two portions of one symbol from the edges, and two portions for every three symbols - portion portions_[2 + (PtLen - 1) * 2 / 3]{}; + // "a{}a{}a{}a" - One portion of one symbol from the edge, and two portions for every three symbols + portion portions_[1 + ((PtLen - 2) * 2 / 3)]{}; - consteval subst_params(Pt&& pattern) : source_(pattern) { - all_len_ = parse_pattern_string(pattern, [this](unsigned from, unsigned len){ - portions_[actual_++].set_part(from, len); - }, [&, this](unsigned param) { - portions_[actual_++].set_param(param); - }); + consteval subst_params(const K(&pattern)[PtLen]) : source_(pattern) { + all_len_ = parse_pattern_string(pattern, + [this](unsigned from, unsigned len) { + portions_[actual_++].set_part(from, len); + }, [this](unsigned param) { + portions_[actual_++].set_param(param); + }); } }; } // namespace details -template -struct expr_subst : expr_to_std_string> { - inline static constexpr size_t Nparams = sizeof...(Args); +/*! + * @ingroup StrExprs + * @ru @brief Строковое выражение, которое подставляет в заданные места в строковом литерале - образце значения переданных строковых выражений. + * @en @brief String expression that substitutes the values ​​of the passed string expressions into the specified places in a string literal. + */ +template +struct e_subst : expr_to_std_string> { + inline static constexpr size_t NParams = sizeof...(Args); using symb_type = K; using store_t = std::tuple...>; - const details::subst_params& subst_; + const details::subst_params& subst_; store_t args_; - - constexpr expr_subst(const details::subst_params& subst, Args&&...args) + /*! + * @ru @brief Создает строковое выражение, которое подставляет в заданные места в строковом литерале - образце значения переданных строковых выражений. + * @param pattern - распарсенная во время компиляции информация составе строки-шаблона, содержит длины текстовых порций и места вставки параметров. + * Создается автоматически из переданного строкового литерала. + * @param args... - аргументы, которые будут подставляться в заданные места образца. Также, как и в `e_concat`, могут быть строковые литералы, + * строковые выражения, стандартные строки, а также любые типы, для которых есть преобразование в строковое выражение. + * @details Функция создаёт строковое выражение, которое при материализации генерирует текст из образца, подставляя в места подстановки + * значения переданных аргументов. Строка-образец задается строковым литералом, константной времени компиляции. + * Места вставки обозначаются либо как `{}`, либо как `{номер}`. + * В случае без указания номера, параметры подставляются в переданном в функцию порядке. В случае указания номера, параметры подставляются в соответствии + * с указанным порядковым номером. Нумерация параметров начинается с 1. Смешивать параметры без номера и с номером нельзя - используется только + * один из вариантов для всех подстановок. В случае указания номеров - один параметр может участвовать в нескольких подстановках. + * Все переданные параметры должны участвовать в подстановках. Для вставки самих фигурных скобок они должны удваиваться - `{{`, `}}`. + * Строка-образец обрабатывается во время компиляции, и для неё сразу создаётся массив с информацией о вставках - какие части строки копировать + * в результат, в какие места вставлять переданные значения. + * Функция не является заменой `std::format`, не работает с образцом, задаваемым в рантайм, и не поддерживает каких-либо параметров форматирования + * подставляемых значений. Все передаваемые аргументы должны сами уметь преобразовывать себя в строковые выражения + * (см. @ref ConvertToStrExpr "Конвертация типов в в строковые выражения"). + * @en @brief Creates a string expression that substitutes the values ​​of the passed string expressions into the specified places in a string literal. + * @param pattern - information parsed during compilation in the template string, containing the lengths of text chunks and places to insert parameters. + * Created automatically from the passed string literal. + * @param args... - arguments that will be inserted into the specified places in the sample. Also, as in `e_concat`, there can be string literals, + * string expressions, standard strings, as well as any types for which there is a conversion to a string expression. + * @details The function creates a string expression, which, when materialized, generates text from the sample, substituting it in placeholders + * values ​​of the passed arguments. The pattern string is specified by a string literal, a compile-time constant. + * Insertion locations are indicated by either `{}` or `{number}`. + * In case without spectacle number, the parameters are submitted to the order of order. In case of the index number, the parameters are submitted in accordance with + * with the specified serial number. The numbering of parameters starts from 1. You cannot mix parameters without a number and with a number - only used + * one of the options for all substitutions. In the case of specifying numbers, one parameter can participate in several substitutions. + * All passed parameters must participate in substitutions. To insert curly braces themselves, they must be doubled - `{{`, `}}`. + * The sample string is processed during compilation, and an array is immediately created for it with information about insertions - which parts of the string to copy + * in the result, where to insert the passed values. + * The function is not a replacement for `std::format`, does not work with the sample specified at runtime, and does not support any formatting options + * for substituted values. All passed arguments must be able to convert themselves to string expressions + * (see @ref ConvertToStrExpr "Converting types to string expressions"). + * @ru Пример: @en Example: @~ + * ```cpp + * lstringu<100> u16t = e_subst(u"Test {} from {}, {}.", from, total, success ? u"success"_ss : u"fail"_ss); + * ``` + */ + constexpr e_subst(const details::subst_params& subst, Args&&...args) : subst_(subst) , args_(to_subst(std::forward(args))...){} constexpr size_t length() const noexcept { return [this](std::index_sequence) { size_t idx = 0; - size_t expr_length_[Nparams] = {}; + size_t expr_length_[NParams] = {}; ((expr_length_[idx++] = std::get(args_).length()),...); size_t l = subst_.all_len_; for (idx = 0; idx < subst_.actual_; idx++) { @@ -5626,12 +6141,11 @@ struct expr_subst : expr_to_std_string> { if (idx == Idx) { return (K*)std::get(args_).place((typename std::remove_cvref_t>::symb_type*)ptr); } - if constexpr (Idx < Nparams - 1) { + if constexpr (Idx < NParams - 1) { return place_idx(ptr, idx); } return ptr; } - constexpr K* place(K* ptr) const noexcept { for (size_t idx = 0; idx < subst_.actual_; idx++) { if (subst_.portions_[idx].is_param) { @@ -5645,36 +6159,88 @@ struct expr_subst : expr_to_std_string> { } }; +// CTAD deducing rule for e_subst +template requires (sizeof...(Args) > 0) +e_subst(const K(&)[N], Args&&...) -> e_subst; + +/*! + * @ingroup StrExprs + * @ru @brief Строковое выражение, которое подставляет в заданные места в строке-образце, задаваемой в рантайме, значения переданных строковых выражений. + * @en @brief String expression that substitutes the values ​​of the passed string expressions into the specified positions in the pattern string, specified at runtime. + */ template -struct expr_vsubst : expr_to_std_string> { +struct e_vsubst : expr_to_std_string> { inline static constexpr size_t Nparams = sizeof...(Args); using symb_type = K; using store_t = std::tuple...>; - details::portion portions_[Nparams * 2 + 1]; + details::portion portions_[Nparams * 3]; std::vector more_portions_; store_t args_; str_src pattern_; size_t all_len_{}; unsigned actual_{}; - - constexpr expr_vsubst(str_src pattern, Args&&...args) + /*! + * @ru @brief Создает строковое выражение, которое подставляет в заданные места в строке-образце, задаваемой в рантайме, значения переданных строковых выражений. + * @param pattern - Строковый объект-образец, в который будут подставляться значения переданных аргументов. + * @param args... - аргументы, которые будут подставляться в заданные места образца. Также, как и в `e_concat`, могут быть строковые литералы, + * строковые выражения, стандартные строки, а также любые типы, для которых есть преобразование в строковое выражение. + * @details Функция создаёт строковое выражение, которое при материализации генерирует текст из образца, подставляя в места подстановки + * значения переданных аргументов. Строка-образец задается в рантайм, строковым объектом, парсинг которого происходит во время выполнения. + * Места вставки обозначаются либо как `{}`, либо как `{номер}`. + * В случае без указания номера, параметры подставляются в переданном в функцию порядке. В случае указания номера, параметры подставляются в соответствии + * с указанным порядковым номером. Нумерация параметров начинается с 1. Смешивать параметры без номера и с номером нельзя - используется только + * один из вариантов для всех подстановок. В случае указания номеров - один параметр может участвовать в нескольких подстановках. + * Все переданные параметры должны участвовать в подстановках. В случае ошибки парсинга строки будет выкинуто исключение `parse_subst_string_error`. + * Для вставки самих фигурных скобок они должны удваиваться - `{{`, `}}`. + * Функция не является заменой `std::vformat`, не работает с образцом, задаваемым в compile-time, и не поддерживает каких-либо параметров форматирования + * подставляемых значений. Все передаваемые аргументы должны сами уметь преобразовывать себя в строковые выражения + * (см. @ref ConvertToStrExpr "Конвертация типов в в строковые выражения"). + * @en @brief Creates a string expression that substitutes the values ​​of the passed string expressions into the specified positions in the pattern string, specified at runtime. + * @param pattern - the pattern string object into which the values ​​of the passed arguments will be substituted. + * @param args... - the arguments to be substituted into the specified positions in the pattern. As in `e_concat`, these can be string literals, + * string expressions, standard strings, and any types that can be converted to string expressions. + * @details The function creates a string expression that, when materialized, generates text from the pattern, substituting the values ​​of the passed arguments into the + * substitution positions. The pattern string is specified at runtime by a string object that is parsed at runtime. + * Insertion points are designated either as `{}` or `{number}`. + * If no number is specified, parameters are substituted in the order passed to the function. If a number is specified, parameters are substituted according to the + * specified ordinal number. Parameter numbering starts with 1. You cannot mix parameters with and without numbers; only one of the options is used for all substitutions. If numbers are specified, one parameter can participate in multiple substitutions. + * All passed parameters must participate in substitutions. If a string parsing error occurs, a `parse_subst_string_error` exception will be thrown. + * To insert the curly braces themselves, they must be doubled - `{{`, `}}`. + * This function is not a replacement for `std::vformat`, does not work with the pattern specified at compile-time, and does not support any formatting options for + * substituted values. All passed arguments must be able to convert themselves to string expressions. + * (See @ref ConvertToStrExpr "Converting Types to String Expressions"). + * @ru Пример: @en Example: @~ + * ```cpp + * std::string_view pattern; + * ..... + * lstringa<100> text = e_vsubst(pattern, from, total, success ? "success"_ss : "fail"_ss); + * ``` + */ + constexpr e_vsubst(str_src pattern, Args&&...args) : pattern_(pattern) , args_(to_subst(std::forward(args))...) { all_len_ = details::parse_pattern_string(pattern_, [this](unsigned from, unsigned len) { - if (actual_ < std::size(portions_) - 1) { - portions_[actual_++].set_part(from, len); - } else { - more_portions_.emplace_back().set_part(from, len); + if (actual_ < std::size(portions_)) { + portions_[actual_++].set_part(from, len); + } else { + if (actual_ == std::size(portions_)) { + more_portions_.reserve((pattern_.len - 1) * 2 / 3 - std::size(portions_)); + } + more_portions_.emplace_back().set_part(from, len); + } + }, [this](unsigned param) { + if (actual_ < std::size(portions_)) { + portions_[actual_++].set_param(param); + } else { + if (actual_ == std::size(portions_)) { + more_portions_.reserve((pattern_.len - 1) * 2 / 3 - std::size(portions_)); + } + more_portions_.emplace_back().set_param(param); + } } - }, [&, this](unsigned param) { - if (actual_ < std::size(portions_) - 1) { - portions_[actual_++].set_param(param); - } else { - more_portions_.emplace_back().set_param(param); - } - }); + ); } constexpr size_t length() const noexcept { return [this](std::index_sequence) { @@ -5718,117 +6284,20 @@ struct expr_vsubst : expr_to_std_string> { if (p.is_param) { ptr = place_idx<0>(ptr, p.start); } else { - ch_traits::copy(ptr, pattern_.symbols() + p.start, p.len); - ptr += p.len; + const K* from = pattern_.symbols() + p.start; + for (size_t idx = p.len; idx--;) { + *ptr++ = *from++; + } + //ch_traits::copy(ptr, pattern_.symbols() + p.start, p.len); + //ptr += p.len; } } return ptr; } }; - -/*! - * @ingroup StrExprs - * @ru @brief Создает строковое выражение, которое подставляет в заданные места в строковом литерале - образце значения переданных строковых выражений. - * @tparam T - тип строки-образца, выводится из аргумента. - * @tparam Args... - типы переданных аргументов. - * @param str_pattern - Строка-образец, строковый литерал, служит для вывода типа символов выражения и получения длины образца во время компиляции. - * @param pattern - распарсенная во время компиляции информация составе строки-шаблона, содержит длины текстовых порций и места вставки параметров. - * @param args... - аргументы, которые будут подставляться в заданные места образца. Также, как и в `e_concat`, могут быть строковые литералы, - * строковые выражения, стандартные строки, а также любые типы, для которых есть преобразование в строковое выражение. - * @details Функция создаёт строковое выражение, которое при материализации генерирует текст из образца, подставляя в места подстановки - * значения переданных аргументов. Строка-образец задается строковым литералом, константной времени компиляции. - * Места вставки обозначаются либо как `{}`, либо как `{номер}`. - * В случае без указания номера, параметры подставляются в переданном в функцию порядке. В случае указания номера, параметры подставляются в соответствии - * с указанным порядковым номером. Нумерация параметров начинается с 1. Смешивать параметры без номера и с номером нельзя - используется только - * один из вариантов для всех подстановок. В случае указания номеров - один параметр может участвовать в нескольких подстановках. - * Все переданные параметры должны участвовать в подстановках. Для вставки самих фигурных скобок они должны удваиваться - `{{`, `}}`. - * Строка-образец обрабатывается во время компиляции, и для неё сразу создаётся массив с информацией о вставках - какие части строки копировать - * в результат, в какие места вставлять переданные значения. Из-за невозможности вывести компилятором тип для объекта с этой информацией напрямую из - * строкового литерала, его приходится указывать дважды - первый раз как параметр для вывода типа, второй - как параметр для конструктора - * типа, выведенного из первого параметра. Для упрощения задания образца используется макрос `S_FRM("образец{}")`, который просто повторяет параметр - * два раза. - * Функция не является заменой `std::format`, не работает с образцом, задаваемым в рантайм, и не поддерживает каких-либо параметров форматирования - * подставляемых значений. Все передаваемые аргументы должны сами уметь преобразовывать себя в строковые выражения - * (см. @ref ConvertToStrExpr "Конвертация типов в в строковые выражения"). - * @en @brief Creates a string expression that substitutes the values ​​of the passed string expressions into the specified places in a string literal. - * @tparam T - type of the pattern string, inferred from the argument. - * @tparam Args... - types of arguments passed. - * @param str_pattern - The pattern string, a string literal, is used to infer the character type of an expression and obtain the length of the pattern at compile time. - * @param pattern - information parsed during compilation in the template string, containing the lengths of text chunks and places to insert parameters. - * @param args... - arguments that will be inserted into the specified places in the sample. Also, as in `e_concat`, there can be string literals, - * string expressions, standard strings, as well as any types for which there is a conversion to a string expression. - * @details The function creates a string expression, which, when materialized, generates text from the sample, substituting it in placeholders - * values ​​of the passed arguments. The pattern string is specified by a string literal, a compile-time constant. - * Insertion locations are indicated by either `{}` or `{number}`. - * In case without spectacle number, the parameters are submitted to the order of order. In case of the index number, the parameters are submitted in accordance with - * with the specified serial number. The numbering of parameters starts from 1. You cannot mix parameters without a number and with a number - only used - * one of the options for all substitutions. In the case of specifying numbers, one parameter can participate in several substitutions. - * All passed parameters must participate in substitutions. To insert curly braces themselves, they must be doubled - `{{`, `}}`. - * The sample string is processed during compilation, and an array is immediately created for it with information about insertions - which parts of the string to copy - * in the result, where to insert the passed values. Because the compiler cannot deduced the type for an object with this information directly from - * a string literal, it has to be specified twice - the first time as a parameter for type deducing, the second time as a parameter for the constructor - * the type deduced from the first parameter. To simplify specifying a sample, use the macro `S_FRM("sample{}")`, which simply repeats the parameter twice. - * The function is not a replacement for `std::format`, does not work with the sample specified at runtime, and does not support any formatting options - * for substituted values. All passed arguments must be able to convert themselves to string expressions - * (see @ref ConvertToStrExpr "Converting types to string expressions"). - * @ru Пример: @en Example: @~ - * ```cpp - * lstringu<100> u16t = e_subst(S_FRM(u"Test {} from {}, {}."), from, total, success ? u"success"_ss : u"fail"_ss); - * ``` - */ -template requires (sizeof...(Args) > 0) -constexpr auto e_subst(T&& str_pattern, const details::subst_params::symb_type, std::type_identity_t, std::type_identity_t...>& pattern, Args&&...args) { - return expr_subst::symb_type, T, Args...>{pattern, std::forward(args)...}; -} - -#define S_FRM(s) s, s - -/*! - * @ingroup StrExprs - * @ru @brief Создает строковое выражение, которое подставляет в заданные места в строке-образце, задаваемой в рантайме, значения переданных строковых выражений. - * @tparam T - тип строки-образца, выводится из аргумента. - * @tparam Args... - типы переданных аргументов. - * @param str_pattern - Строковый объект-образец, в который будут подставляться значения переданных аргументов. - * @param args... - аргументы, которые будут подставляться в заданные места образца. Также, как и в `e_concat`, могут быть строковые литералы, - * строковые выражения, стандартные строки, а также любые типы, для которых есть преобразование в строковое выражение. - * @details Функция создаёт строковое выражение, которое при материализации генерирует текст из образца, подставляя в места подстановки - * значения переданных аргументов. Строка-образец задается в рантайм, строковым объектом, парсинг которого происходит во время выполнения. - * Места вставки обозначаются либо как `{}`, либо как `{номер}`. - * В случае без указания номера, параметры подставляются в переданном в функцию порядке. В случае указания номера, параметры подставляются в соответствии - * с указанным порядковым номером. Нумерация параметров начинается с 1. Смешивать параметры без номера и с номером нельзя - используется только - * один из вариантов для всех подстановок. В случае указания номеров - один параметр может участвовать в нескольких подстановках. - * Все переданные параметры должны участвовать в подстановках. В случае ошибки парсинга строки будет выкинуто исключение `parse_subst_string_error`. - * Для вставки самих фигурных скобок они должны удваиваться - `{{`, `}}`. - * Функция не является заменой `std::vformat`, не работает с образцом, задаваемым в compile-time, и не поддерживает каких-либо параметров форматирования - * подставляемых значений. Все передаваемые аргументы должны сами уметь преобразовывать себя в строковые выражения - * (см. @ref ConvertToStrExpr "Конвертация типов в в строковые выражения"). - * @en @brief Creates a string expression that substitutes the values ​​of the passed string expressions into the specified positions in the pattern string, specified at runtime. - * @tparam T - the type of the pattern string, deduced from the argument. - * @tparam Args... - the types of the passed arguments. - * @param str_pattern - the pattern string object into which the values ​​of the passed arguments will be substituted. - * @param args... - the arguments to be substituted into the specified positions in the pattern. As in `e_concat`, these can be string literals, - * string expressions, standard strings, and any types that can be converted to string expressions. - * @details The function creates a string expression that, when materialized, generates text from the pattern, substituting the values ​​of the passed arguments into the - * substitution positions. The pattern string is specified at runtime by a string object that is parsed at runtime. - * Insertion points are designated either as `{}` or `{number}`. - * If no number is specified, parameters are substituted in the order passed to the function. If a number is specified, parameters are substituted according to the - * specified ordinal number. Parameter numbering starts with 1. You cannot mix parameters with and without numbers; only one of the options is used for all substitutions. If numbers are specified, one parameter can participate in multiple substitutions. - * All passed parameters must participate in substitutions. If a string parsing error occurs, a `parse_subst_string_error` exception will be thrown. - * To insert the curly braces themselves, they must be doubled - `{{`, `}}`. - * This function is not a replacement for `std::vformat`, does not work with the pattern specified at compile-time, and does not support any formatting options for - * substituted values. All passed arguments must be able to convert themselves to string expressions. - * (See @ref ConvertToStrExpr "Converting Types to String Expressions"). - * @ru Пример: @en Example: @~ - * ```cpp - * std::string_view pattern; - * ..... - * lstringa<100> text = e_vsubst(pattern, from, total, success ? "success"_ss : "fail"_ss); - * ``` - */ +// CTAD deducing rule for e_vsubst template requires (sizeof...(Args) > 0) -constexpr auto e_vsubst(T&& str_pattern, Args&&...args) { - return expr_vsubst, Args...>{str_pattern, std::forward(args)...}; -} +e_vsubst(T&&, Args&&...) -> e_vsubst, Args...>; /*! * @ru @brief Небольшое пространство для методов работы со стандартными строками. diff --git a/readme.md b/readme.md index 04f6f70..fecf0a3 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,7 @@ [![CMake on multiple platforms](https://github.com/orefkov/simstr/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/orefkov/simstr/actions/workflows/cmake-multi-platform.yml) -Version 1.6.2. +Version 1.6.3.

    Speed up your work with strings by 2-10 times!

    @@ -323,8 +323,8 @@ function(add_simstr) simstr GIT_REPOSITORY https://github.com/orefkov/simstr.git GIT_SHALLOW TRUE - GIT_TAG tags/rel1.6.2 # Specify the desired release - FIND_PACKAGE_ARGS NAMES simstr 1.6.2 + GIT_TAG tags/rel1.6.3 # Specify the desired release + FIND_PACKAGE_ARGS NAMES simstr 1.6.3 ) FetchContent_MakeAvailable(simstr) endfunction() diff --git a/readme_ru.md b/readme_ru.md index b44bd5f..06776df 100644 --- a/readme_ru.md +++ b/readme_ru.md @@ -3,7 +3,7 @@ [![CMake on multiple platforms](https://github.com/orefkov/simstr/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/orefkov/simstr/actions/workflows/cmake-multi-platform.yml) -Версия 1.6.2. +Версия 1.6.3.

    Ускорь работу со строками в 2-10 раз!

    @@ -324,8 +324,8 @@ function(add_simstr) simstr GIT_REPOSITORY https://github.com/orefkov/simstr.git GIT_SHALLOW TRUE - GIT_TAG tags/rel1.6.2 # Укажите нужный релиз - FIND_PACKAGE_ARGS NAMES simstr 1.6.2 + GIT_TAG tags/rel1.6.3 # Укажите нужный релиз + FIND_PACKAGE_ARGS NAMES simstr 1.6.3 ) FetchContent_MakeAvailable(simstr) endfunction() diff --git a/src/sstring.cpp b/src/sstring.cpp index 0df290b..1c84650 100644 --- a/src/sstring.cpp +++ b/src/sstring.cpp @@ -1,5 +1,5 @@ /* - * ver. 1.6.2 + * ver. 1.6.3 * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * Реализация строковых функций * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com diff --git a/tests/test_expr_only.cpp b/tests/test_expr_only.cpp index 31ab82d..c60c82f 100644 --- a/tests/test_expr_only.cpp +++ b/tests/test_expr_only.cpp @@ -1,5 +1,5 @@ /* - * ver. 1.6.2 + * ver. 1.6.3 * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * Тесты simstr * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com @@ -8,6 +8,7 @@ #include "../include/simstr/strexpr.h" #include +#include #include using namespace std::literals; @@ -325,12 +326,12 @@ TEST(StrExpr, Concat) { TEST(StrExpr, Subst) { const auto ttt = "test"_ss; int ii = 3; - std::string t = e_subst(S_FRM("Test {{--}} {}=, {}"), ttt, ii); + std::string t = e_subst("Test {{--}} {}=, {}", ttt, ii); EXPECT_EQ(t, "Test {--} test=, 3"); - t = e_subst(S_FRM("Test {2}={1}, {2}, {1}"), "test", 2); + t = e_subst("Test {2}={1}, {2}, {1}", "test", 2); EXPECT_EQ(t, "Test 2=test, 2, test"); - std::u16string u16t = e_subst(S_FRM(u"Test {}={}, {}"), u"test", 2, u"test"sv); + std::u16string u16t = e_subst(u"Test {}={}, {}", u"test", 2, u"test"sv); EXPECT_EQ(u16t, u"Test test=2, test"); } @@ -344,4 +345,58 @@ TEST(StrExpr, VSubst) { EXPECT_EQ(t, "abc-abc-abc-abc-abc-abc-abc-abc"); } +TEST(StrExpr, EInt) { + std::string kk = eea + e_int<10, f::c | f::w<10> | f::f<'_'> | f::sp>(123); + EXPECT_EQ(kk, "___+123___"); + std::u16string uk = eeu + e_int<2, f::p>(123); + EXPECT_EQ(uk, u"0b1111011"); + + kk = eea + e_int<2, f::p | f::w<11> | f::z>(123); + std::string kf = std::format("{:#011b}", 123); + + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::p | f::w<11> | f::z>(-123); + kf = std::format("{:#011b}", -123); + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::p | f::w<11> | f::z | f::sp>(123); + kf = std::format("{:+#011b}", 123); + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::p | f::w<11> | f::z | f::sp>(-123); + kf = std::format("{:+#011b}", -123); + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::p | f::w<11> | f::z | f::ss>(123); + kf = std::format("{: #011b}", 123); + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::p | f::w<11> | f::z | f::ss>(-123); + kf = std::format("{: #011b}", -123); + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::w<11> | f::r | f::f<'_'>| f::ss>(-123); + kf = std::format("{:_> 11b}", -123); + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::w<11> | f::r | f::f<'_'>| f::ss>(123); + kf = std::format("{:_> 11b}", 123); + EXPECT_EQ(kk, kf); + + kk = eea + e_int<2, f::p | f::w<11> | f::r | f::f<'_'>| f::ss>(123); + kf = std::format("{:_> #11b}", 123); + EXPECT_EQ(kk, kf); + + //EXPECT_EQ(kk, "0b001111011"); + //std::cout << std::format("'{:+#011b}'\n", 123); + + //std::cout << std::format("'{:+#011b}'\n", -123); + //EXPECT_EQ(kk, std::format("{:#011b}", -123)); + + std::u32string uu = eeuu + e_int<16, f::wp | f::p | f::u | f::z/* | f::r*/>(123, 9); + EXPECT_EQ(uu, U"0x000007B"); +} + + } // namespace simstr::tests diff --git a/tests/test_str.cpp b/tests/test_str.cpp index 5090b34..0fc7827 100644 --- a/tests/test_str.cpp +++ b/tests/test_str.cpp @@ -1,5 +1,5 @@ /* - * ver. 1.6.2 + * ver. 1.6.3 * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * Тесты simstr * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com @@ -1995,7 +1995,7 @@ TEST(SimStr, EFill) { TEST(SimStr, Subst) { int from = 1, total = 100; bool success = true; - lstringu<100> u16t = e_subst(S_FRM(u"Test {} from {}, {}."), from, total, e_choice(success, u"success", u"fail")); + lstringu<100> u16t = e_subst(u"Test {} from {}, {}.", from, total, e_choice(success, u"success", u"fail")); EXPECT_EQ(u16t, u"Test 1 from 100, success."); } @@ -2003,7 +2003,8 @@ void check_equal(stra a, stra b) { EXPECT_EQ(a, b); } -inline constexpr cestring ce_sample = "sample " + e_subst(S_FRM("test = {}"), e_hex(10)) + ", done"; +#ifndef _MSC_VER +inline constexpr cestring ce_sample = "sample " + e_subst("test = {}", e_hex(10)) + ", done"; TEST(SimStr, ConstEval) { constexpr cestring ce_empty; @@ -2030,10 +2031,10 @@ TEST(SimStr, ConstEval) { constexpr cestring ce_expr = "test = "_ss + 10 + " times"; static_assert(ce_expr == "test = 10 times"); - constexpr cestring ce_subst = e_subst(S_FRM("test = {}"), 10); + constexpr cestring ce_subst = e_subst("test = {}", 10); static_assert(ce_subst == "test = 10"); - constexpr cestring ce_hex = e_subst(S_FRM("test = {}"), e_hex(10)); + constexpr cestring ce_hex = e_subst("test = {}", e_hex(10)); static_assert(ce_hex == "test = 0x0000000A"); constexpr cestring ce_concat = e_concat("", "test = ", 10, " times"); @@ -2054,9 +2055,9 @@ TEST(SimStr, ConstEval) { constexpr cestring ce_repl = e_repl("test", "e", "--"); static_assert(ce_repl == "t--st"); } +#endif } // namespace simstr::tests - TEST(SimStr, StrNoNamespace) { std::string str = "test"; std::string test = +str + " = " + 10; diff --git a/tests/test_tostrexpr.cpp b/tests/test_tostrexpr.cpp index eacf22c..8faec57 100644 --- a/tests/test_tostrexpr.cpp +++ b/tests/test_tostrexpr.cpp @@ -1,5 +1,5 @@ /* - * ver. 1.6.2 + * ver. 1.6.3 * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * Тесты simstr * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com @@ -69,7 +69,7 @@ TEST(ToStrExpr, CheckExclamation) { EXPECT_EQ(test, "Msg is "); const add_exclamation cmsg{"Happy Birthday", 0}; - test = e_subst(S_FRM("Msg is <{}>"), cmsg); + test = e_subst("Msg is <{}>", cmsg); EXPECT_EQ(test, "Msg is "); } //! [Method1] @@ -149,7 +149,7 @@ TEST(ToStrExpr, CheckCarInfo) { EXPECT_EQ(test, "Car is "); ci.year++; - test = e_subst(S_FRM("Car is <{}>"), ci); + test = e_subst("Car is <{}>", ci); EXPECT_EQ(test, "Car is "); } //! [Method2] @@ -216,7 +216,7 @@ TEST(ToStrExpr, CheckAnimal) { test = e_concat("", "<", dog, ">"); EXPECT_EQ(test, ""); - test = e_subst(S_FRM("\\_{}_/"), animal{"Snake", "Pssstt"}); + test = e_subst("\\_{}_/", animal{"Snake", "Pssstt"}); EXPECT_EQ(test, "\\_Animal: Snake, Sound: Pssstt_/"); } //! [Method3] @@ -268,7 +268,7 @@ TEST(ToStrExpr, CheckTest) { t = e_concat("", "<", t2, ">"); EXPECT_EQ(t, ""); - t = e_subst(S_FRM("<{}>"), test{99, 100}); + t = e_subst("<{}>", test{99, 100}); EXPECT_EQ(t, ""); // Проверим работу для не char @@ -296,12 +296,13 @@ TEST(ToStrExpr, SubstCustom) { const auto ttt = "test"_ss; int ii = 3; const test tr{10, 10}; - std::string t = e_subst(S_FRM("Test {{--}} {}={}, {}"), ttt, tr, ii); + std::string t = e_subst("Test {{--}} {}={}, {}", ttt, tr, ii); EXPECT_EQ(t, "Test {--} test=test 10 from 10, 3"); - t = e_subst(S_FRM("Test {2}={1}, {2}, {1}"), "test", 2); + t = e_subst("Test {2}={1}, {2}, {1}", "test", 2); EXPECT_EQ(t, "Test 2=test, 2, test"); - std::u16string u16t = e_subst(S_FRM(u"Test {}={}, {}"), u"test", 2, u"test"sv); + std::u16string u16t = e_subst(u"Test {}={}, {}", u"test", 2, u"test"sv); EXPECT_EQ(u16t, u"Test test=2, test"); } + } // namespace simstr::tests