Benchmarks of simstr, version 1.7.2 Sources: https://github.com/orefkov/simstr Results: https://orefkov.github.io/simstr/results.html Compiler Clang 22.0.0 2026-02-27T22:30:05+03:00 Running ./benchStr Run on (32 X 2494.22 MHz CPU s) CPU Caches: L1 Data 32 KiB (x16) L1 Instruction 32 KiB (x16) L2 Unified 256 KiB (x16) L3 Unified 40960 KiB (x1) Load Average: 0.03, 0.01, 0.00 ***WARNING*** ASLR is enabled, the results may have unreproducible noise in them. -------------------------------------------------------------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------------------------------------------------------------------------------------------- ----- Concatenate email ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 Concat email std::format_mean 165 ns 165 ns 4 Concat email std::format_median 165 ns 165 ns 4 Concat email std::format_stddev 7.11 ns 7.11 ns 4 Concat email std::format_cv 4.31 % 4.31 % 4 Concat email std::stringstream_mean 325 ns 325 ns 4 Concat email std::stringstream_median 325 ns 325 ns 4 Concat email std::stringstream_stddev 10.1 ns 10.1 ns 4 Concat email std::stringstream_cv 3.09 % 3.09 % 4 Concat email stringzilla append_mean 136 ns 136 ns 4 Concat email stringzilla append_median 134 ns 134 ns 4 Concat email stringzilla append_stddev 3.86 ns 3.86 ns 4 Concat email stringzilla append_cv 2.84 % 2.84 % 4 Concat email stringzilla concat_mean 54.8 ns 54.8 ns 4 Concat email stringzilla concat_median 54.4 ns 54.4 ns 4 Concat email stringzilla concat_stddev 2.05 ns 2.05 ns 4 Concat email stringzilla concat_cv 3.74 % 3.74 % 4 Concat email std::string append_mean 73.7 ns 73.7 ns 4 Concat email std::string append_median 73.6 ns 73.6 ns 4 Concat email std::string append_stddev 2.36 ns 2.36 ns 4 Concat email std::string append_cv 3.21 % 3.20 % 4 Concat email std::string by strexpr_mean 44.8 ns 44.8 ns 4 Concat email std::string by strexpr_median 43.9 ns 43.9 ns 4 Concat email std::string by strexpr_stddev 2.21 ns 2.21 ns 4 Concat email std::string by strexpr_cv 4.93 % 4.93 % 4 Concat email stringa_mean 40.5 ns 40.5 ns 4 Concat email stringa_median 40.6 ns 40.6 ns 4 Concat email stringa_stddev 1.17 ns 1.17 ns 4 Concat email stringa_cv 2.89 % 2.89 % 4 ----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 Concat std::string and number by std to std::string_mean 216 ns 216 ns 4 Concat std::string and number by std to std::string_median 216 ns 216 ns 4 Concat std::string and number by std to std::string_stddev 1.76 ns 1.76 ns 4 Concat std::string and number by std to std::string_cv 0.82 % 0.82 % 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 104 ns 104 ns 4 Concat std::string and number by StrExpr to std::string_stddev 2.09 ns 2.09 ns 4 Concat std::string and number by StrExpr to std::string_cv 2.01 % 2.01 % 4 Concat stringa and number by StrExpr to simstr::stringa_mean 65.6 ns 65.6 ns 4 Concat stringa and number by StrExpr to simstr::stringa_median 65.4 ns 65.4 ns 4 Concat stringa and number by StrExpr to simstr::stringa_stddev 1.53 ns 1.53 ns 4 Concat stringa and number by StrExpr to simstr::stringa_cv 2.33 % 2.33 % 4 Concat stringa and number by e_concat to simstr::stringa_mean 71.2 ns 71.2 ns 4 Concat stringa and number by e_concat to simstr::stringa_median 71.0 ns 71.0 ns 4 Concat stringa and number by e_concat to simstr::stringa_stddev 2.73 ns 2.73 ns 4 Concat stringa and number by e_concat to simstr::stringa_cv 3.84 % 3.84 % 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 703 ns 703 ns 4 Concat std::string and format hex number and literal to std::string_median 712 ns 712 ns 4 Concat std::string and format hex number and literal to std::string_stddev 37.5 ns 37.5 ns 4 Concat std::string and format hex number and literal to std::string_cv 5.34 % 5.34 % 4 std::format std::string and hex number by literal to std::string_mean 835 ns 835 ns 4 std::format std::string and hex number by literal to std::string_median 832 ns 832 ns 4 std::format std::string and hex number by literal to std::string_stddev 42.1 ns 42.1 ns 4 std::format std::string and hex number by literal to std::string_cv 5.05 % 5.05 % 4 Concat std::string and std::to_chars and string to std::string_mean 207 ns 207 ns 4 Concat std::string and std::to_chars and string to std::string_median 205 ns 205 ns 4 Concat std::string and std::to_chars and string to std::string_stddev 5.19 ns 5.19 ns 4 Concat std::string and std::to_chars and string to std::string_cv 2.51 % 2.51 % 4 Concat std::string and hex number and literal by StrExpr to std::string_mean 133 ns 133 ns 4 Concat std::string and hex number and literal by StrExpr to std::string_median 132 ns 132 ns 4 Concat std::string and hex number and literal by StrExpr to std::string_stddev 4.04 ns 4.04 ns 4 Concat std::string and hex number and literal by StrExpr to std::string_cv 3.03 % 3.03 % 4 Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 117 ns 117 ns 4 Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 116 ns 116 ns 4 Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 2.14 ns 2.14 ns 4 Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 1.83 % 1.83 % 4 Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 124 ns 124 ns 4 Concat stringa and hex number and literal by e_concat to simstr::stringa_median 123 ns 123 ns 4 Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 3.97 ns 3.97 ns 4 Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 3.20 % 3.20 % 4 Subst stringa and hex number by e_subst literal to simstr::stringa_mean 182 ns 182 ns 4 Subst stringa and hex number by e_subst literal to simstr::stringa_median 182 ns 182 ns 4 Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 1.55 ns 1.55 ns 4 Subst stringa and hex number by e_subst literal to simstr::stringa_cv 0.85 % 0.85 % 4 Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 314 ns 314 ns 4 Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 313 ns 313 ns 4 Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 3.94 ns 3.94 ns 4 Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.26 % 1.26 % 4 ---- format/vformat and subst/vsubst octal number to 32 symbols result ----/repeats:1 0.000 ns 0.000 ns 1000000000000 "abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_mean 265 ns 265 ns 4 "abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 265 ns 265 ns 4 "abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 4.25 ns 4.25 ns 4 "abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 1.60 % 1.60 % 4 e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 350 ns 350 ns 4 e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 348 ns 348 ns 4 e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 7.82 ns 7.82 ns 4 e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 2.24 % 2.24 % 4 e_vsubst(pattern, i / 0x8a010_fmt)_mean 628 ns 628 ns 4 e_vsubst(pattern, i / 0x8a010_fmt)_median 616 ns 616 ns 4 e_vsubst(pattern, i / 0x8a010_fmt)_stddev 28.7 ns 28.7 ns 4 e_vsubst(pattern, i / 0x8a010_fmt)_cv 4.58 % 4.58 % 4 fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 703 ns 703 ns 4 fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 707 ns 707 ns 4 fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 22.9 ns 22.9 ns 4 fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 3.26 % 3.26 % 4 fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 873 ns 873 ns 4 fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 871 ns 871 ns 4 fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 61.4 ns 61.4 ns 4 fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 7.03 % 7.03 % 4 std::format("abcdefghihklmopqr {:#010o} end", i)_mean 982 ns 982 ns 4 std::format("abcdefghihklmopqr {:#010o} end", i)_median 986 ns 986 ns 4 std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 43.1 ns 43.1 ns 4 std::format("abcdefghihklmopqr {:#010o} end", i)_cv 4.39 % 4.39 % 4 std::vformat(pattern, std::make_format_args(i))_mean 975 ns 975 ns 4 std::vformat(pattern, std::make_format_args(i))_median 974 ns 974 ns 4 std::vformat(pattern, std::make_format_args(i))_stddev 38.5 ns 38.5 ns 4 std::vformat(pattern, std::make_format_args(i))_cv 3.95 % 3.95 % 4 std::format with std::formatted_size_mean 1818 ns 1818 ns 4 std::format with std::formatted_size_median 1810 ns 1810 ns 4 std::format with std::formatted_size_stddev 59.9 ns 59.9 ns 4 std::format with std::formatted_size_cv 3.30 % 3.30 % 4 strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 2373 ns 2373 ns 4 strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 2386 ns 2386 ns 4 strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 80.8 ns 80.8 ns 4 strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 3.40 % 3.40 % 4 ----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 Concat std::string by std to std::string_mean 47.2 ns 47.2 ns 4 Concat std::string by std to std::string_median 46.8 ns 46.8 ns 4 Concat std::string by std to std::string_stddev 1.29 ns 1.29 ns 4 Concat std::string by std to std::string_cv 2.72 % 2.72 % 4 Concat std::string by StrExpr to std::string_mean 33.0 ns 33.0 ns 4 Concat std::string by StrExpr to std::string_median 32.5 ns 32.5 ns 4 Concat std::string by StrExpr to std::string_stddev 1.54 ns 1.54 ns 4 Concat std::string by StrExpr to std::string_cv 4.67 % 4.67 % 4 Concat stringa by StrExpr to stringa_mean 29.2 ns 29.2 ns 4 Concat stringa by StrExpr to stringa_median 29.4 ns 29.4 ns 4 Concat stringa by StrExpr to stringa_stddev 0.491 ns 0.491 ns 4 Concat stringa by StrExpr to stringa_cv 1.68 % 1.68 % 4 ----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000 Find concat three std::string_mean 110 ns 110 ns 4 Find concat three std::string_median 109 ns 109 ns 4 Find concat three std::string_stddev 4.78 ns 4.78 ns 4 Find concat three std::string_cv 4.35 % 4.35 % 4 Find concat three strexpr_mean 52.6 ns 52.6 ns 4 Find concat three strexpr_median 51.2 ns 51.2 ns 4 Find concat three strexpr_stddev 3.81 ns 3.81 ns 4 Find concat three strexpr_cv 7.23 % 7.23 % 4 Find concat three simstr_mean 18.8 ns 18.8 ns 4 Find concat three simstr_median 18.8 ns 18.8 ns 4 Find concat three simstr_stddev 0.250 ns 0.250 ns 4 Find concat three simstr_cv 1.33 % 1.33 % 4 Find concat three stringzilla string_mean 157 ns 157 ns 4 Find concat three stringzilla string_median 160 ns 160 ns 4 Find concat three stringzilla string_stddev 7.16 ns 7.16 ns 4 Find concat three stringzilla string_cv 4.56 % 4.56 % 4 ----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 BuildTypeNameStr 0/0_mean 7.23 ns 7.23 ns 4 BuildTypeNameStr 0/0_median 7.14 ns 7.14 ns 4 BuildTypeNameStr 0/0_stddev 0.249 ns 0.249 ns 4 BuildTypeNameStr 0/0_cv 3.44 % 3.44 % 4 BuildTypeNameExp 0/0_mean 6.61 ns 6.61 ns 4 BuildTypeNameExp 0/0_median 6.59 ns 6.59 ns 4 BuildTypeNameExp 0/0_stddev 0.302 ns 0.302 ns 4 BuildTypeNameExp 0/0_cv 4.56 % 4.56 % 4 BuildTypeNameSim 0/0_mean 4.20 ns 4.20 ns 4 BuildTypeNameSim 0/0_median 4.16 ns 4.16 ns 4 BuildTypeNameSim 0/0_stddev 0.136 ns 0.136 ns 4 BuildTypeNameSim 0/0_cv 3.25 % 3.25 % 4 BuildTypeNameStr 10/10_mean 59.7 ns 59.7 ns 4 BuildTypeNameStr 10/10_median 59.7 ns 59.7 ns 4 BuildTypeNameStr 10/10_stddev 2.44 ns 2.44 ns 4 BuildTypeNameStr 10/10_cv 4.08 % 4.08 % 4 BuildTypeNameExp 10/10_mean 30.9 ns 30.9 ns 4 BuildTypeNameExp 10/10_median 30.5 ns 30.5 ns 4 BuildTypeNameExp 10/10_stddev 1.75 ns 1.75 ns 4 BuildTypeNameExp 10/10_cv 5.67 % 5.67 % 4 BuildTypeNameSim 10/10_mean 23.9 ns 23.9 ns 4 BuildTypeNameSim 10/10_median 23.8 ns 23.8 ns 4 BuildTypeNameSim 10/10_stddev 1.51 ns 1.51 ns 4 BuildTypeNameSim 10/10_cv 6.32 % 6.32 % 4 ----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000 Concat with replace str_mean 208 ns 208 ns 4 Concat with replace str_median 208 ns 208 ns 4 Concat with replace str_stddev 5.65 ns 5.65 ns 4 Concat with replace str_cv 2.72 % 2.72 % 4 Concat with replace exp_mean 158 ns 158 ns 4 Concat with replace exp_median 158 ns 158 ns 4 Concat with replace exp_stddev 5.03 ns 5.03 ns 4 Concat with replace exp_cv 3.18 % 3.18 % 4 ----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 std::string e;_mean 1.14 ns 1.14 ns 4 std::string e;_median 1.14 ns 1.14 ns 4 std::string e;_stddev 0.040 ns 0.040 ns 4 std::string e;_cv 3.52 % 3.52 % 4 std::string_view e;_mean 0.389 ns 0.389 ns 4 std::string_view e;_median 0.389 ns 0.389 ns 4 std::string_view e;_stddev 0.012 ns 0.012 ns 4 std::string_view e;_cv 3.04 % 3.04 % 4 ssa e;_mean 0.370 ns 0.370 ns 4 ssa e;_median 0.369 ns 0.369 ns 4 ssa e;_stddev 0.009 ns 0.009 ns 4 ssa e;_cv 2.39 % 2.39 % 4 stringa e;_mean 0.770 ns 0.770 ns 4 stringa e;_median 0.767 ns 0.767 ns 4 stringa e;_stddev 0.017 ns 0.017 ns 4 stringa e;_cv 2.18 % 2.18 % 4 lstringa<20> e;_mean 1.11 ns 1.11 ns 4 lstringa<20> e;_median 1.11 ns 1.11 ns 4 lstringa<20> e;_stddev 0.024 ns 0.024 ns 4 lstringa<20> e;_cv 2.14 % 2.14 % 4 lstringa<40> e;_mean 1.11 ns 1.11 ns 4 lstringa<40> e;_median 1.11 ns 1.11 ns 4 lstringa<40> e;_stddev 0.018 ns 0.018 ns 4 lstringa<40> e;_cv 1.62 % 1.62 % 4 ----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000 std::string e = "Test text";_mean 1.95 ns 1.95 ns 4 std::string e = "Test text";_median 1.97 ns 1.97 ns 4 std::string e = "Test text";_stddev 0.076 ns 0.076 ns 4 std::string e = "Test text";_cv 3.90 % 3.89 % 4 std::string_view e = "Test text";_mean 0.741 ns 0.741 ns 4 std::string_view e = "Test text";_median 0.739 ns 0.739 ns 4 std::string_view e = "Test text";_stddev 0.013 ns 0.013 ns 4 std::string_view e = "Test text";_cv 1.80 % 1.80 % 4 ssa e = "Test text";_mean 0.374 ns 0.374 ns 4 ssa e = "Test text";_median 0.371 ns 0.371 ns 4 ssa e = "Test text";_stddev 0.007 ns 0.007 ns 4 ssa e = "Test text";_cv 1.90 % 1.90 % 4 stringa e = "Test text";_mean 1.13 ns 1.13 ns 4 stringa e = "Test text";_median 1.13 ns 1.13 ns 4 stringa e = "Test text";_stddev 0.035 ns 0.035 ns 4 stringa e = "Test text";_cv 3.09 % 3.09 % 4 lstringa<20> e = "Test text";_mean 1.93 ns 1.93 ns 4 lstringa<20> e = "Test text";_median 1.95 ns 1.95 ns 4 lstringa<20> e = "Test text";_stddev 0.052 ns 0.052 ns 4 lstringa<20> e = "Test text";_cv 2.68 % 2.68 % 4 lstringa<40> e = "Test text";_mean 1.89 ns 1.89 ns 4 lstringa<40> e = "Test text";_median 1.88 ns 1.88 ns 4 lstringa<40> e = "Test text";_stddev 0.054 ns 0.054 ns 4 lstringa<40> e = "Test text";_cv 2.85 % 2.85 % 4 ----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 std::string e = "123456789012345678901234567890";_mean 20.2 ns 20.2 ns 4 std::string e = "123456789012345678901234567890";_median 20.1 ns 20.1 ns 4 std::string e = "123456789012345678901234567890";_stddev 0.726 ns 0.726 ns 4 std::string e = "123456789012345678901234567890";_cv 3.60 % 3.60 % 4 std::string_view e = "123456789012345678901234567890";_mean 0.738 ns 0.738 ns 4 std::string_view e = "123456789012345678901234567890";_median 0.741 ns 0.741 ns 4 std::string_view e = "123456789012345678901234567890";_stddev 0.010 ns 0.010 ns 4 std::string_view e = "123456789012345678901234567890";_cv 1.36 % 1.36 % 4 ssa e = "123456789012345678901234567890";_mean 0.369 ns 0.369 ns 4 ssa e = "123456789012345678901234567890";_median 0.368 ns 0.368 ns 4 ssa e = "123456789012345678901234567890";_stddev 0.005 ns 0.005 ns 4 ssa e = "123456789012345678901234567890";_cv 1.39 % 1.39 % 4 stringa e = "123456789012345678901234567890";_mean 1.10 ns 1.10 ns 4 stringa e = "123456789012345678901234567890";_median 1.10 ns 1.10 ns 4 stringa e = "123456789012345678901234567890";_stddev 0.013 ns 0.013 ns 4 stringa e = "123456789012345678901234567890";_cv 1.19 % 1.19 % 4 lstringa<20> e = "123456789012345678901234567890";_mean 20.5 ns 20.5 ns 4 lstringa<20> e = "123456789012345678901234567890";_median 20.5 ns 20.5 ns 4 lstringa<20> e = "123456789012345678901234567890";_stddev 0.616 ns 0.616 ns 4 lstringa<20> e = "123456789012345678901234567890";_cv 3.00 % 3.00 % 4 lstringa<40> e = "123456789012345678901234567890";_mean 2.57 ns 2.57 ns 4 lstringa<40> e = "123456789012345678901234567890";_median 2.57 ns 2.57 ns 4 lstringa<40> e = "123456789012345678901234567890";_stddev 0.039 ns 0.039 ns 4 lstringa<40> e = "123456789012345678901234567890";_cv 1.54 % 1.54 % 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.69 ns 5.69 ns 4 std::string e = "Test text"; auto c{e};_median 5.67 ns 5.67 ns 4 std::string e = "Test text"; auto c{e};_stddev 0.121 ns 0.121 ns 4 std::string e = "Test text"; auto c{e};_cv 2.13 % 2.13 % 4 std::string_view e = "Test text"; auto c{e};_mean 0.372 ns 0.372 ns 4 std::string_view e = "Test text"; auto c{e};_median 0.370 ns 0.370 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.96 % 1.96 % 4 ssa e = "Test text"; auto c{e};_mean 0.377 ns 0.377 ns 4 ssa e = "Test text"; auto c{e};_median 0.376 ns 0.376 ns 4 ssa e = "Test text"; auto c{e};_stddev 0.009 ns 0.009 ns 4 ssa e = "Test text"; auto c{e};_cv 2.45 % 2.45 % 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.019 ns 0.019 ns 4 stringa e = "Test text"; auto c{e};_cv 1.73 % 1.73 % 4 lstringa<20> e = "Test text"; auto c{e};_mean 1.12 ns 1.12 ns 4 lstringa<20> e = "Test text"; auto c{e};_median 1.11 ns 1.11 ns 4 lstringa<20> e = "Test text"; auto c{e};_stddev 0.038 ns 0.038 ns 4 lstringa<20> e = "Test text"; auto c{e};_cv 3.40 % 3.40 % 4 lstringa<40> e = "Test text"; auto c{e};_mean 1.14 ns 1.14 ns 4 lstringa<40> e = "Test text"; auto c{e};_median 1.14 ns 1.14 ns 4 lstringa<40> e = "Test text"; auto c{e};_stddev 0.013 ns 0.013 ns 4 lstringa<40> e = "Test text"; auto c{e};_cv 1.11 % 1.11 % 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 19.8 ns 19.8 ns 4 std::string e = "123456789012345678901234567890"; auto c{e};_median 19.8 ns 19.8 ns 4 std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.619 ns 0.619 ns 4 std::string e = "123456789012345678901234567890"; auto c{e};_cv 3.12 % 3.12 % 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.736 ns 0.736 ns 4 std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.010 ns 0.010 ns 4 std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.36 % 1.36 % 4 ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.373 ns 0.373 ns 4 ssa e = "123456789012345678901234567890"; auto c{e};_median 0.371 ns 0.371 ns 4 ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.007 ns 0.007 ns 4 ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.91 % 1.91 % 4 stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.12 ns 1.12 ns 4 stringa e = "123456789012345678901234567890"; auto c{e};_median 1.12 ns 1.12 ns 4 stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.010 ns 0.010 ns 4 stringa e = "123456789012345678901234567890"; auto c{e};_cv 0.89 % 0.89 % 4 lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 20.4 ns 20.4 ns 4 lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 20.0 ns 20.0 ns 4 lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.914 ns 0.914 ns 4 lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 4.48 % 4.48 % 4 lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.74 ns 4.74 ns 4 lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.77 ns 4.77 ns 4 lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.121 ns 0.121 ns 4 lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 2.55 % 2.55 % 4 ----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 sz::string::find;_mean 98.1 ns 98.1 ns 4 sz::string::find;_median 97.6 ns 97.6 ns 4 sz::string::find;_stddev 2.02 ns 2.02 ns 4 sz::string::find;_cv 2.06 % 2.06 % 4 std::string::find;_mean 7.04 ns 7.04 ns 4 std::string::find;_median 7.02 ns 7.02 ns 4 std::string::find;_stddev 0.087 ns 0.087 ns 4 std::string::find;_cv 1.24 % 1.24 % 4 std::string_view::find;_mean 7.15 ns 7.15 ns 4 std::string_view::find;_median 7.03 ns 7.03 ns 4 std::string_view::find;_stddev 0.254 ns 0.254 ns 4 std::string_view::find;_cv 3.56 % 3.56 % 4 ssa::find;_mean 7.45 ns 7.45 ns 4 ssa::find;_median 7.44 ns 7.44 ns 4 ssa::find;_stddev 0.156 ns 0.156 ns 4 ssa::find;_cv 2.09 % 2.09 % 4 stringa::find;_mean 8.20 ns 8.20 ns 4 stringa::find;_median 8.20 ns 8.20 ns 4 stringa::find;_stddev 0.043 ns 0.043 ns 4 stringa::find;_cv 0.52 % 0.52 % 4 lstringa<20>::find;_mean 6.82 ns 6.82 ns 4 lstringa<20>::find;_median 6.79 ns 6.79 ns 4 lstringa<20>::find;_stddev 0.186 ns 0.186 ns 4 lstringa<20>::find;_cv 2.72 % 2.72 % 4 lstringa<40>::find;_mean 6.70 ns 6.70 ns 4 lstringa<40>::find;_median 6.68 ns 6.68 ns 4 lstringa<40>::find;_stddev 0.090 ns 0.090 ns 4 lstringa<40>::find;_cv 1.34 % 1.34 % 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.24 ns 5.24 ns 4 std::string copy{str_with_len_N};/15_median 5.20 ns 5.20 ns 4 std::string copy{str_with_len_N};/15_stddev 0.128 ns 0.128 ns 4 std::string copy{str_with_len_N};/15_cv 2.45 % 2.45 % 4 std::string copy{str_with_len_N};/16_mean 23.2 ns 23.2 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 0.643 ns 0.643 ns 4 std::string copy{str_with_len_N};/16_cv 2.77 % 2.77 % 4 std::string copy{str_with_len_N};/23_mean 27.4 ns 27.4 ns 4 std::string copy{str_with_len_N};/23_median 27.3 ns 27.3 ns 4 std::string copy{str_with_len_N};/23_stddev 0.180 ns 0.180 ns 4 std::string copy{str_with_len_N};/23_cv 0.66 % 0.66 % 4 std::string copy{str_with_len_N};/24_mean 22.6 ns 22.6 ns 4 std::string copy{str_with_len_N};/24_median 22.4 ns 22.4 ns 4 std::string copy{str_with_len_N};/24_stddev 0.712 ns 0.711 ns 4 std::string copy{str_with_len_N};/24_cv 3.15 % 3.15 % 4 std::string copy{str_with_len_N};/32_mean 22.1 ns 22.1 ns 4 std::string copy{str_with_len_N};/32_median 22.1 ns 22.1 ns 4 std::string copy{str_with_len_N};/32_stddev 0.400 ns 0.400 ns 4 std::string copy{str_with_len_N};/32_cv 1.81 % 1.81 % 4 std::string copy{str_with_len_N};/64_mean 22.2 ns 22.2 ns 4 std::string copy{str_with_len_N};/64_median 22.1 ns 22.1 ns 4 std::string copy{str_with_len_N};/64_stddev 0.596 ns 0.596 ns 4 std::string copy{str_with_len_N};/64_cv 2.69 % 2.69 % 4 std::string copy{str_with_len_N};/128_mean 24.7 ns 24.7 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 1.53 ns 1.53 ns 4 std::string copy{str_with_len_N};/128_cv 6.19 % 6.19 % 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.3 ns 24.3 ns 4 std::string copy{str_with_len_N};/256_stddev 1.32 ns 1.32 ns 4 std::string copy{str_with_len_N};/256_cv 5.33 % 5.33 % 4 std::string copy{str_with_len_N};/512_mean 29.1 ns 29.1 ns 4 std::string copy{str_with_len_N};/512_median 28.5 ns 28.5 ns 4 std::string copy{str_with_len_N};/512_stddev 1.22 ns 1.22 ns 4 std::string copy{str_with_len_N};/512_cv 4.19 % 4.19 % 4 std::string copy{str_with_len_N};/1024_mean 47.8 ns 47.8 ns 4 std::string copy{str_with_len_N};/1024_median 47.6 ns 47.6 ns 4 std::string copy{str_with_len_N};/1024_stddev 0.948 ns 0.948 ns 4 std::string copy{str_with_len_N};/1024_cv 1.98 % 1.98 % 4 std::string copy{str_with_len_N};/2048_mean 123 ns 123 ns 4 std::string copy{str_with_len_N};/2048_median 124 ns 124 ns 4 std::string copy{str_with_len_N};/2048_stddev 4.54 ns 4.54 ns 4 std::string copy{str_with_len_N};/2048_cv 3.70 % 3.70 % 4 std::string copy{str_with_len_N};/4096_mean 146 ns 146 ns 4 std::string copy{str_with_len_N};/4096_median 145 ns 145 ns 4 std::string copy{str_with_len_N};/4096_stddev 4.21 ns 4.21 ns 4 std::string copy{str_with_len_N};/4096_cv 2.89 % 2.89 % 4 stringa copy{str_with_len_N};/15_mean 1.11 ns 1.11 ns 4 stringa copy{str_with_len_N};/15_median 1.11 ns 1.11 ns 4 stringa copy{str_with_len_N};/15_stddev 0.023 ns 0.023 ns 4 stringa copy{str_with_len_N};/15_cv 2.05 % 2.05 % 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.014 ns 0.014 ns 4 stringa copy{str_with_len_N};/16_cv 1.27 % 1.27 % 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.022 ns 0.022 ns 4 stringa copy{str_with_len_N};/23_cv 1.98 % 1.98 % 4 stringa copy{str_with_len_N};/24_mean 16.3 ns 16.3 ns 4 stringa copy{str_with_len_N};/24_median 16.3 ns 16.3 ns 4 stringa copy{str_with_len_N};/24_stddev 0.167 ns 0.167 ns 4 stringa copy{str_with_len_N};/24_cv 1.03 % 1.03 % 4 stringa copy{str_with_len_N};/32_mean 16.1 ns 16.1 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.272 ns 0.272 ns 4 stringa copy{str_with_len_N};/32_cv 1.69 % 1.69 % 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.169 ns 0.169 ns 4 stringa copy{str_with_len_N};/64_cv 1.05 % 1.05 % 4 stringa copy{str_with_len_N};/128_mean 15.9 ns 15.9 ns 4 stringa copy{str_with_len_N};/128_median 16.0 ns 16.0 ns 4 stringa copy{str_with_len_N};/128_stddev 0.110 ns 0.110 ns 4 stringa copy{str_with_len_N};/128_cv 0.69 % 0.69 % 4 stringa copy{str_with_len_N};/256_mean 16.0 ns 16.0 ns 4 stringa copy{str_with_len_N};/256_median 16.0 ns 16.0 ns 4 stringa copy{str_with_len_N};/256_stddev 0.077 ns 0.077 ns 4 stringa copy{str_with_len_N};/256_cv 0.48 % 0.48 % 4 stringa copy{str_with_len_N};/512_mean 16.1 ns 16.1 ns 4 stringa copy{str_with_len_N};/512_median 16.0 ns 16.0 ns 4 stringa copy{str_with_len_N};/512_stddev 0.316 ns 0.316 ns 4 stringa copy{str_with_len_N};/512_cv 1.96 % 1.96 % 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.065 ns 0.065 ns 4 stringa copy{str_with_len_N};/1024_cv 0.41 % 0.41 % 4 stringa copy{str_with_len_N};/2048_mean 16.1 ns 16.1 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.184 ns 0.184 ns 4 stringa copy{str_with_len_N};/2048_cv 1.15 % 1.15 % 4 stringa copy{str_with_len_N};/4096_mean 16.0 ns 16.0 ns 4 stringa copy{str_with_len_N};/4096_median 16.0 ns 16.0 ns 4 stringa copy{str_with_len_N};/4096_stddev 0.061 ns 0.061 ns 4 stringa copy{str_with_len_N};/4096_cv 0.38 % 0.38 % 4 lstringa<16> copy{str_with_len_N};/15_mean 1.11 ns 1.11 ns 4 lstringa<16> copy{str_with_len_N};/15_median 1.11 ns 1.11 ns 4 lstringa<16> copy{str_with_len_N};/15_stddev 0.015 ns 0.015 ns 4 lstringa<16> copy{str_with_len_N};/15_cv 1.35 % 1.35 % 4 lstringa<16> copy{str_with_len_N};/16_mean 5.42 ns 5.42 ns 4 lstringa<16> copy{str_with_len_N};/16_median 5.33 ns 5.33 ns 4 lstringa<16> copy{str_with_len_N};/16_stddev 0.320 ns 0.320 ns 4 lstringa<16> copy{str_with_len_N};/16_cv 5.91 % 5.91 % 4 lstringa<16> copy{str_with_len_N};/23_mean 5.17 ns 5.17 ns 4 lstringa<16> copy{str_with_len_N};/23_median 5.15 ns 5.15 ns 4 lstringa<16> copy{str_with_len_N};/23_stddev 0.059 ns 0.059 ns 4 lstringa<16> copy{str_with_len_N};/23_cv 1.14 % 1.14 % 4 lstringa<16> copy{str_with_len_N};/24_mean 23.2 ns 23.2 ns 4 lstringa<16> copy{str_with_len_N};/24_median 23.2 ns 23.2 ns 4 lstringa<16> copy{str_with_len_N};/24_stddev 0.287 ns 0.287 ns 4 lstringa<16> copy{str_with_len_N};/24_cv 1.23 % 1.23 % 4 lstringa<16> copy{str_with_len_N};/32_mean 23.1 ns 23.1 ns 4 lstringa<16> copy{str_with_len_N};/32_median 23.0 ns 23.0 ns 4 lstringa<16> copy{str_with_len_N};/32_stddev 0.219 ns 0.219 ns 4 lstringa<16> copy{str_with_len_N};/32_cv 0.95 % 0.95 % 4 lstringa<16> copy{str_with_len_N};/64_mean 24.9 ns 24.9 ns 4 lstringa<16> copy{str_with_len_N};/64_median 24.9 ns 24.9 ns 4 lstringa<16> copy{str_with_len_N};/64_stddev 0.148 ns 0.148 ns 4 lstringa<16> copy{str_with_len_N};/64_cv 0.60 % 0.60 % 4 lstringa<16> copy{str_with_len_N};/128_mean 24.9 ns 24.9 ns 4 lstringa<16> copy{str_with_len_N};/128_median 24.9 ns 24.9 ns 4 lstringa<16> copy{str_with_len_N};/128_stddev 0.164 ns 0.164 ns 4 lstringa<16> copy{str_with_len_N};/128_cv 0.66 % 0.66 % 4 lstringa<16> copy{str_with_len_N};/256_mean 27.3 ns 27.3 ns 4 lstringa<16> copy{str_with_len_N};/256_median 27.6 ns 27.6 ns 4 lstringa<16> copy{str_with_len_N};/256_stddev 1.13 ns 1.13 ns 4 lstringa<16> copy{str_with_len_N};/256_cv 4.12 % 4.12 % 4 lstringa<16> copy{str_with_len_N};/512_mean 29.8 ns 29.8 ns 4 lstringa<16> copy{str_with_len_N};/512_median 29.3 ns 29.3 ns 4 lstringa<16> copy{str_with_len_N};/512_stddev 1.16 ns 1.16 ns 4 lstringa<16> copy{str_with_len_N};/512_cv 3.89 % 3.89 % 4 lstringa<16> copy{str_with_len_N};/1024_mean 95.4 ns 95.4 ns 4 lstringa<16> copy{str_with_len_N};/1024_median 95.7 ns 95.7 ns 4 lstringa<16> copy{str_with_len_N};/1024_stddev 1.30 ns 1.30 ns 4 lstringa<16> copy{str_with_len_N};/1024_cv 1.37 % 1.37 % 4 lstringa<16> copy{str_with_len_N};/2048_mean 105 ns 105 ns 4 lstringa<16> copy{str_with_len_N};/2048_median 104 ns 104 ns 4 lstringa<16> copy{str_with_len_N};/2048_stddev 3.28 ns 3.28 ns 4 lstringa<16> copy{str_with_len_N};/2048_cv 3.13 % 3.13 % 4 lstringa<16> copy{str_with_len_N};/4096_mean 122 ns 122 ns 4 lstringa<16> copy{str_with_len_N};/4096_median 121 ns 121 ns 4 lstringa<16> copy{str_with_len_N};/4096_stddev 2.04 ns 2.04 ns 4 lstringa<16> copy{str_with_len_N};/4096_cv 1.68 % 1.68 % 4 lstringa<512> copy{str_with_len_N};/15_mean 1.13 ns 1.13 ns 4 lstringa<512> copy{str_with_len_N};/15_median 1.12 ns 1.12 ns 4 lstringa<512> copy{str_with_len_N};/15_stddev 0.015 ns 0.015 ns 4 lstringa<512> copy{str_with_len_N};/15_cv 1.35 % 1.35 % 4 lstringa<512> copy{str_with_len_N};/16_mean 5.12 ns 5.12 ns 4 lstringa<512> copy{str_with_len_N};/16_median 5.17 ns 5.17 ns 4 lstringa<512> copy{str_with_len_N};/16_stddev 0.134 ns 0.134 ns 4 lstringa<512> copy{str_with_len_N};/16_cv 2.63 % 2.63 % 4 lstringa<512> copy{str_with_len_N};/23_mean 4.98 ns 4.98 ns 4 lstringa<512> copy{str_with_len_N};/23_median 4.99 ns 4.99 ns 4 lstringa<512> copy{str_with_len_N};/23_stddev 0.157 ns 0.157 ns 4 lstringa<512> copy{str_with_len_N};/23_cv 3.15 % 3.15 % 4 lstringa<512> copy{str_with_len_N};/24_mean 4.45 ns 4.45 ns 4 lstringa<512> copy{str_with_len_N};/24_median 4.45 ns 4.45 ns 4 lstringa<512> copy{str_with_len_N};/24_stddev 0.083 ns 0.083 ns 4 lstringa<512> copy{str_with_len_N};/24_cv 1.87 % 1.87 % 4 lstringa<512> copy{str_with_len_N};/32_mean 4.66 ns 4.66 ns 4 lstringa<512> copy{str_with_len_N};/32_median 4.71 ns 4.71 ns 4 lstringa<512> copy{str_with_len_N};/32_stddev 0.169 ns 0.169 ns 4 lstringa<512> copy{str_with_len_N};/32_cv 3.62 % 3.62 % 4 lstringa<512> copy{str_with_len_N};/64_mean 6.03 ns 6.03 ns 4 lstringa<512> copy{str_with_len_N};/64_median 6.03 ns 6.03 ns 4 lstringa<512> copy{str_with_len_N};/64_stddev 0.053 ns 0.053 ns 4 lstringa<512> copy{str_with_len_N};/64_cv 0.88 % 0.88 % 4 lstringa<512> copy{str_with_len_N};/128_mean 6.41 ns 6.41 ns 4 lstringa<512> copy{str_with_len_N};/128_median 6.42 ns 6.42 ns 4 lstringa<512> copy{str_with_len_N};/128_stddev 0.088 ns 0.088 ns 4 lstringa<512> copy{str_with_len_N};/128_cv 1.38 % 1.38 % 4 lstringa<512> copy{str_with_len_N};/256_mean 7.85 ns 7.85 ns 4 lstringa<512> copy{str_with_len_N};/256_median 7.81 ns 7.81 ns 4 lstringa<512> copy{str_with_len_N};/256_stddev 0.306 ns 0.306 ns 4 lstringa<512> copy{str_with_len_N};/256_cv 3.90 % 3.90 % 4 lstringa<512> copy{str_with_len_N};/512_mean 10.6 ns 10.6 ns 4 lstringa<512> copy{str_with_len_N};/512_median 10.4 ns 10.4 ns 4 lstringa<512> copy{str_with_len_N};/512_stddev 0.616 ns 0.616 ns 4 lstringa<512> copy{str_with_len_N};/512_cv 5.79 % 5.79 % 4 lstringa<512> copy{str_with_len_N};/1024_mean 98.1 ns 98.1 ns 4 lstringa<512> copy{str_with_len_N};/1024_median 97.4 ns 97.4 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 2.94 % 2.94 % 4 lstringa<512> copy{str_with_len_N};/2048_mean 104 ns 104 ns 4 lstringa<512> copy{str_with_len_N};/2048_median 104 ns 104 ns 4 lstringa<512> copy{str_with_len_N};/2048_stddev 1.22 ns 1.22 ns 4 lstringa<512> copy{str_with_len_N};/2048_cv 1.17 % 1.17 % 4 lstringa<512> copy{str_with_len_N};/4096_mean 121 ns 121 ns 4 lstringa<512> copy{str_with_len_N};/4096_median 120 ns 120 ns 4 lstringa<512> copy{str_with_len_N};/4096_stddev 3.39 ns 3.39 ns 4 lstringa<512> copy{str_with_len_N};/4096_cv 2.80 % 2.80 % 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.4 ns 27.4 ns 4 std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 27.0 ns 27.0 ns 4 std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 1.62 ns 1.62 ns 4 std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 5.91 % 5.91 % 4 std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 13.5 ns 13.5 ns 4 std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 13.3 ns 13.3 ns 4 std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.358 ns 0.358 ns 4 std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.66 % 2.66 % 4 stringa s = "123456789"; int res = s.to_int_mean 9.15 ns 9.15 ns 4 stringa s = "123456789"; int res = s.to_int_median 9.17 ns 9.17 ns 4 stringa s = "123456789"; int res = s.to_int_stddev 0.193 ns 0.193 ns 4 stringa s = "123456789"; int res = s.to_int_cv 2.11 % 2.11 % 4 ssa s = "123456789"; int res = s.to_int_mean 9.46 ns 9.46 ns 4 ssa s = "123456789"; int res = s.to_int_median 9.41 ns 9.41 ns 4 ssa s = "123456789"; int res = s.to_int_stddev 0.154 ns 0.154 ns 4 ssa s = "123456789"; int res = s.to_int_cv 1.63 % 1.63 % 4 lstringa<20> s = "123456789"; int res = s.to_int_mean 9.30 ns 9.30 ns 4 lstringa<20> s = "123456789"; int res = s.to_int_median 9.31 ns 9.31 ns 4 lstringa<20> s = "123456789"; int res = s.to_int_stddev 0.116 ns 0.116 ns 4 lstringa<20> s = "123456789"; int res = s.to_int_cv 1.25 % 1.25 % 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 24.0 ns 24.0 ns 4 std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 24.2 ns 24.2 ns 4 std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 1.18 ns 1.18 ns 4 std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 4.92 % 4.92 % 4 std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.22 ns 9.22 ns 4 std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.18 ns 9.18 ns 4 std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.188 ns 0.188 ns 4 std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 2.04 % 2.04 % 4 stringa s = "abcDef"; int res = s.to_int_mean 7.60 ns 7.60 ns 4 stringa s = "abcDef"; int res = s.to_int_median 7.59 ns 7.59 ns 4 stringa s = "abcDef"; int res = s.to_int_stddev 0.065 ns 0.065 ns 4 stringa s = "abcDef"; int res = s.to_int_cv 0.86 % 0.86 % 4 ssa s = "abcDef"; int res = s.to_int_mean 7.56 ns 7.56 ns 4 ssa s = "abcDef"; int res = s.to_int_median 7.49 ns 7.49 ns 4 ssa s = "abcDef"; int res = s.to_int_stddev 0.213 ns 0.213 ns 4 ssa s = "abcDef"; int res = s.to_int_cv 2.82 % 2.82 % 4 lstringa<20> s = "abcDef"; int res = s.to_int_mean 7.35 ns 7.35 ns 4 lstringa<20> s = "abcDef"; int res = s.to_int_median 7.33 ns 7.33 ns 4 lstringa<20> s = "abcDef"; int res = s.to_int_stddev 0.112 ns 0.112 ns 4 lstringa<20> s = "abcDef"; int res = s.to_int_cv 1.52 % 1.52 % 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 29.0 ns 29.0 ns 4 std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 29.0 ns 29.0 ns 4 std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.663 ns 0.663 ns 4 std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 2.29 % 2.29 % 4 stringa s = " 123456789"; int res = s.to_int; // Check overflow_mean 11.1 ns 11.1 ns 4 stringa s = " 123456789"; int res = s.to_int; // Check overflow_median 11.0 ns 11.0 ns 4 stringa s = " 123456789"; int res = s.to_int; // Check overflow_stddev 0.281 ns 0.281 ns 4 stringa s = " 123456789"; int res = s.to_int; // Check overflow_cv 2.54 % 2.54 % 4 ssa s = " 123456789"; int res = s.to_int; // No check overflow_mean 13.3 ns 13.3 ns 4 ssa s = " 123456789"; int res = s.to_int; // No check overflow_median 13.2 ns 13.2 ns 4 ssa s = " 123456789"; int res = s.to_int; // No check overflow_stddev 0.684 ns 0.684 ns 4 ssa s = " 123456789"; int res = s.to_int; // No check overflow_cv 5.13 % 5.13 % 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 4 std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 63.6 ns 63.6 ns 4 std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 0.876 ns 0.876 ns 4 std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.38 % 1.38 % 4 std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 24.1 ns 24.1 ns 4 std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 24.1 ns 24.1 ns 4 std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.525 ns 0.525 ns 4 std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.18 % 2.18 % 4 ssa s = "1234.567e10"; double res = *s.to_double()_mean 26.0 ns 26.0 ns 4 ssa s = "1234.567e10"; double res = *s.to_double()_median 26.1 ns 26.1 ns 4 ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.289 ns 0.289 ns 4 ssa s = "1234.567e10"; double res = *s.to_double()_cv 1.11 % 1.11 % 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 1374 ns 1374 ns 4 std::stringstream str; ... str << "abbaabbaabbaabba";_median 1366 ns 1366 ns 4 std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 40.7 ns 40.7 ns 4 std::stringstream str; ... str << "abbaabbaabbaabba";_cv 2.96 % 2.96 % 4 std::string str; ... str += "abbaabbaabbaabba";_mean 445 ns 445 ns 4 std::string str; ... str += "abbaabbaabbaabba";_median 444 ns 444 ns 4 std::string str; ... str += "abbaabbaabbaabba";_stddev 17.1 ns 17.1 ns 4 std::string str; ... str += "abbaabbaabbaabba";_cv 3.85 % 3.85 % 4 lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 413 ns 413 ns 4 lstringa<8> str; ... str += "abbaabbaabbaabba";_median 415 ns 415 ns 4 lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 12.5 ns 12.5 ns 4 lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 3.02 % 3.02 % 4 lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 289 ns 289 ns 4 lstringa<128> str; ... str += "abbaabbaabbaabba";_median 288 ns 288 ns 4 lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 7.76 ns 7.76 ns 4 lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 2.68 % 2.68 % 4 lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 248 ns 248 ns 4 lstringa<512> str; ... str += "abbaabbaabbaabba";_median 251 ns 251 ns 4 lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 7.60 ns 7.60 ns 4 lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 3.06 % 3.06 % 4 lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 139 ns 139 ns 4 lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 138 ns 138 ns 4 lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 3.86 ns 3.86 ns 4 lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.78 % 2.78 % 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 1439 ns 1439 ns 4 std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1403 ns 1403 ns 4 std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 116 ns 116 ns 4 std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 8.02 % 8.02 % 4 std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1289 ns 1289 ns 4 std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1281 ns 1281 ns 4 std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 45.3 ns 45.3 ns 4 std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 3.52 % 3.52 % 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 443 ns 443 ns 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 444 ns 444 ns 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 7.20 ns 7.20 ns 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.62 % 1.62 % 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 383 ns 383 ns 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 388 ns 388 ns 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 17.9 ns 17.9 ns 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.68 % 4.68 % 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 332 ns 332 ns 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 331 ns 331 ns 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 11.3 ns 11.3 ns 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.40 % 3.40 % 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 206 ns 206 ns 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 207 ns 207 ns 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 4.33 ns 4.33 ns 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.10 % 2.10 % 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 76125 ns 76126 ns 4 std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 76988 ns 76988 ns 4 std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 2401 ns 2402 ns 4 std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 3.15 % 3.15 % 4 std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 71507 ns 71507 ns 4 std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 71137 ns 71138 ns 4 std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1501 ns 1501 ns 4 std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.10 % 2.10 % 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18029 ns 18029 ns 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17974 ns 17974 ns 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 176 ns 176 ns 4 lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 0.98 % 0.98 % 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 15997 ns 15997 ns 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 15999 ns 15999 ns 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 80.5 ns 80.5 ns 4 lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 0.50 % 0.50 % 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 15776 ns 15776 ns 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 15795 ns 15795 ns 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 216 ns 216 ns 4 lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.37 % 1.37 % 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18991 ns 18991 ns 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18631 ns 18631 ns 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 938 ns 938 ns 4 lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.94 % 4.94 % 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 1364 ns 1364 ns 4 std::stringstream str; ... str << str_var1 << str_var2;_median 1352 ns 1352 ns 4 std::stringstream str; ... str << str_var1 << str_var2;_stddev 31.3 ns 31.3 ns 4 std::stringstream str; ... str << str_var1 << str_var2;_cv 2.29 % 2.29 % 4 std::string str; ... str += str_var1 + str_var2;_mean 1342 ns 1342 ns 4 std::string str; ... str += str_var1 + str_var2;_median 1343 ns 1343 ns 4 std::string str; ... str += str_var1 + str_var2;_stddev 12.1 ns 12.1 ns 4 std::string str; ... str += str_var1 + str_var2;_cv 0.90 % 0.90 % 4 lstringa<16> str; ... str += str_var1 + str_var2;_mean 523 ns 523 ns 4 lstringa<16> str; ... str += str_var1 + str_var2;_median 523 ns 523 ns 4 lstringa<16> str; ... str += str_var1 + str_var2;_stddev 1.97 ns 1.97 ns 4 lstringa<16> str; ... str += str_var1 + str_var2;_cv 0.38 % 0.38 % 4 lstringa<128> str; ... str += str_var1 + str_var2;_mean 443 ns 443 ns 4 lstringa<128> str; ... str += str_var1 + str_var2;_median 441 ns 441 ns 4 lstringa<128> str; ... str += str_var1 + str_var2;_stddev 24.2 ns 24.2 ns 4 lstringa<128> str; ... str += str_var1 + str_var2;_cv 5.46 % 5.46 % 4 lstringa<512> str; ... str += str_var1 + str_var2;_mean 409 ns 409 ns 4 lstringa<512> str; ... str += str_var1 + str_var2;_median 411 ns 411 ns 4 lstringa<512> str; ... str += str_var1 + str_var2;_stddev 15.7 ns 15.7 ns 4 lstringa<512> str; ... str += str_var1 + str_var2;_cv 3.84 % 3.84 % 4 lstringa<1024> str; ... str += str_var1 + str_var2;_mean 306 ns 306 ns 4 lstringa<1024> str; ... str += str_var1 + str_var2;_median 305 ns 305 ns 4 lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 3.93 ns 3.93 ns 4 lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.29 % 1.29 % 4 -- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000 std::stringstream str; str << "test = " << k << " times";_mean 3115 ns 3115 ns 4 std::stringstream str; str << "test = " << k << " times";_median 3117 ns 3117 ns 4 std::stringstream str; str << "test = " << k << " times";_stddev 85.5 ns 85.5 ns 4 std::stringstream str; str << "test = " << k << " times";_cv 2.74 % 2.74 % 4 std::string str = "test = " + std::to_string(k) + " times";_mean 437 ns 437 ns 4 std::string str = "test = " + std::to_string(k) + " times";_median 437 ns 437 ns 4 std::string str = "test = " + std::to_string(k) + " times";_stddev 5.54 ns 5.54 ns 4 std::string str = "test = " + std::to_string(k) + " times";_cv 1.27 % 1.27 % 4 char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1382 ns 1382 ns 4 char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1365 ns 1365 ns 4 char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 48.9 ns 48.9 ns 4 char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 3.54 % 3.54 % 4 std::string str = std::format("test = {} times", k);_mean 1121 ns 1121 ns 4 std::string str = std::format("test = {} times", k);_median 1114 ns 1114 ns 4 std::string str = std::format("test = {} times", k);_stddev 38.3 ns 38.3 ns 4 std::string str = std::format("test = {} times", k);_cv 3.41 % 3.41 % 4 lstringa<8> str; str.format("test = {} times", k);_mean 1269 ns 1269 ns 4 lstringa<8> str; str.format("test = {} times", k);_median 1266 ns 1266 ns 4 lstringa<8> str; str.format("test = {} times", k);_stddev 13.0 ns 13.0 ns 4 lstringa<8> str; str.format("test = {} times", k);_cv 1.03 % 1.03 % 4 lstringa<32> str; str.format("test = {} times", k);_mean 967 ns 967 ns 4 lstringa<32> str; str.format("test = {} times", k);_median 968 ns 968 ns 4 lstringa<32> str; str.format("test = {} times", k);_stddev 15.9 ns 15.9 ns 4 lstringa<32> str; str.format("test = {} times", k);_cv 1.65 % 1.65 % 4 lstringa<8> str = "test = " + k + " times";_mean 278 ns 278 ns 4 lstringa<8> str = "test = " + k + " times";_median 278 ns 278 ns 4 lstringa<8> str = "test = " + k + " times";_stddev 4.55 ns 4.55 ns 4 lstringa<8> str = "test = " + k + " times";_cv 1.64 % 1.64 % 4 lstringa<32> str = "test = " + k + " times";_mean 120 ns 120 ns 4 lstringa<32> str = "test = " + k + " times";_median 120 ns 120 ns 4 lstringa<32> str = "test = " + k + " times";_stddev 0.350 ns 0.350 ns 4 lstringa<32> str = "test = " + k + " times";_cv 0.29 % 0.29 % 4 stringa str = "test = " + k + " times";_mean 121 ns 121 ns 4 stringa str = "test = " + k + " times";_median 121 ns 121 ns 4 stringa str = "test = " + k + " times";_stddev 0.477 ns 0.477 ns 4 stringa str = "test = " + k + " times";_cv 0.39 % 0.39 % 4 -- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000 std::string::find + substr + std::strtol_mean 291 ns 291 ns 4 std::string::find + substr + std::strtol_median 291 ns 291 ns 4 std::string::find + substr + std::strtol_stddev 14.6 ns 14.6 ns 4 std::string::find + substr + std::strtol_cv 5.01 % 5.01 % 4 ssa::splitter + ssa::as_int_mean 159 ns 159 ns 4 ssa::splitter + ssa::as_int_median 159 ns 159 ns 4 ssa::splitter + ssa::as_int_stddev 5.98 ns 5.98 ns 4 ssa::splitter + ssa::as_int_cv 3.77 % 3.77 % 4 ssa::splitf + functor_mean 201 ns 201 ns 4 ssa::splitf + functor_median 198 ns 198 ns 4 ssa::splitf + functor_stddev 6.72 ns 6.72 ns 4 ssa::splitf + functor_cv 3.34 % 3.34 % 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 826 ns 826 ns 4 Naive (and wrong) replace symbols with std::string find + replace_median 818 ns 818 ns 4 Naive (and wrong) replace symbols with std::string find + replace_stddev 28.5 ns 28.5 ns 4 Naive (and wrong) replace symbols with std::string find + replace_cv 3.45 % 3.45 % 4 replace symbols with std::string find_first_of + replace_mean 2450 ns 2450 ns 4 replace symbols with std::string find_first_of + replace_median 2450 ns 2450 ns 4 replace symbols with std::string find_first_of + replace_stddev 37.7 ns 37.7 ns 4 replace symbols with std::string find_first_of + replace_cv 1.54 % 1.54 % 4 replace symbols with std::string_view find_first_of + copy_mean 1073 ns 1073 ns 4 replace symbols with std::string_view find_first_of + copy_median 1071 ns 1071 ns 4 replace symbols with std::string_view find_first_of + copy_stddev 15.3 ns 15.3 ns 4 replace symbols with std::string_view find_first_of + copy_cv 1.43 % 1.43 % 4 replace runtime symbols with string expressions and without remembering all search results_mean 1247 ns 1247 ns 4 replace runtime symbols with string expressions and without remembering all search results_median 1247 ns 1247 ns 4 replace runtime symbols with string expressions and without remembering all search results_stddev 39.3 ns 39.3 ns 4 replace runtime symbols with string expressions and without remembering all search results_cv 3.15 % 3.15 % 4 replace runtime symbols with simstr and memorization of all search results_mean 959 ns 959 ns 4 replace runtime symbols with simstr and memorization of all search results_median 947 ns 947 ns 4 replace runtime symbols with simstr and memorization of all search results_stddev 31.6 ns 31.6 ns 4 replace runtime symbols with simstr and memorization of all search results_cv 3.30 % 3.30 % 4 replace const symbols with string expressions and without remembering all search results_mean 1104 ns 1104 ns 4 replace const symbols with string expressions and without remembering all search results_median 1110 ns 1110 ns 4 replace const symbols with string expressions and without remembering all search results_stddev 20.9 ns 20.9 ns 4 replace const symbols with string expressions and without remembering all search results_cv 1.89 % 1.89 % 4 replace const symbols with string expressions and memorization of all search results_mean 804 ns 804 ns 4 replace const symbols with string expressions and memorization of all search results_median 803 ns 803 ns 4 replace const symbols with string expressions and memorization of all search results_stddev 4.71 ns 4.71 ns 4 replace const symbols with string expressions and memorization of all search results_cv 0.59 % 0.59 % 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 158 ns 158 ns 4 Short Naive (and wrong) replace symbols with std::string find + replace_median 158 ns 158 ns 4 Short Naive (and wrong) replace symbols with std::string find + replace_stddev 3.76 ns 3.76 ns 4 Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.38 % 2.38 % 4 Short replace symbols with std::string find_first_of + replace_mean 311 ns 311 ns 4 Short replace symbols with std::string find_first_of + replace_median 311 ns 311 ns 4 Short replace symbols with std::string find_first_of + replace_stddev 3.26 ns 3.26 ns 4 Short replace symbols with std::string find_first_of + replace_cv 1.05 % 1.05 % 4 Short replace symbols with std::string_view find_first_of + copy_mean 154 ns 154 ns 4 Short replace symbols with std::string_view find_first_of + copy_median 155 ns 155 ns 4 Short replace symbols with std::string_view find_first_of + copy_stddev 4.09 ns 4.09 ns 4 Short replace symbols with std::string_view find_first_of + copy_cv 2.66 % 2.66 % 4 Short replace runtime symbols with string expressions and without remembering all search results_mean 166 ns 166 ns 4 Short replace runtime symbols with string expressions and without remembering all search results_median 167 ns 167 ns 4 Short replace runtime symbols with string expressions and without remembering all search results_stddev 6.15 ns 6.15 ns 4 Short replace runtime symbols with string expressions and without remembering all search results_cv 3.70 % 3.70 % 4 Short replace runtime symbols with simstr and memorization of all search results_mean 174 ns 174 ns 4 Short replace runtime symbols with simstr and memorization of all search results_median 173 ns 173 ns 4 Short replace runtime symbols with simstr and memorization of all search results_stddev 4.16 ns 4.16 ns 4 Short replace runtime symbols with simstr and memorization of all search results_cv 2.39 % 2.39 % 4 Short replace const symbols with string expressions and without remembering all search results_mean 127 ns 127 ns 4 Short replace const symbols with string expressions and without remembering all search results_median 127 ns 127 ns 4 Short replace const symbols with string expressions and without remembering all search results_stddev 1.66 ns 1.66 ns 4 Short replace const symbols with string expressions and without remembering all search results_cv 1.31 % 1.31 % 4 Short replace const symbols with string expressions and memorization of all search results_mean 138 ns 138 ns 4 Short replace const symbols with string expressions and memorization of all search results_median 137 ns 137 ns 4 Short replace const symbols with string expressions and memorization of all search results_stddev 1.46 ns 1.46 ns 4 Short replace const symbols with string expressions and memorization of all search results_cv 1.06 % 1.06 % 4 ----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 replace bb to ---- in std::string|64_mean 152 ns 152 ns 4 replace bb to ---- in std::string|64_median 152 ns 152 ns 4 replace bb to ---- in std::string|64_stddev 2.17 ns 2.17 ns 4 replace bb to ---- in std::string|64_cv 1.43 % 1.43 % 4 replace bb to ---- in std::string|256_mean 525 ns 525 ns 4 replace bb to ---- in std::string|256_median 520 ns 520 ns 4 replace bb to ---- in std::string|256_stddev 15.6 ns 15.6 ns 4 replace bb to ---- in std::string|256_cv 2.97 % 2.97 % 4 replace bb to ---- in std::string|512_mean 1078 ns 1078 ns 4 replace bb to ---- in std::string|512_median 1068 ns 1068 ns 4 replace bb to ---- in std::string|512_stddev 26.8 ns 26.8 ns 4 replace bb to ---- in std::string|512_cv 2.49 % 2.49 % 4 replace bb to ---- in std::string|1024_mean 2264 ns 2264 ns 4 replace bb to ---- in std::string|1024_median 2265 ns 2265 ns 4 replace bb to ---- in std::string|1024_stddev 66.6 ns 66.6 ns 4 replace bb to ---- in std::string|1024_cv 2.94 % 2.94 % 4 replace bb to ---- in std::string|2048_mean 5910 ns 5910 ns 4 replace bb to ---- in std::string|2048_median 5814 ns 5814 ns 4 replace bb to ---- in std::string|2048_stddev 429 ns 429 ns 4 replace bb to ---- in std::string|2048_cv 7.26 % 7.26 % 4 replace bb to ---- in lstringa<8>|64_mean 127 ns 127 ns 4 replace bb to ---- in lstringa<8>|64_median 127 ns 127 ns 4 replace bb to ---- in lstringa<8>|64_stddev 6.87 ns 6.87 ns 4 replace bb to ---- in lstringa<8>|64_cv 5.42 % 5.42 % 4 replace bb to ---- in lstringa<8>|256_mean 425 ns 425 ns 4 replace bb to ---- in lstringa<8>|256_median 420 ns 420 ns 4 replace bb to ---- in lstringa<8>|256_stddev 13.2 ns 13.2 ns 4 replace bb to ---- in lstringa<8>|256_cv 3.11 % 3.11 % 4 replace bb to ---- in lstringa<8>|512_mean 801 ns 801 ns 4 replace bb to ---- in lstringa<8>|512_median 797 ns 797 ns 4 replace bb to ---- in lstringa<8>|512_stddev 13.4 ns 13.4 ns 4 replace bb to ---- in lstringa<8>|512_cv 1.67 % 1.67 % 4 replace bb to ---- in lstringa<8>|1024_mean 1639 ns 1639 ns 4 replace bb to ---- in lstringa<8>|1024_median 1633 ns 1633 ns 4 replace bb to ---- in lstringa<8>|1024_stddev 68.5 ns 68.5 ns 4 replace bb to ---- in lstringa<8>|1024_cv 4.18 % 4.18 % 4 replace bb to ---- in lstringa<8>|2048_mean 3077 ns 3077 ns 4 replace bb to ---- in lstringa<8>|2048_median 3055 ns 3055 ns 4 replace bb to ---- in lstringa<8>|2048_stddev 82.1 ns 82.1 ns 4 replace bb to ---- in lstringa<8>|2048_cv 2.67 % 2.67 % 4 replace bb to ---- by init stringa|64_mean 92.5 ns 92.5 ns 4 replace bb to ---- by init stringa|64_median 92.6 ns 92.6 ns 4 replace bb to ---- by init stringa|64_stddev 2.76 ns 2.76 ns 4 replace bb to ---- by init stringa|64_cv 2.98 % 2.98 % 4 replace bb to ---- by init stringa|256_mean 293 ns 293 ns 4 replace bb to ---- by init stringa|256_median 290 ns 290 ns 4 replace bb to ---- by init stringa|256_stddev 5.68 ns 5.68 ns 4 replace bb to ---- by init stringa|256_cv 1.94 % 1.94 % 4 replace bb to ---- by init stringa|512_mean 687 ns 687 ns 4 replace bb to ---- by init stringa|512_median 677 ns 677 ns 4 replace bb to ---- by init stringa|512_stddev 26.9 ns 26.9 ns 4 replace bb to ---- by init stringa|512_cv 3.92 % 3.92 % 4 replace bb to ---- by init stringa|1024_mean 1581 ns 1581 ns 4 replace bb to ---- by init stringa|1024_median 1585 ns 1585 ns 4 replace bb to ---- by init stringa|1024_stddev 16.8 ns 16.8 ns 4 replace bb to ---- by init stringa|1024_cv 1.06 % 1.06 % 4 replace bb to ---- by init stringa|2048_mean 3167 ns 3167 ns 4 replace bb to ---- by init stringa|2048_median 3165 ns 3165 ns 4 replace bb to ---- by init stringa|2048_stddev 19.8 ns 19.8 ns 4 replace bb to ---- by init stringa|2048_cv 0.62 % 0.62 % 4 ----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 replace bb to -- in std::string|64_mean 112 ns 112 ns 4 replace bb to -- in std::string|64_median 111 ns 111 ns 4 replace bb to -- in std::string|64_stddev 4.04 ns 4.04 ns 4 replace bb to -- in std::string|64_cv 3.60 % 3.60 % 4 replace bb to -- in std::string|256_mean 376 ns 376 ns 4 replace bb to -- in std::string|256_median 376 ns 376 ns 4 replace bb to -- in std::string|256_stddev 3.86 ns 3.86 ns 4 replace bb to -- in std::string|256_cv 1.03 % 1.03 % 4 replace bb to -- in std::string|512_mean 720 ns 720 ns 4 replace bb to -- in std::string|512_median 718 ns 718 ns 4 replace bb to -- in std::string|512_stddev 29.7 ns 29.7 ns 4 replace bb to -- in std::string|512_cv 4.13 % 4.13 % 4 replace bb to -- in std::string|1024_mean 1438 ns 1438 ns 4 replace bb to -- in std::string|1024_median 1423 ns 1423 ns 4 replace bb to -- in std::string|1024_stddev 64.0 ns 64.0 ns 4 replace bb to -- in std::string|1024_cv 4.45 % 4.45 % 4 replace bb to -- in std::string|2048_mean 2839 ns 2839 ns 4 replace bb to -- in std::string|2048_median 2837 ns 2837 ns 4 replace bb to -- in std::string|2048_stddev 40.2 ns 40.2 ns 4 replace bb to -- in std::string|2048_cv 1.42 % 1.42 % 4 replace bb to -- in lstringa<8>|64_mean 93.2 ns 93.2 ns 4 replace bb to -- in lstringa<8>|64_median 93.3 ns 93.3 ns 4 replace bb to -- in lstringa<8>|64_stddev 0.871 ns 0.871 ns 4 replace bb to -- in lstringa<8>|64_cv 0.93 % 0.93 % 4 replace bb to -- in lstringa<8>|256_mean 297 ns 297 ns 4 replace bb to -- in lstringa<8>|256_median 296 ns 296 ns 4 replace bb to -- in lstringa<8>|256_stddev 9.63 ns 9.63 ns 4 replace bb to -- in lstringa<8>|256_cv 3.25 % 3.25 % 4 replace bb to -- in lstringa<8>|512_mean 519 ns 519 ns 4 replace bb to -- in lstringa<8>|512_median 517 ns 517 ns 4 replace bb to -- in lstringa<8>|512_stddev 8.66 ns 8.66 ns 4 replace bb to -- in lstringa<8>|512_cv 1.67 % 1.67 % 4 replace bb to -- in lstringa<8>|1024_mean 1081 ns 1081 ns 4 replace bb to -- in lstringa<8>|1024_median 1081 ns 1081 ns 4 replace bb to -- in lstringa<8>|1024_stddev 7.31 ns 7.31 ns 4 replace bb to -- in lstringa<8>|1024_cv 0.68 % 0.68 % 4 replace bb to -- in lstringa<8>|2048_mean 2117 ns 2117 ns 4 replace bb to -- in lstringa<8>|2048_median 2132 ns 2132 ns 4 replace bb to -- in lstringa<8>|2048_stddev 50.0 ns 50.0 ns 4 replace bb to -- in lstringa<8>|2048_cv 2.36 % 2.36 % 4 replace bb to -- by init stringa|64_mean 75.5 ns 75.5 ns 4 replace bb to -- by init stringa|64_median 75.4 ns 75.4 ns 4 replace bb to -- by init stringa|64_stddev 0.702 ns 0.702 ns 4 replace bb to -- by init stringa|64_cv 0.93 % 0.93 % 4 replace bb to -- by init stringa|256_mean 243 ns 243 ns 4 replace bb to -- by init stringa|256_median 245 ns 245 ns 4 replace bb to -- by init stringa|256_stddev 8.83 ns 8.84 ns 4 replace bb to -- by init stringa|256_cv 3.63 % 3.63 % 4 replace bb to -- by init stringa|512_mean 429 ns 429 ns 4 replace bb to -- by init stringa|512_median 428 ns 428 ns 4 replace bb to -- by init stringa|512_stddev 5.87 ns 5.87 ns 4 replace bb to -- by init stringa|512_cv 1.37 % 1.37 % 4 replace bb to -- by init stringa|1024_mean 909 ns 909 ns 4 replace bb to -- by init stringa|1024_median 904 ns 904 ns 4 replace bb to -- by init stringa|1024_stddev 43.4 ns 43.4 ns 4 replace bb to -- by init stringa|1024_cv 4.77 % 4.77 % 4 replace bb to -- by init stringa|2048_mean 1687 ns 1687 ns 4 replace bb to -- by init stringa|2048_median 1682 ns 1682 ns 4 replace bb to -- by init stringa|2048_stddev 16.6 ns 16.6 ns 4 replace bb to -- by init stringa|2048_cv 0.98 % 0.98 % 4 ----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 hashStrMapA emplace & find stringa;_mean 3719139 ns 3719152 ns 4 hashStrMapA emplace & find stringa;_median 3730503 ns 3730516 ns 4 hashStrMapA emplace & find stringa;_stddev 107544 ns 107543 ns 4 hashStrMapA emplace & find stringa;_cv 2.89 % 2.89 % 4 std::unordered_map emplace & find std::string;_mean 3546099 ns 3546110 ns 4 std::unordered_map emplace & find std::string;_median 3543718 ns 3543729 ns 4 std::unordered_map emplace & find std::string;_stddev 96572 ns 96575 ns 4 std::unordered_map emplace & find std::string;_cv 2.72 % 2.72 % 4 hashStrMapA emplace & find ssa;_mean 3596978 ns 3596990 ns 4 hashStrMapA emplace & find ssa;_median 3582222 ns 3582233 ns 4 hashStrMapA emplace & find ssa;_stddev 32356 ns 32357 ns 4 hashStrMapA emplace & find ssa;_cv 0.90 % 0.90 % 4 std::unordered_map emplace & find std::string_view;_mean 4271995 ns 4272007 ns 4 std::unordered_map emplace & find std::string_view;_median 4269262 ns 4269275 ns 4 std::unordered_map emplace & find std::string_view;_stddev 25174 ns 25173 ns 4 std::unordered_map emplace & find std::string_view;_cv 0.59 % 0.59 % 4 ----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 Build func full name std::string;_mean 652 ns 652 ns 4 Build func full name std::string;_median 646 ns 646 ns 4 Build func full name std::string;_stddev 24.3 ns 24.3 ns 4 Build func full name std::string;_cv 3.72 % 3.72 % 4 Build func full name std::string 1;_mean 722 ns 722 ns 4 Build func full name std::string 1;_median 723 ns 723 ns 4 Build func full name std::string 1;_stddev 12.7 ns 12.7 ns 4 Build func full name std::string 1;_cv 1.77 % 1.77 % 4 Build func full name std::stream;_mean 2537 ns 2537 ns 4 Build func full name std::stream;_median 2515 ns 2516 ns 4 Build func full name std::stream;_stddev 55.7 ns 55.7 ns 4 Build func full name std::stream;_cv 2.20 % 2.20 % 4 Build func full name stringa;_mean 483 ns 483 ns 4 Build func full name stringa;_median 475 ns 475 ns 4 Build func full name stringa;_stddev 22.4 ns 22.4 ns 4 Build func full name stringa;_cv 4.63 % 4.63 % 4 Build func full name stringa 1;_mean 599 ns 599 ns 4 Build func full name stringa 1;_median 597 ns 597 ns 4 Build func full name stringa 1;_stddev 14.7 ns 14.7 ns 4 Build func full name stringa 1;_cv 2.46 % 2.46 % 4 ----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000 To upper case std::wstring_mean 150 ns 150 ns 4 To upper case std::wstring_median 150 ns 150 ns 4 To upper case std::wstring_stddev 2.86 ns 2.86 ns 4 To upper case std::wstring_cv 1.90 % 1.90 % 4 To upper case lstringw<15>_mean 39.8 ns 39.8 ns 4 To upper case lstringw<15>_median 39.9 ns 39.9 ns 4 To upper case lstringw<15>_stddev 0.174 ns 0.174 ns 4 To upper case lstringw<15>_cv 0.44 % 0.44 % 4