- Fix build for Clang with libc++
- Update benchmarks.
This commit is contained in:
Aleksandr Orefkov 2026-02-27 23:05:49 +03:00
parent a083ff1b8b
commit c8fb92fee0
22 changed files with 6527 additions and 5428 deletions

View File

@ -5,7 +5,7 @@ include(FetchContent)
project(
simstr
VERSION 1.7.1
VERSION 1.7.2
DESCRIPTION "Yet another modern C++ string library"
HOMEPAGE_URL "https://github.com/orefkov/simstr"
LANGUAGES CXX
@ -29,6 +29,12 @@ option(SIMSTR_BUILD_TESTS "Build tests" ON)
option(SIMSTR_BENCHMARKS "Build benchmarks" Off)
option(USE_SYSTEM_DEPS "Use system dependencies" Off)
cmake_dependent_option(SIMSTR_LINK_NATVIS "Link natvis file" On CAN_LINK_NATVIS Off)
cmake_dependent_option(SIMSTR_USE_LIBCXX "Use libc++" Off "NOT CAN_LINK_NATVIS" Off)
if (SIMSTR_USE_LIBCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
endif(SIMSTR_USE_LIBCXX)
add_library(simstr_simstr
src/sstring.cpp
@ -142,6 +148,10 @@ function(GBencmark)
set(BENCHMARK_INSTALL_DOCS OFF)
set(BENCHMARK_DOWNLOAD_DEPENDENCIES ON)
set(BENCHMARK_ENABLE_GTEST_TESTS OFF)
if (SIMSTR_USE_LIBCXX)
set(BENCHMARK_USE_LIBCXX On)
endif(SIMSTR_USE_LIBCXX)
add_compile_definitions(BENCHMARK_STATIC_DEFINE)
FetchContent_MakeAvailable(googlebench)
if(TARGET benchmark)

View File

@ -134,8 +134,8 @@
"inherits": "base",
"displayName": "Linux base",
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc-13",
"CMAKE_CXX_COMPILER": "g++-13",
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true
},
"condition": {
@ -169,7 +169,7 @@
},
{
"name": "linux-release",
"displayName": "Linux Release",
"displayName": "Linux Release GCC",
"inherits": "linux-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
@ -181,8 +181,20 @@
"inherits": "linux-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "clang-21",
"CMAKE_CXX_COMPILER": "clang++-21"
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "linux-release-clang-libcxx",
"displayName": "Linux Release Clang libc++",
"inherits": "linux-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"SIMSTR_USE_LIBCXX": true,
"SIMSTR_BENCHMARKS": true
}
}
],

View File

@ -6,7 +6,12 @@ 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}")
target_compile_definitions(benchStr PRIVATE
SIMSTR_VERSION="${PROJECT_VERSION}"
CXX_COMPILER_ID="${CMAKE_CXX_COMPILER_ID}"
CXX_COMPILER_VERSION="${CMAKE_CXX_COMPILER_VERSION}"
)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt

View File

@ -1,5 +1,5 @@
/*
* ver. 1.7.1
* ver. 1.7.2
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Бенчмарки
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
@ -418,6 +418,17 @@ void FmtFormat(benchmark::State& state) {
}
void StdFormatSize(benchmark::State& state) {
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
size_t len = std::formatted_size("abcdefghihklmopqr {:#010o} end", i);
std::string str(len, 0);
std::format_to_n(str.data(), len, "abcdefghihklmopqr {:#010o} end", i);
benchmark::DoNotOptimize(str);
}
}
}
BENCHMARK(__)->Name("---- format/vformat and subst/vsubst octal number to 32 symbols result ----")->Repetitions(1);
BENCHMARK(ConcatSimToSimOct) ->Name("\"abcdefghihklmopqr \"_ss + i / 0x8a010_fmt + \" end\"");
BENCHMARK(SubstSimToSimOct) ->Name("e_subst(\"abcdefghihklmopqr {} end\", i / 0x8a010_fmt)");
@ -426,6 +437,7 @@ BENCHMARK(FmtFormatComp) ->Name("fmt::format(FMT_COMPILE(\"abcdefghihklmo
BENCHMARK(FmtFormat) ->Name("fmt::format(\"abcdefghihklmopqr {:#010o} end\", i)");
BENCHMARK(FormatStdToStdOct) ->Name("std::format(\"abcdefghihklmopqr {:#010o} end\", i)");
BENCHMARK(VFormatStdToStdOct) ->Name("std::vformat(pattern, std::make_format_args(i))");
BENCHMARK(StdFormatSize) ->Name("std::format with std::formatted_size");
BENCHMARK(StreamStdToStdOct) ->Name("strm << \"abcdefghihklmopqr 0\" << std::oct << std::setw(9) << std::setfill('0') << i << \" end\"");
void ConcatStdToStdS(benchmark::State& state) {
@ -957,11 +969,16 @@ void ToDoubleStr(benchmark::State& state, const std::string& s, double c) {
}
}
template<typename K = char>
void ToDoubleFromChars(benchmark::State& state, const std::string_view& s, double c) {
for (auto _: state) {
double res = 0;
if (std::from_chars(s.data(), s.data() + s.size(), res).ec != std::errc{}) {
state.SkipWithError("not equal");
if constexpr (requires { std::from_chars(std::declval<K*>(), std::declval<K*>(), std::declval<double&>()); }) {
if (std::from_chars((const K*)s.data(), (const K*)s.data() + s.size(), res).ec != std::errc{}) {
state.SkipWithError("not equal");
}
} else {
state.SkipWithError("not implemented");
}
#ifdef CHECK_RESULT
if (res != c) {
@ -2650,7 +2667,12 @@ BENCHMARK(UpperCaseSim)->Name("To upper case lstringw<15>");
int main(int argc, char** argv) {
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;
<< "Results: https://orefkov.github.io/simstr/results.html\n"
<< "Compiler " << CXX_COMPILER_ID << " " << CXX_COMPILER_VERSION
#ifdef _LIBCPP_VERSION
<< ", use libc++"
#endif
<< std::endl;
#ifdef EMSCRIPTEN
EM_ASM({ console.log(navigator.userAgent); });

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,989 @@
Benchmarks of simstr, version 1.7.2
Sources: https://github.com/orefkov/simstr
Results: https://orefkov.github.io/simstr/results.html
Compiler GNU 15.2.0
2026-02-27T18:08:43+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.00, 0.00, 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 160 ns 160 ns 4
Concat email std::format_median 160 ns 160 ns 4
Concat email std::format_stddev 2.26 ns 2.26 ns 4
Concat email std::format_cv 1.41 % 1.41 % 4
Concat email std::stringstream_mean 318 ns 318 ns 4
Concat email std::stringstream_median 317 ns 317 ns 4
Concat email std::stringstream_stddev 3.89 ns 3.88 ns 4
Concat email std::stringstream_cv 1.22 % 1.22 % 4
Concat email stringzilla append_mean 108 ns 108 ns 4
Concat email stringzilla append_median 107 ns 107 ns 4
Concat email stringzilla append_stddev 4.44 ns 4.44 ns 4
Concat email stringzilla append_cv 4.12 % 4.12 % 4
Concat email stringzilla concat_mean 42.7 ns 42.7 ns 4
Concat email stringzilla concat_median 42.8 ns 42.8 ns 4
Concat email stringzilla concat_stddev 1.44 ns 1.44 ns 4
Concat email stringzilla concat_cv 3.38 % 3.38 % 4
Concat email std::string append_mean 77.9 ns 78.0 ns 4
Concat email std::string append_median 78.0 ns 78.1 ns 4
Concat email std::string append_stddev 1.48 ns 1.48 ns 4
Concat email std::string append_cv 1.90 % 1.90 % 4
Concat email std::string by strexpr_mean 33.6 ns 33.6 ns 4
Concat email std::string by strexpr_median 33.6 ns 33.6 ns 4
Concat email std::string by strexpr_stddev 0.759 ns 0.759 ns 4
Concat email std::string by strexpr_cv 2.26 % 2.26 % 4
Concat email stringa_mean 39.7 ns 39.7 ns 4
Concat email stringa_median 39.7 ns 39.7 ns 4
Concat email stringa_stddev 0.737 ns 0.737 ns 4
Concat email stringa_cv 1.86 % 1.86 % 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 207 ns 207 ns 4
Concat std::string and number by std to std::string_median 207 ns 207 ns 4
Concat std::string and number by std to std::string_stddev 1.29 ns 1.29 ns 4
Concat std::string and number by std to std::string_cv 0.62 % 0.62 % 4
Concat std::string and number by StrExpr to std::string_mean 101 ns 101 ns 4
Concat std::string and number by StrExpr to std::string_median 98.3 ns 98.3 ns 4
Concat std::string and number by StrExpr to std::string_stddev 9.04 ns 9.04 ns 4
Concat std::string and number by StrExpr to std::string_cv 8.95 % 8.95 % 4
Concat stringa and number by StrExpr to simstr::stringa_mean 68.1 ns 68.1 ns 4
Concat stringa and number by StrExpr to simstr::stringa_median 67.9 ns 67.9 ns 4
Concat stringa and number by StrExpr to simstr::stringa_stddev 0.725 ns 0.725 ns 4
Concat stringa and number by StrExpr to simstr::stringa_cv 1.06 % 1.06 % 4
Concat stringa and number by e_concat to simstr::stringa_mean 76.4 ns 76.4 ns 4
Concat stringa and number by e_concat to simstr::stringa_median 77.1 ns 77.1 ns 4
Concat stringa and number by e_concat to simstr::stringa_stddev 2.85 ns 2.84 ns 4
Concat stringa and number by e_concat to simstr::stringa_cv 3.73 % 3.72 % 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 742 ns 742 ns 4
Concat std::string and format hex number and literal to std::string_median 742 ns 742 ns 4
Concat std::string and format hex number and literal to std::string_stddev 16.5 ns 16.5 ns 4
Concat std::string and format hex number and literal to std::string_cv 2.23 % 2.23 % 4
std::format std::string and hex number by literal to std::string_mean 850 ns 850 ns 4
std::format std::string and hex number by literal to std::string_median 852 ns 852 ns 4
std::format std::string and hex number by literal to std::string_stddev 15.4 ns 15.4 ns 4
std::format std::string and hex number by literal to std::string_cv 1.82 % 1.82 % 4
Concat std::string and std::to_chars and string to std::string_mean 194 ns 194 ns 4
Concat std::string and std::to_chars and string to std::string_median 195 ns 195 ns 4
Concat std::string and std::to_chars and string to std::string_stddev 3.28 ns 3.28 ns 4
Concat std::string and std::to_chars and string to std::string_cv 1.69 % 1.69 % 4
Concat std::string and hex number and literal by StrExpr to std::string_mean 121 ns 121 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_median 121 ns 121 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_stddev 0.924 ns 0.924 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_cv 0.76 % 0.76 % 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 116 ns 116 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 0.500 ns 0.500 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 0.43 % 0.43 % 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 121 ns 121 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_median 121 ns 121 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 2.16 ns 2.16 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.78 % 1.78 % 4
Subst stringa and hex number by e_subst literal to simstr::stringa_mean 165 ns 165 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_median 165 ns 165 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 2.30 ns 2.30 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_cv 1.39 % 1.39 % 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 275 ns 275 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 274 ns 274 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 6.30 ns 6.30 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 2.29 % 2.29 % 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 259 ns 259 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 261 ns 261 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 4.08 ns 4.08 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 1.57 % 1.57 % 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 314 ns 314 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 312 ns 312 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 8.25 ns 8.25 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 2.63 % 2.63 % 4
e_vsubst(pattern, i / 0x8a010_fmt)_mean 571 ns 571 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_median 571 ns 571 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_stddev 8.09 ns 8.09 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_cv 1.42 % 1.42 % 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 632 ns 632 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 634 ns 634 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 11.4 ns 11.4 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 1.80 % 1.80 % 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 747 ns 747 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 745 ns 745 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 13.1 ns 13.1 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 1.75 % 1.75 % 4
std::format("abcdefghihklmopqr {:#010o} end", i)_mean 1210 ns 1210 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_median 1208 ns 1208 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 17.5 ns 17.5 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_cv 1.44 % 1.44 % 4
std::vformat(pattern, std::make_format_args(i))_mean 1241 ns 1241 ns 4
std::vformat(pattern, std::make_format_args(i))_median 1225 ns 1225 ns 4
std::vformat(pattern, std::make_format_args(i))_stddev 31.2 ns 31.1 ns 4
std::vformat(pattern, std::make_format_args(i))_cv 2.51 % 2.51 % 4
std::format with std::formatted_size_mean 2117 ns 2117 ns 4
std::format with std::formatted_size_median 2116 ns 2116 ns 4
std::format with std::formatted_size_stddev 19.1 ns 19.1 ns 4
std::format with std::formatted_size_cv 0.90 % 0.90 % 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 1954 ns 1954 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 1944 ns 1944 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 31.4 ns 31.4 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 1.61 % 1.61 % 4
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 45.3 ns 45.3 ns 4
Concat std::string by std to std::string_median 45.0 ns 45.0 ns 4
Concat std::string by std to std::string_stddev 0.762 ns 0.762 ns 4
Concat std::string by std to std::string_cv 1.68 % 1.68 % 4
Concat std::string by StrExpr to std::string_mean 29.9 ns 29.9 ns 4
Concat std::string by StrExpr to std::string_median 29.9 ns 29.9 ns 4
Concat std::string by StrExpr to std::string_stddev 0.750 ns 0.750 ns 4
Concat std::string by StrExpr to std::string_cv 2.51 % 2.51 % 4
Concat stringa by StrExpr to stringa_mean 26.7 ns 26.7 ns 4
Concat stringa by StrExpr to stringa_median 26.7 ns 26.7 ns 4
Concat stringa by StrExpr to stringa_stddev 0.263 ns 0.263 ns 4
Concat stringa by StrExpr to stringa_cv 0.99 % 0.99 % 4
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 116 ns 116 ns 4
Find concat three std::string_median 116 ns 116 ns 4
Find concat three std::string_stddev 2.29 ns 2.29 ns 4
Find concat three std::string_cv 1.97 % 1.97 % 4
Find concat three strexpr_mean 38.4 ns 38.4 ns 4
Find concat three strexpr_median 38.4 ns 38.4 ns 4
Find concat three strexpr_stddev 0.966 ns 0.966 ns 4
Find concat three strexpr_cv 2.52 % 2.52 % 4
Find concat three simstr_mean 14.4 ns 14.4 ns 4
Find concat three simstr_median 14.4 ns 14.4 ns 4
Find concat three simstr_stddev 0.445 ns 0.445 ns 4
Find concat three simstr_cv 3.08 % 3.08 % 4
Find concat three stringzilla string_mean 118 ns 118 ns 4
Find concat three stringzilla string_median 117 ns 117 ns 4
Find concat three stringzilla string_stddev 1.71 ns 1.71 ns 4
Find concat three stringzilla string_cv 1.45 % 1.45 % 4
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 8.40 ns 8.40 ns 4
BuildTypeNameStr 0/0_median 8.36 ns 8.36 ns 4
BuildTypeNameStr 0/0_stddev 0.165 ns 0.165 ns 4
BuildTypeNameStr 0/0_cv 1.97 % 1.97 % 4
BuildTypeNameExp 0/0_mean 6.68 ns 6.68 ns 4
BuildTypeNameExp 0/0_median 6.71 ns 6.71 ns 4
BuildTypeNameExp 0/0_stddev 0.148 ns 0.148 ns 4
BuildTypeNameExp 0/0_cv 2.22 % 2.22 % 4
BuildTypeNameSim 0/0_mean 4.83 ns 4.83 ns 4
BuildTypeNameSim 0/0_median 4.82 ns 4.82 ns 4
BuildTypeNameSim 0/0_stddev 0.072 ns 0.072 ns 4
BuildTypeNameSim 0/0_cv 1.49 % 1.49 % 4
BuildTypeNameStr 10/10_mean 72.5 ns 72.5 ns 4
BuildTypeNameStr 10/10_median 72.5 ns 72.5 ns 4
BuildTypeNameStr 10/10_stddev 1.15 ns 1.15 ns 4
BuildTypeNameStr 10/10_cv 1.58 % 1.58 % 4
BuildTypeNameExp 10/10_mean 26.5 ns 26.5 ns 4
BuildTypeNameExp 10/10_median 26.5 ns 26.5 ns 4
BuildTypeNameExp 10/10_stddev 0.255 ns 0.255 ns 4
BuildTypeNameExp 10/10_cv 0.96 % 0.96 % 4
BuildTypeNameSim 10/10_mean 21.7 ns 21.7 ns 4
BuildTypeNameSim 10/10_median 21.7 ns 21.7 ns 4
BuildTypeNameSim 10/10_stddev 0.405 ns 0.406 ns 4
BuildTypeNameSim 10/10_cv 1.87 % 1.87 % 4
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 219 ns 219 ns 4
Concat with replace str_median 216 ns 216 ns 4
Concat with replace str_stddev 7.44 ns 7.44 ns 4
Concat with replace str_cv 3.40 % 3.40 % 4
Concat with replace exp_mean 129 ns 129 ns 4
Concat with replace exp_median 130 ns 130 ns 4
Concat with replace exp_stddev 3.46 ns 3.45 ns 4
Concat with replace exp_cv 2.67 % 2.67 % 4
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 1.09 ns 1.09 ns 4
std::string e;_median 1.10 ns 1.10 ns 4
std::string e;_stddev 0.022 ns 0.022 ns 4
std::string e;_cv 1.97 % 1.97 % 4
std::string_view e;_mean 0.740 ns 0.740 ns 4
std::string_view e;_median 0.739 ns 0.739 ns 4
std::string_view e;_stddev 0.014 ns 0.014 ns 4
std::string_view e;_cv 1.84 % 1.84 % 4
ssa e;_mean 0.181 ns 0.181 ns 4
ssa e;_median 0.179 ns 0.179 ns 4
ssa e;_stddev 0.004 ns 0.004 ns 4
ssa e;_cv 2.31 % 2.31 % 4
stringa e;_mean 0.737 ns 0.737 ns 4
stringa e;_median 0.738 ns 0.738 ns 4
stringa e;_stddev 0.007 ns 0.007 ns 4
stringa e;_cv 0.91 % 0.91 % 4
lstringa<20> e;_mean 1.10 ns 1.10 ns 4
lstringa<20> e;_median 1.10 ns 1.10 ns 4
lstringa<20> e;_stddev 0.005 ns 0.005 ns 4
lstringa<20> e;_cv 0.48 % 0.48 % 4
lstringa<40> e;_mean 1.10 ns 1.10 ns 4
lstringa<40> e;_median 1.10 ns 1.10 ns 4
lstringa<40> e;_stddev 0.010 ns 0.010 ns 4
lstringa<40> e;_cv 0.95 % 0.95 % 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 4
std::string e = "Test text";_median 1.82 ns 1.82 ns 4
std::string e = "Test text";_stddev 0.035 ns 0.035 ns 4
std::string e = "Test text";_cv 1.90 % 1.90 % 4
std::string_view e = "Test text";_mean 0.730 ns 0.730 ns 4
std::string_view e = "Test text";_median 0.731 ns 0.731 ns 4
std::string_view e = "Test text";_stddev 0.007 ns 0.007 ns 4
std::string_view e = "Test text";_cv 0.96 % 0.96 % 4
ssa e = "Test text";_mean 0.729 ns 0.729 ns 4
ssa e = "Test text";_median 0.730 ns 0.730 ns 4
ssa e = "Test text";_stddev 0.009 ns 0.009 ns 4
ssa e = "Test text";_cv 1.30 % 1.30 % 4
stringa e = "Test text";_mean 1.10 ns 1.10 ns 4
stringa e = "Test text";_median 1.11 ns 1.11 ns 4
stringa e = "Test text";_stddev 0.014 ns 0.014 ns 4
stringa e = "Test text";_cv 1.23 % 1.23 % 4
lstringa<20> e = "Test text";_mean 1.83 ns 1.83 ns 4
lstringa<20> e = "Test text";_median 1.84 ns 1.84 ns 4
lstringa<20> e = "Test text";_stddev 0.015 ns 0.015 ns 4
lstringa<20> e = "Test text";_cv 0.82 % 0.82 % 4
lstringa<40> e = "Test text";_mean 1.85 ns 1.85 ns 4
lstringa<40> e = "Test text";_median 1.85 ns 1.85 ns 4
lstringa<40> e = "Test text";_stddev 0.035 ns 0.035 ns 4
lstringa<40> e = "Test text";_cv 1.90 % 1.90 % 4
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 19.1 ns 19.1 ns 4
std::string e = "123456789012345678901234567890";_median 19.0 ns 19.0 ns 4
std::string e = "123456789012345678901234567890";_stddev 0.160 ns 0.160 ns 4
std::string e = "123456789012345678901234567890";_cv 0.84 % 0.84 % 4
std::string_view e = "123456789012345678901234567890";_mean 0.740 ns 0.740 ns 4
std::string_view e = "123456789012345678901234567890";_median 0.740 ns 0.740 ns 4
std::string_view e = "123456789012345678901234567890";_stddev 0.018 ns 0.018 ns 4
std::string_view e = "123456789012345678901234567890";_cv 2.38 % 2.38 % 4
ssa e = "123456789012345678901234567890";_mean 0.746 ns 0.746 ns 4
ssa e = "123456789012345678901234567890";_median 0.746 ns 0.746 ns 4
ssa e = "123456789012345678901234567890";_stddev 0.005 ns 0.005 ns 4
ssa e = "123456789012345678901234567890";_cv 0.68 % 0.68 % 4
stringa e = "123456789012345678901234567890";_mean 1.11 ns 1.11 ns 4
stringa e = "123456789012345678901234567890";_median 1.11 ns 1.11 ns 4
stringa e = "123456789012345678901234567890";_stddev 0.024 ns 0.024 ns 4
stringa e = "123456789012345678901234567890";_cv 2.13 % 2.13 % 4
lstringa<20> e = "123456789012345678901234567890";_mean 20.1 ns 20.1 ns 4
lstringa<20> e = "123456789012345678901234567890";_median 20.1 ns 20.1 ns 4
lstringa<20> e = "123456789012345678901234567890";_stddev 0.192 ns 0.192 ns 4
lstringa<20> e = "123456789012345678901234567890";_cv 0.96 % 0.96 % 4
lstringa<40> e = "123456789012345678901234567890";_mean 1.82 ns 1.82 ns 4
lstringa<40> e = "123456789012345678901234567890";_median 1.81 ns 1.81 ns 4
lstringa<40> e = "123456789012345678901234567890";_stddev 0.034 ns 0.034 ns 4
lstringa<40> e = "123456789012345678901234567890";_cv 1.87 % 1.87 % 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.80 ns 4.80 ns 4
std::string e = "Test text"; auto c{e};_median 4.79 ns 4.79 ns 4
std::string e = "Test text"; auto c{e};_stddev 0.082 ns 0.082 ns 4
std::string e = "Test text"; auto c{e};_cv 1.70 % 1.70 % 4
std::string_view e = "Test text"; auto c{e};_mean 0.366 ns 0.366 ns 4
std::string_view e = "Test text"; auto c{e};_median 0.364 ns 0.364 ns 4
std::string_view e = "Test text"; auto c{e};_stddev 0.006 ns 0.006 ns 4
std::string_view e = "Test text"; auto c{e};_cv 1.67 % 1.67 % 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.372 ns 0.372 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.28 % 2.28 % 4
stringa e = "Test text"; auto c{e};_mean 1.10 ns 1.10 ns 4
stringa e = "Test text"; auto c{e};_median 1.10 ns 1.10 ns 4
stringa e = "Test text"; auto c{e};_stddev 0.022 ns 0.022 ns 4
stringa e = "Test text"; auto c{e};_cv 1.99 % 1.99 % 4
lstringa<20> e = "Test text"; auto c{e};_mean 1.44 ns 1.44 ns 4
lstringa<20> e = "Test text"; auto c{e};_median 1.44 ns 1.44 ns 4
lstringa<20> e = "Test text"; auto c{e};_stddev 0.015 ns 0.015 ns 4
lstringa<20> e = "Test text"; auto c{e};_cv 1.06 % 1.06 % 4
lstringa<40> e = "Test text"; auto c{e};_mean 1.45 ns 1.45 ns 4
lstringa<40> e = "Test text"; auto c{e};_median 1.44 ns 1.44 ns 4
lstringa<40> e = "Test text"; auto c{e};_stddev 0.024 ns 0.024 ns 4
lstringa<40> e = "Test text"; auto c{e};_cv 1.69 % 1.69 % 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 22.5 ns 22.5 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_median 22.4 ns 22.4 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.410 ns 0.410 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_cv 1.82 % 1.82 % 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.730 ns 0.730 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.730 ns 0.730 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.007 ns 0.007 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 0.91 % 0.91 % 4
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.733 ns 0.733 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.735 ns 0.735 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.012 ns 0.012 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.58 % 1.58 % 4
stringa e = "123456789012345678901234567890"; auto c{e};_mean 6.70 ns 6.70 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_median 6.68 ns 6.68 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.044 ns 0.044 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_cv 0.66 % 0.66 % 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 19.5 ns 19.5 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 19.3 ns 19.3 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.428 ns 0.428 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.20 % 2.20 % 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.07 ns 4.07 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.06 ns 4.06 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.039 ns 0.039 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 0.95 % 0.95 % 4
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
sz::string::find;_mean 84.9 ns 84.9 ns 4
sz::string::find;_median 85.1 ns 85.1 ns 4
sz::string::find;_stddev 0.593 ns 0.593 ns 4
sz::string::find;_cv 0.70 % 0.70 % 4
std::string::find;_mean 6.64 ns 6.64 ns 4
std::string::find;_median 6.61 ns 6.61 ns 4
std::string::find;_stddev 0.138 ns 0.138 ns 4
std::string::find;_cv 2.08 % 2.08 % 4
std::string_view::find;_mean 7.05 ns 7.05 ns 4
std::string_view::find;_median 7.05 ns 7.05 ns 4
std::string_view::find;_stddev 0.084 ns 0.084 ns 4
std::string_view::find;_cv 1.20 % 1.20 % 4
ssa::find;_mean 6.73 ns 6.73 ns 4
ssa::find;_median 6.70 ns 6.70 ns 4
ssa::find;_stddev 0.187 ns 0.187 ns 4
ssa::find;_cv 2.78 % 2.78 % 4
stringa::find;_mean 7.01 ns 7.01 ns 4
stringa::find;_median 7.01 ns 7.01 ns 4
stringa::find;_stddev 0.090 ns 0.090 ns 4
stringa::find;_cv 1.29 % 1.29 % 4
lstringa<20>::find;_mean 6.53 ns 6.53 ns 4
lstringa<20>::find;_median 6.50 ns 6.50 ns 4
lstringa<20>::find;_stddev 0.189 ns 0.189 ns 4
lstringa<20>::find;_cv 2.89 % 2.89 % 4
lstringa<40>::find;_mean 6.27 ns 6.27 ns 4
lstringa<40>::find;_median 6.27 ns 6.27 ns 4
lstringa<40>::find;_stddev 0.111 ns 0.111 ns 4
lstringa<40>::find;_cv 1.77 % 1.77 % 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 4
std::string copy{str_with_len_N};/15_median 4.79 ns 4.79 ns 4
std::string copy{str_with_len_N};/15_stddev 0.138 ns 0.138 ns 4
std::string copy{str_with_len_N};/15_cv 2.85 % 2.85 % 4
std::string copy{str_with_len_N};/16_mean 27.2 ns 27.2 ns 4
std::string copy{str_with_len_N};/16_median 27.3 ns 27.3 ns 4
std::string copy{str_with_len_N};/16_stddev 0.309 ns 0.309 ns 4
std::string copy{str_with_len_N};/16_cv 1.14 % 1.14 % 4
std::string copy{str_with_len_N};/23_mean 27.7 ns 27.7 ns 4
std::string copy{str_with_len_N};/23_median 27.7 ns 27.7 ns 4
std::string copy{str_with_len_N};/23_stddev 0.207 ns 0.206 ns 4
std::string copy{str_with_len_N};/23_cv 0.75 % 0.74 % 4
std::string copy{str_with_len_N};/24_mean 21.2 ns 21.2 ns 4
std::string copy{str_with_len_N};/24_median 21.3 ns 21.3 ns 4
std::string copy{str_with_len_N};/24_stddev 0.381 ns 0.381 ns 4
std::string copy{str_with_len_N};/24_cv 1.80 % 1.80 % 4
std::string copy{str_with_len_N};/32_mean 22.3 ns 22.3 ns 4
std::string copy{str_with_len_N};/32_median 21.6 ns 21.6 ns 4
std::string copy{str_with_len_N};/32_stddev 1.91 ns 1.91 ns 4
std::string copy{str_with_len_N};/32_cv 8.55 % 8.56 % 4
std::string copy{str_with_len_N};/64_mean 23.2 ns 23.2 ns 4
std::string copy{str_with_len_N};/64_median 23.3 ns 23.3 ns 4
std::string copy{str_with_len_N};/64_stddev 0.311 ns 0.311 ns 4
std::string copy{str_with_len_N};/64_cv 1.34 % 1.34 % 4
std::string copy{str_with_len_N};/128_mean 28.4 ns 28.4 ns 4
std::string copy{str_with_len_N};/128_median 28.3 ns 28.3 ns 4
std::string copy{str_with_len_N};/128_stddev 0.673 ns 0.673 ns 4
std::string copy{str_with_len_N};/128_cv 2.38 % 2.38 % 4
std::string copy{str_with_len_N};/256_mean 25.2 ns 25.2 ns 4
std::string copy{str_with_len_N};/256_median 25.3 ns 25.3 ns 4
std::string copy{str_with_len_N};/256_stddev 0.625 ns 0.625 ns 4
std::string copy{str_with_len_N};/256_cv 2.48 % 2.48 % 4
std::string copy{str_with_len_N};/512_mean 27.8 ns 27.8 ns 4
std::string copy{str_with_len_N};/512_median 27.8 ns 27.8 ns 4
std::string copy{str_with_len_N};/512_stddev 0.588 ns 0.588 ns 4
std::string copy{str_with_len_N};/512_cv 2.11 % 2.11 % 4
std::string copy{str_with_len_N};/1024_mean 35.5 ns 35.5 ns 4
std::string copy{str_with_len_N};/1024_median 35.6 ns 35.6 ns 4
std::string copy{str_with_len_N};/1024_stddev 0.811 ns 0.813 ns 4
std::string copy{str_with_len_N};/1024_cv 2.29 % 2.29 % 4
std::string copy{str_with_len_N};/2048_mean 118 ns 118 ns 4
std::string copy{str_with_len_N};/2048_median 118 ns 118 ns 4
std::string copy{str_with_len_N};/2048_stddev 3.91 ns 3.91 ns 4
std::string copy{str_with_len_N};/2048_cv 3.32 % 3.32 % 4
std::string copy{str_with_len_N};/4096_mean 154 ns 154 ns 4
std::string copy{str_with_len_N};/4096_median 156 ns 156 ns 4
std::string copy{str_with_len_N};/4096_stddev 7.92 ns 7.93 ns 4
std::string copy{str_with_len_N};/4096_cv 5.16 % 5.16 % 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.011 ns 0.011 ns 4
stringa copy{str_with_len_N};/15_cv 1.02 % 1.02 % 4
stringa copy{str_with_len_N};/16_mean 1.12 ns 1.12 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.019 ns 0.019 ns 4
stringa copy{str_with_len_N};/16_cv 1.69 % 1.70 % 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.012 ns 0.012 ns 4
stringa copy{str_with_len_N};/23_cv 1.10 % 1.10 % 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.2 ns 16.2 ns 4
stringa copy{str_with_len_N};/24_stddev 0.147 ns 0.147 ns 4
stringa copy{str_with_len_N};/24_cv 0.91 % 0.91 % 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.1 ns 16.1 ns 4
stringa copy{str_with_len_N};/32_stddev 0.153 ns 0.153 ns 4
stringa copy{str_with_len_N};/32_cv 0.95 % 0.95 % 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.0 ns 16.0 ns 4
stringa copy{str_with_len_N};/64_stddev 0.310 ns 0.311 ns 4
stringa copy{str_with_len_N};/64_cv 1.92 % 1.92 % 4
stringa copy{str_with_len_N};/128_mean 16.0 ns 16.0 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.124 ns 0.124 ns 4
stringa copy{str_with_len_N};/128_cv 0.78 % 0.78 % 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.135 ns 0.134 ns 4
stringa copy{str_with_len_N};/256_cv 0.84 % 0.84 % 4
stringa copy{str_with_len_N};/512_mean 16.0 ns 16.0 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.095 ns 0.095 ns 4
stringa copy{str_with_len_N};/512_cv 0.59 % 0.59 % 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.162 ns 0.162 ns 4
stringa copy{str_with_len_N};/1024_cv 1.01 % 1.01 % 4
stringa copy{str_with_len_N};/2048_mean 15.9 ns 15.9 ns 4
stringa copy{str_with_len_N};/2048_median 15.9 ns 15.9 ns 4
stringa copy{str_with_len_N};/2048_stddev 0.057 ns 0.057 ns 4
stringa copy{str_with_len_N};/2048_cv 0.36 % 0.36 % 4
stringa copy{str_with_len_N};/4096_mean 16.1 ns 16.1 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.075 ns 0.076 ns 4
stringa copy{str_with_len_N};/4096_cv 0.47 % 0.47 % 4
lstringa<16> copy{str_with_len_N};/15_mean 1.47 ns 1.47 ns 4
lstringa<16> copy{str_with_len_N};/15_median 1.47 ns 1.47 ns 4
lstringa<16> copy{str_with_len_N};/15_stddev 0.012 ns 0.012 ns 4
lstringa<16> copy{str_with_len_N};/15_cv 0.82 % 0.82 % 4
lstringa<16> copy{str_with_len_N};/16_mean 4.43 ns 4.43 ns 4
lstringa<16> copy{str_with_len_N};/16_median 4.43 ns 4.43 ns 4
lstringa<16> copy{str_with_len_N};/16_stddev 0.132 ns 0.132 ns 4
lstringa<16> copy{str_with_len_N};/16_cv 2.97 % 2.97 % 4
lstringa<16> copy{str_with_len_N};/23_mean 4.43 ns 4.43 ns 4
lstringa<16> copy{str_with_len_N};/23_median 4.42 ns 4.42 ns 4
lstringa<16> copy{str_with_len_N};/23_stddev 0.037 ns 0.037 ns 4
lstringa<16> copy{str_with_len_N};/23_cv 0.83 % 0.83 % 4
lstringa<16> copy{str_with_len_N};/24_mean 23.3 ns 23.3 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.312 ns 0.312 ns 4
lstringa<16> copy{str_with_len_N};/24_cv 1.34 % 1.34 % 4
lstringa<16> copy{str_with_len_N};/32_mean 24.0 ns 24.0 ns 4
lstringa<16> copy{str_with_len_N};/32_median 24.1 ns 24.1 ns 4
lstringa<16> copy{str_with_len_N};/32_stddev 0.898 ns 0.898 ns 4
lstringa<16> copy{str_with_len_N};/32_cv 3.74 % 3.74 % 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.481 ns 0.481 ns 4
lstringa<16> copy{str_with_len_N};/64_cv 1.90 % 1.90 % 4
lstringa<16> copy{str_with_len_N};/128_mean 40.0 ns 40.0 ns 4
lstringa<16> copy{str_with_len_N};/128_median 40.1 ns 40.1 ns 4
lstringa<16> copy{str_with_len_N};/128_stddev 0.435 ns 0.435 ns 4
lstringa<16> copy{str_with_len_N};/128_cv 1.09 % 1.09 % 4
lstringa<16> copy{str_with_len_N};/256_mean 27.0 ns 27.0 ns 4
lstringa<16> copy{str_with_len_N};/256_median 27.0 ns 27.0 ns 4
lstringa<16> copy{str_with_len_N};/256_stddev 0.703 ns 0.703 ns 4
lstringa<16> copy{str_with_len_N};/256_cv 2.61 % 2.61 % 4
lstringa<16> copy{str_with_len_N};/512_mean 29.1 ns 29.1 ns 4
lstringa<16> copy{str_with_len_N};/512_median 29.2 ns 29.2 ns 4
lstringa<16> copy{str_with_len_N};/512_stddev 0.636 ns 0.636 ns 4
lstringa<16> copy{str_with_len_N};/512_cv 2.18 % 2.18 % 4
lstringa<16> copy{str_with_len_N};/1024_mean 97.4 ns 97.4 ns 4
lstringa<16> copy{str_with_len_N};/1024_median 97.4 ns 97.4 ns 4
lstringa<16> copy{str_with_len_N};/1024_stddev 2.31 ns 2.31 ns 4
lstringa<16> copy{str_with_len_N};/1024_cv 2.37 % 2.37 % 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.26 ns 3.26 ns 4
lstringa<16> copy{str_with_len_N};/2048_cv 3.05 % 3.05 % 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 2.91 ns 2.91 ns 4
lstringa<16> copy{str_with_len_N};/4096_cv 2.41 % 2.41 % 4
lstringa<512> copy{str_with_len_N};/15_mean 1.47 ns 1.47 ns 4
lstringa<512> copy{str_with_len_N};/15_median 1.46 ns 1.46 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.02 % 1.02 % 4
lstringa<512> copy{str_with_len_N};/16_mean 4.39 ns 4.39 ns 4
lstringa<512> copy{str_with_len_N};/16_median 4.38 ns 4.38 ns 4
lstringa<512> copy{str_with_len_N};/16_stddev 0.048 ns 0.048 ns 4
lstringa<512> copy{str_with_len_N};/16_cv 1.09 % 1.09 % 4
lstringa<512> copy{str_with_len_N};/23_mean 4.40 ns 4.40 ns 4
lstringa<512> copy{str_with_len_N};/23_median 4.36 ns 4.36 ns 4
lstringa<512> copy{str_with_len_N};/23_stddev 0.127 ns 0.127 ns 4
lstringa<512> copy{str_with_len_N};/23_cv 2.89 % 2.89 % 4
lstringa<512> copy{str_with_len_N};/24_mean 4.15 ns 4.15 ns 4
lstringa<512> copy{str_with_len_N};/24_median 4.18 ns 4.18 ns 4
lstringa<512> copy{str_with_len_N};/24_stddev 0.079 ns 0.079 ns 4
lstringa<512> copy{str_with_len_N};/24_cv 1.89 % 1.89 % 4
lstringa<512> copy{str_with_len_N};/32_mean 4.19 ns 4.19 ns 4
lstringa<512> copy{str_with_len_N};/32_median 4.18 ns 4.18 ns 4
lstringa<512> copy{str_with_len_N};/32_stddev 0.073 ns 0.073 ns 4
lstringa<512> copy{str_with_len_N};/32_cv 1.75 % 1.75 % 4
lstringa<512> copy{str_with_len_N};/64_mean 5.94 ns 5.94 ns 4
lstringa<512> copy{str_with_len_N};/64_median 5.96 ns 5.96 ns 4
lstringa<512> copy{str_with_len_N};/64_stddev 0.085 ns 0.085 ns 4
lstringa<512> copy{str_with_len_N};/64_cv 1.43 % 1.43 % 4
lstringa<512> copy{str_with_len_N};/128_mean 5.93 ns 5.93 ns 4
lstringa<512> copy{str_with_len_N};/128_median 5.95 ns 5.95 ns 4
lstringa<512> copy{str_with_len_N};/128_stddev 0.082 ns 0.082 ns 4
lstringa<512> copy{str_with_len_N};/128_cv 1.39 % 1.39 % 4
lstringa<512> copy{str_with_len_N};/256_mean 7.87 ns 7.87 ns 4
lstringa<512> copy{str_with_len_N};/256_median 7.91 ns 7.91 ns 4
lstringa<512> copy{str_with_len_N};/256_stddev 0.151 ns 0.151 ns 4
lstringa<512> copy{str_with_len_N};/256_cv 1.91 % 1.91 % 4
lstringa<512> copy{str_with_len_N};/512_mean 10.2 ns 10.2 ns 4
lstringa<512> copy{str_with_len_N};/512_median 10.1 ns 10.1 ns 4
lstringa<512> copy{str_with_len_N};/512_stddev 0.237 ns 0.237 ns 4
lstringa<512> copy{str_with_len_N};/512_cv 2.33 % 2.33 % 4
lstringa<512> copy{str_with_len_N};/1024_mean 97.0 ns 97.0 ns 4
lstringa<512> copy{str_with_len_N};/1024_median 96.5 ns 96.5 ns 4
lstringa<512> copy{str_with_len_N};/1024_stddev 2.23 ns 2.23 ns 4
lstringa<512> copy{str_with_len_N};/1024_cv 2.30 % 2.30 % 4
lstringa<512> copy{str_with_len_N};/2048_mean 105 ns 105 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 1.13 ns 1.13 ns 4
lstringa<512> copy{str_with_len_N};/2048_cv 1.08 % 1.08 % 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 2.47 ns 2.47 ns 4
lstringa<512> copy{str_with_len_N};/4096_cv 2.02 % 2.02 % 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.3 ns 26.3 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 26.3 ns 26.3 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.521 ns 0.520 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.98 % 1.98 % 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 11.5 ns 11.5 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 11.5 ns 11.5 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.163 ns 0.163 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 1.42 % 1.42 % 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 16.5 ns 16.5 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 16.5 ns 16.5 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.042 ns 0.042 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 0.26 % 0.26 % 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 7.41 ns 7.41 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 7.42 ns 7.42 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.196 ns 0.196 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 2.64 % 2.64 % 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 7.43 ns 7.43 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 7.47 ns 7.47 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.192 ns 0.192 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 2.59 % 2.59 % 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.6 ns 23.6 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 23.5 ns 23.5 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.301 ns 0.301 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 1.28 % 1.28 % 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 8.89 ns 8.89 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 8.82 ns 8.82 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.274 ns 0.274 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 3.08 % 3.08 % 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 15.8 ns 15.8 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 15.8 ns 15.8 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.241 ns 0.241 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.52 % 1.52 % 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 6.35 ns 6.35 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 6.26 ns 6.26 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.262 ns 0.262 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 4.13 % 4.13 % 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 6.32 ns 6.32 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 6.31 ns 6.31 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.060 ns 0.060 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 0.95 % 0.95 % 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 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 28.4 ns 28.4 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.859 ns 0.859 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 3.01 % 3.01 % 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 22.9 ns 22.9 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 23.0 ns 23.0 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.249 ns 0.249 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 1.09 % 1.09 % 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 10.7 ns 10.7 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 10.7 ns 10.7 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.132 ns 0.132 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 1.23 % 1.23 % 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.5 ns 63.5 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 63.3 ns 63.3 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 1.16 ns 1.16 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.82 % 1.82 % 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.8 ns 23.8 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.271 ns 0.271 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.14 % 1.14 % 4
ssa s = "1234.567e10"; double res = *s.to_double()_mean 24.2 ns 24.2 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_median 24.2 ns 24.2 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.288 ns 0.288 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_cv 1.19 % 1.19 % 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 1379 ns 1379 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_median 1363 ns 1363 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 39.2 ns 39.2 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 2.84 % 2.84 % 4
std::string str; ... str += "abbaabbaabbaabba";_mean 380 ns 380 ns 4
std::string str; ... str += "abbaabbaabbaabba";_median 380 ns 380 ns 4
std::string str; ... str += "abbaabbaabbaabba";_stddev 7.41 ns 7.41 ns 4
std::string str; ... str += "abbaabbaabbaabba";_cv 1.95 % 1.95 % 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 360 ns 360 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 361 ns 361 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 3.64 ns 3.64 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 1.01 % 1.01 % 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 263 ns 263 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 265 ns 265 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 10.8 ns 10.8 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 4.13 % 4.13 % 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 219 ns 219 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 223 ns 223 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 10.6 ns 10.6 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 4.84 % 4.84 % 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 143 ns 143 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 141 ns 141 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 5.44 ns 5.44 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 3.79 % 3.79 % 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 1348 ns 1348 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1357 ns 1357 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 23.8 ns 23.8 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 1.76 % 1.76 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1202 ns 1202 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1201 ns 1201 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 6.48 ns 6.48 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 0.54 % 0.54 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 456 ns 456 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 452 ns 452 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 15.0 ns 15.0 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.28 % 3.28 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 401 ns 401 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 407 ns 407 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.8 ns 18.8 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.70 % 4.70 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 310 ns 310 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 314 ns 314 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 23.4 ns 23.4 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 7.54 % 7.54 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 212 ns 212 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 212 ns 212 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 5.71 ns 5.71 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.69 % 2.69 % 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 73026 ns 73026 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 72322 ns 72322 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 2367 ns 2367 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 3.24 % 3.24 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 66199 ns 66199 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 66369 ns 66369 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1243 ns 1243 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.88 % 1.88 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 22156 ns 22156 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22130 ns 22130 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 426 ns 426 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.92 % 1.92 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18805 ns 18805 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18789 ns 18789 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 349 ns 349 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.86 % 1.86 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18433 ns 18433 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18391 ns 18391 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 242 ns 242 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.31 % 1.31 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 18781 ns 18781 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18847 ns 18847 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 216 ns 216 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.15 % 1.15 % 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 1378 ns 1378 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_median 1379 ns 1379 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_stddev 12.5 ns 12.5 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_cv 0.90 % 0.90 % 4
std::string str; ... str += str_var1 + str_var2;_mean 1285 ns 1285 ns 4
std::string str; ... str += str_var1 + str_var2;_median 1282 ns 1282 ns 4
std::string str; ... str += str_var1 + str_var2;_stddev 34.3 ns 34.3 ns 4
std::string str; ... str += str_var1 + str_var2;_cv 2.67 % 2.67 % 4
lstringa<16> str; ... str += str_var1 + str_var2;_mean 532 ns 532 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_median 531 ns 531 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 7.38 ns 7.38 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_cv 1.39 % 1.39 % 4
lstringa<128> str; ... str += str_var1 + str_var2;_mean 474 ns 474 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_median 477 ns 477 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 7.90 ns 7.90 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_cv 1.67 % 1.67 % 4
lstringa<512> str; ... str += str_var1 + str_var2;_mean 379 ns 379 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_median 385 ns 385 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 17.3 ns 17.3 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_cv 4.56 % 4.56 % 4
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 281 ns 281 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_median 281 ns 281 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 2.06 ns 2.06 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 0.73 % 0.73 % 4
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 2931 ns 2931 ns 4
std::stringstream str; str << "test = " << k << " times";_median 2920 ns 2920 ns 4
std::stringstream str; str << "test = " << k << " times";_stddev 72.4 ns 72.4 ns 4
std::stringstream str; str << "test = " << k << " times";_cv 2.47 % 2.47 % 4
std::string str = "test = " + std::to_string(k) + " times";_mean 412 ns 412 ns 4
std::string str = "test = " + std::to_string(k) + " times";_median 410 ns 410 ns 4
std::string str = "test = " + std::to_string(k) + " times";_stddev 4.74 ns 4.74 ns 4
std::string str = "test = " + std::to_string(k) + " times";_cv 1.15 % 1.15 % 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1435 ns 1435 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1433 ns 1433 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 18.7 ns 18.7 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.30 % 1.30 % 4
std::string str = std::format("test = {} times", k);_mean 1165 ns 1165 ns 4
std::string str = std::format("test = {} times", k);_median 1167 ns 1167 ns 4
std::string str = std::format("test = {} times", k);_stddev 20.6 ns 20.6 ns 4
std::string str = std::format("test = {} times", k);_cv 1.76 % 1.76 % 4
lstringa<8> str; str.format("test = {} times", k);_mean 1487 ns 1487 ns 4
lstringa<8> str; str.format("test = {} times", k);_median 1482 ns 1482 ns 4
lstringa<8> str; str.format("test = {} times", k);_stddev 32.8 ns 32.8 ns 4
lstringa<8> str; str.format("test = {} times", k);_cv 2.21 % 2.21 % 4
lstringa<32> str; str.format("test = {} times", k);_mean 1005 ns 1005 ns 4
lstringa<32> str; str.format("test = {} times", k);_median 1014 ns 1014 ns 4
lstringa<32> str; str.format("test = {} times", k);_stddev 22.7 ns 22.7 ns 4
lstringa<32> str; str.format("test = {} times", k);_cv 2.26 % 2.26 % 4
lstringa<8> str = "test = " + k + " times";_mean 289 ns 289 ns 4
lstringa<8> str = "test = " + k + " times";_median 292 ns 292 ns 4
lstringa<8> str = "test = " + k + " times";_stddev 7.48 ns 7.48 ns 4
lstringa<8> str = "test = " + k + " times";_cv 2.58 % 2.58 % 4
lstringa<32> str = "test = " + k + " times";_mean 132 ns 132 ns 4
lstringa<32> str = "test = " + k + " times";_median 133 ns 133 ns 4
lstringa<32> str = "test = " + k + " times";_stddev 2.16 ns 2.16 ns 4
lstringa<32> str = "test = " + k + " times";_cv 1.63 % 1.63 % 4
stringa str = "test = " + k + " times";_mean 136 ns 136 ns 4
stringa str = "test = " + k + " times";_median 136 ns 136 ns 4
stringa str = "test = " + k + " times";_stddev 1.27 ns 1.27 ns 4
stringa str = "test = " + k + " times";_cv 0.94 % 0.94 % 4
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 272 ns 272 ns 4
std::string::find + substr + std::strtol_median 273 ns 273 ns 4
std::string::find + substr + std::strtol_stddev 3.65 ns 3.65 ns 4
std::string::find + substr + std::strtol_cv 1.34 % 1.34 % 4
ssa::splitter + ssa::as_int_mean 190 ns 190 ns 4
ssa::splitter + ssa::as_int_median 190 ns 190 ns 4
ssa::splitter + ssa::as_int_stddev 2.83 ns 2.83 ns 4
ssa::splitter + ssa::as_int_cv 1.49 % 1.49 % 4
ssa::splitf + functor_mean 194 ns 194 ns 4
ssa::splitf + functor_median 194 ns 194 ns 4
ssa::splitf + functor_stddev 3.53 ns 3.53 ns 4
ssa::splitf + functor_cv 1.82 % 1.82 % 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 793 ns 793 ns 4
Naive (and wrong) replace symbols with std::string find + replace_median 793 ns 793 ns 4
Naive (and wrong) replace symbols with std::string find + replace_stddev 6.82 ns 6.82 ns 4
Naive (and wrong) replace symbols with std::string find + replace_cv 0.86 % 0.86 % 4
replace symbols with std::string find_first_of + replace_mean 2390 ns 2390 ns 4
replace symbols with std::string find_first_of + replace_median 2403 ns 2403 ns 4
replace symbols with std::string find_first_of + replace_stddev 47.1 ns 47.1 ns 4
replace symbols with std::string find_first_of + replace_cv 1.97 % 1.97 % 4
replace symbols with std::string_view find_first_of + copy_mean 960 ns 960 ns 4
replace symbols with std::string_view find_first_of + copy_median 949 ns 949 ns 4
replace symbols with std::string_view find_first_of + copy_stddev 33.9 ns 33.9 ns 4
replace symbols with std::string_view find_first_of + copy_cv 3.53 % 3.53 % 4
replace runtime symbols with string expressions and without remembering all search results_mean 1320 ns 1320 ns 4
replace runtime symbols with string expressions and without remembering all search results_median 1310 ns 1310 ns 4
replace runtime symbols with string expressions and without remembering all search results_stddev 34.2 ns 34.2 ns 4
replace runtime symbols with string expressions and without remembering all search results_cv 2.59 % 2.59 % 4
replace runtime symbols with simstr and memorization of all search results_mean 1012 ns 1012 ns 4
replace runtime symbols with simstr and memorization of all search results_median 1019 ns 1019 ns 4
replace runtime symbols with simstr and memorization of all search results_stddev 29.1 ns 29.1 ns 4
replace runtime symbols with simstr and memorization of all search results_cv 2.88 % 2.88 % 4
replace const symbols with string expressions and without remembering all search results_mean 1057 ns 1057 ns 4
replace const symbols with string expressions and without remembering all search results_median 1057 ns 1057 ns 4
replace const symbols with string expressions and without remembering all search results_stddev 22.6 ns 22.6 ns 4
replace const symbols with string expressions and without remembering all search results_cv 2.14 % 2.14 % 4
replace const symbols with string expressions and memorization of all search results_mean 827 ns 827 ns 4
replace const symbols with string expressions and memorization of all search results_median 826 ns 826 ns 4
replace const symbols with string expressions and memorization of all search results_stddev 11.0 ns 11.0 ns 4
replace const symbols with string expressions and memorization of all search results_cv 1.33 % 1.33 % 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 157 ns 157 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_median 156 ns 156 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 5.01 ns 5.01 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_cv 3.19 % 3.19 % 4
Short replace symbols with std::string find_first_of + replace_mean 318 ns 318 ns 4
Short replace symbols with std::string find_first_of + replace_median 315 ns 315 ns 4
Short replace symbols with std::string find_first_of + replace_stddev 7.31 ns 7.31 ns 4
Short replace symbols with std::string find_first_of + replace_cv 2.30 % 2.30 % 4
Short replace symbols with std::string_view find_first_of + copy_mean 150 ns 150 ns 4
Short replace symbols with std::string_view find_first_of + copy_median 149 ns 149 ns 4
Short replace symbols with std::string_view find_first_of + copy_stddev 1.90 ns 1.90 ns 4
Short replace symbols with std::string_view find_first_of + copy_cv 1.27 % 1.27 % 4
Short replace runtime symbols with string expressions and without remembering all search results_mean 175 ns 175 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_median 175 ns 175 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_stddev 5.77 ns 5.77 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_cv 3.29 % 3.29 % 4
Short replace runtime symbols with simstr and memorization of all search results_mean 178 ns 178 ns 4
Short replace runtime symbols with simstr and memorization of all search results_median 180 ns 180 ns 4
Short replace runtime symbols with simstr and memorization of all search results_stddev 5.60 ns 5.60 ns 4
Short replace runtime symbols with simstr and memorization of all search results_cv 3.15 % 3.15 % 4
Short replace const symbols with string expressions and without remembering all search results_mean 136 ns 136 ns 4
Short replace const symbols with string expressions and without remembering all search results_median 136 ns 136 ns 4
Short replace const symbols with string expressions and without remembering all search results_stddev 1.52 ns 1.52 ns 4
Short replace const symbols with string expressions and without remembering all search results_cv 1.12 % 1.12 % 4
Short replace const symbols with string expressions and memorization of all search results_mean 129 ns 129 ns 4
Short replace const symbols with string expressions and memorization of all search results_median 129 ns 129 ns 4
Short replace const symbols with string expressions and memorization of all search results_stddev 2.52 ns 2.52 ns 4
Short replace const symbols with string expressions and memorization of all search results_cv 1.95 % 1.95 % 4
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 154 ns 154 ns 4
replace bb to ---- in std::string|64_median 154 ns 154 ns 4
replace bb to ---- in std::string|64_stddev 1.47 ns 1.47 ns 4
replace bb to ---- in std::string|64_cv 0.95 % 0.95 % 4
replace bb to ---- in std::string|256_mean 500 ns 500 ns 4
replace bb to ---- in std::string|256_median 498 ns 498 ns 4
replace bb to ---- in std::string|256_stddev 7.86 ns 7.86 ns 4
replace bb to ---- in std::string|256_cv 1.57 % 1.57 % 4
replace bb to ---- in std::string|512_mean 972 ns 972 ns 4
replace bb to ---- in std::string|512_median 970 ns 970 ns 4
replace bb to ---- in std::string|512_stddev 31.5 ns 31.5 ns 4
replace bb to ---- in std::string|512_cv 3.24 % 3.24 % 4
replace bb to ---- in std::string|1024_mean 2261 ns 2261 ns 4
replace bb to ---- in std::string|1024_median 2164 ns 2164 ns 4
replace bb to ---- in std::string|1024_stddev 248 ns 248 ns 4
replace bb to ---- in std::string|1024_cv 10.94 % 10.94 % 4
replace bb to ---- in std::string|2048_mean 5887 ns 5887 ns 4
replace bb to ---- in std::string|2048_median 5770 ns 5770 ns 4
replace bb to ---- in std::string|2048_stddev 378 ns 378 ns 4
replace bb to ---- in std::string|2048_cv 6.41 % 6.41 % 4
replace bb to ---- in lstringa<8>|64_mean 130 ns 130 ns 4
replace bb to ---- in lstringa<8>|64_median 130 ns 130 ns 4
replace bb to ---- in lstringa<8>|64_stddev 2.07 ns 2.07 ns 4
replace bb to ---- in lstringa<8>|64_cv 1.59 % 1.59 % 4
replace bb to ---- in lstringa<8>|256_mean 494 ns 494 ns 4
replace bb to ---- in lstringa<8>|256_median 498 ns 498 ns 4
replace bb to ---- in lstringa<8>|256_stddev 12.3 ns 12.3 ns 4
replace bb to ---- in lstringa<8>|256_cv 2.49 % 2.49 % 4
replace bb to ---- in lstringa<8>|512_mean 839 ns 839 ns 4
replace bb to ---- in lstringa<8>|512_median 838 ns 838 ns 4
replace bb to ---- in lstringa<8>|512_stddev 22.4 ns 22.4 ns 4
replace bb to ---- in lstringa<8>|512_cv 2.66 % 2.66 % 4
replace bb to ---- in lstringa<8>|1024_mean 1731 ns 1731 ns 4
replace bb to ---- in lstringa<8>|1024_median 1725 ns 1725 ns 4
replace bb to ---- in lstringa<8>|1024_stddev 27.0 ns 27.0 ns 4
replace bb to ---- in lstringa<8>|1024_cv 1.56 % 1.56 % 4
replace bb to ---- in lstringa<8>|2048_mean 3350 ns 3350 ns 4
replace bb to ---- in lstringa<8>|2048_median 3354 ns 3354 ns 4
replace bb to ---- in lstringa<8>|2048_stddev 101 ns 101 ns 4
replace bb to ---- in lstringa<8>|2048_cv 3.02 % 3.02 % 4
replace bb to ---- by init stringa|64_mean 82.3 ns 82.3 ns 4
replace bb to ---- by init stringa|64_median 82.2 ns 82.2 ns 4
replace bb to ---- by init stringa|64_stddev 1.27 ns 1.27 ns 4
replace bb to ---- by init stringa|64_cv 1.55 % 1.55 % 4
replace bb to ---- by init stringa|256_mean 276 ns 276 ns 4
replace bb to ---- by init stringa|256_median 277 ns 277 ns 4
replace bb to ---- by init stringa|256_stddev 2.04 ns 2.04 ns 4
replace bb to ---- by init stringa|256_cv 0.74 % 0.74 % 4
replace bb to ---- by init stringa|512_mean 675 ns 675 ns 4
replace bb to ---- by init stringa|512_median 675 ns 675 ns 4
replace bb to ---- by init stringa|512_stddev 6.62 ns 6.62 ns 4
replace bb to ---- by init stringa|512_cv 0.98 % 0.98 % 4
replace bb to ---- by init stringa|1024_mean 1510 ns 1510 ns 4
replace bb to ---- by init stringa|1024_median 1527 ns 1527 ns 4
replace bb to ---- by init stringa|1024_stddev 45.2 ns 45.2 ns 4
replace bb to ---- by init stringa|1024_cv 2.99 % 2.99 % 4
replace bb to ---- by init stringa|2048_mean 3059 ns 3059 ns 4
replace bb to ---- by init stringa|2048_median 3035 ns 3035 ns 4
replace bb to ---- by init stringa|2048_stddev 58.4 ns 58.4 ns 4
replace bb to ---- by init stringa|2048_cv 1.91 % 1.91 % 4
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 120 ns 120 ns 4
replace bb to -- in std::string|64_median 120 ns 120 ns 4
replace bb to -- in std::string|64_stddev 2.02 ns 2.02 ns 4
replace bb to -- in std::string|64_cv 1.68 % 1.68 % 4
replace bb to -- in std::string|256_mean 365 ns 365 ns 4
replace bb to -- in std::string|256_median 365 ns 365 ns 4
replace bb to -- in std::string|256_stddev 6.97 ns 6.97 ns 4
replace bb to -- in std::string|256_cv 1.91 % 1.91 % 4
replace bb to -- in std::string|512_mean 772 ns 772 ns 4
replace bb to -- in std::string|512_median 769 ns 769 ns 4
replace bb to -- in std::string|512_stddev 17.4 ns 17.4 ns 4
replace bb to -- in std::string|512_cv 2.25 % 2.25 % 4
replace bb to -- in std::string|1024_mean 1404 ns 1404 ns 4
replace bb to -- in std::string|1024_median 1395 ns 1395 ns 4
replace bb to -- in std::string|1024_stddev 22.2 ns 22.2 ns 4
replace bb to -- in std::string|1024_cv 1.58 % 1.58 % 4
replace bb to -- in std::string|2048_mean 2726 ns 2726 ns 4
replace bb to -- in std::string|2048_median 2715 ns 2715 ns 4
replace bb to -- in std::string|2048_stddev 39.6 ns 39.6 ns 4
replace bb to -- in std::string|2048_cv 1.45 % 1.45 % 4
replace bb to -- in lstringa<8>|64_mean 90.0 ns 90.0 ns 4
replace bb to -- in lstringa<8>|64_median 89.9 ns 89.9 ns 4
replace bb to -- in lstringa<8>|64_stddev 1.20 ns 1.20 ns 4
replace bb to -- in lstringa<8>|64_cv 1.34 % 1.34 % 4
replace bb to -- in lstringa<8>|256_mean 295 ns 295 ns 4
replace bb to -- in lstringa<8>|256_median 296 ns 296 ns 4
replace bb to -- in lstringa<8>|256_stddev 1.96 ns 1.96 ns 4
replace bb to -- in lstringa<8>|256_cv 0.67 % 0.67 % 4
replace bb to -- in lstringa<8>|512_mean 540 ns 540 ns 4
replace bb to -- in lstringa<8>|512_median 531 ns 531 ns 4
replace bb to -- in lstringa<8>|512_stddev 20.9 ns 20.9 ns 4
replace bb to -- in lstringa<8>|512_cv 3.88 % 3.88 % 4
replace bb to -- in lstringa<8>|1024_mean 1086 ns 1086 ns 4
replace bb to -- in lstringa<8>|1024_median 1079 ns 1079 ns 4
replace bb to -- in lstringa<8>|1024_stddev 49.9 ns 49.9 ns 4
replace bb to -- in lstringa<8>|1024_cv 4.60 % 4.60 % 4
replace bb to -- in lstringa<8>|2048_mean 2111 ns 2111 ns 4
replace bb to -- in lstringa<8>|2048_median 2083 ns 2083 ns 4
replace bb to -- in lstringa<8>|2048_stddev 90.9 ns 90.9 ns 4
replace bb to -- in lstringa<8>|2048_cv 4.30 % 4.30 % 4
replace bb to -- by init stringa|64_mean 75.9 ns 75.9 ns 4
replace bb to -- by init stringa|64_median 75.6 ns 75.6 ns 4
replace bb to -- by init stringa|64_stddev 1.07 ns 1.07 ns 4
replace bb to -- by init stringa|64_cv 1.40 % 1.40 % 4
replace bb to -- by init stringa|256_mean 241 ns 241 ns 4
replace bb to -- by init stringa|256_median 241 ns 241 ns 4
replace bb to -- by init stringa|256_stddev 1.94 ns 1.94 ns 4
replace bb to -- by init stringa|256_cv 0.80 % 0.80 % 4
replace bb to -- by init stringa|512_mean 457 ns 457 ns 4
replace bb to -- by init stringa|512_median 458 ns 458 ns 4
replace bb to -- by init stringa|512_stddev 6.93 ns 6.93 ns 4
replace bb to -- by init stringa|512_cv 1.52 % 1.52 % 4
replace bb to -- by init stringa|1024_mean 920 ns 920 ns 4
replace bb to -- by init stringa|1024_median 924 ns 924 ns 4
replace bb to -- by init stringa|1024_stddev 31.5 ns 31.5 ns 4
replace bb to -- by init stringa|1024_cv 3.42 % 3.42 % 4
replace bb to -- by init stringa|2048_mean 1760 ns 1760 ns 4
replace bb to -- by init stringa|2048_median 1757 ns 1757 ns 4
replace bb to -- by init stringa|2048_stddev 18.7 ns 18.7 ns 4
replace bb to -- by init stringa|2048_cv 1.06 % 1.06 % 4
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3672616 ns 3672647 ns 4
hashStrMapA<size_t> emplace & find stringa;_median 3644400 ns 3644453 ns 4
hashStrMapA<size_t> emplace & find stringa;_stddev 77712 ns 77696 ns 4
hashStrMapA<size_t> emplace & find stringa;_cv 2.12 % 2.12 % 4
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3585692 ns 3585702 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3607558 ns 3607567 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 80404 ns 80403 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 2.24 % 2.24 % 4
hashStrMapA<size_t> emplace & find ssa;_mean 3715466 ns 3715476 ns 4
hashStrMapA<size_t> emplace & find ssa;_median 3724805 ns 3724814 ns 4
hashStrMapA<size_t> emplace & find ssa;_stddev 29987 ns 29987 ns 4
hashStrMapA<size_t> emplace & find ssa;_cv 0.81 % 0.81 % 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 3948260 ns 3948273 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 3934504 ns 3934514 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 96130 ns 96129 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 2.43 % 2.43 % 4
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 733 ns 733 ns 4
Build func full name std::string;_median 725 ns 725 ns 4
Build func full name std::string;_stddev 29.9 ns 29.9 ns 4
Build func full name std::string;_cv 4.08 % 4.08 % 4
Build func full name std::string 1;_mean 789 ns 789 ns 4
Build func full name std::string 1;_median 791 ns 791 ns 4
Build func full name std::string 1;_stddev 18.5 ns 18.5 ns 4
Build func full name std::string 1;_cv 2.35 % 2.35 % 4
Build func full name std::stream;_mean 2490 ns 2490 ns 4
Build func full name std::stream;_median 2483 ns 2483 ns 4
Build func full name std::stream;_stddev 47.0 ns 47.0 ns 4
Build func full name std::stream;_cv 1.89 % 1.89 % 4
Build func full name stringa;_mean 449 ns 449 ns 4
Build func full name stringa;_median 449 ns 449 ns 4
Build func full name stringa;_stddev 8.80 ns 8.80 ns 4
Build func full name stringa;_cv 1.96 % 1.96 % 4
Build func full name stringa 1;_mean 530 ns 530 ns 4
Build func full name stringa 1;_median 526 ns 526 ns 4
Build func full name stringa 1;_stddev 9.76 ns 9.76 ns 4
Build func full name stringa 1;_cv 1.84 % 1.84 % 4
----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
To upper case std::wstring_mean 168 ns 168 ns 4
To upper case std::wstring_median 162 ns 162 ns 4
To upper case std::wstring_stddev 13.7 ns 13.7 ns 4
To upper case std::wstring_cv 8.13 % 8.13 % 4
To upper case lstringw<15>_mean 39.3 ns 39.3 ns 4
To upper case lstringw<15>_median 39.3 ns 39.3 ns 4
To upper case lstringw<15>_stddev 0.644 ns 0.644 ns 4
To upper case lstringw<15>_cv 1.64 % 1.64 % 4

View File

@ -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.7.1
PROJECT_NUMBER = 1.7.2
# 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

View File

@ -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.7.1
PROJECT_NUMBER = 1.7.2
# 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

View File

@ -1,6 +1,6 @@
/*
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* ver. 1.7.1
* ver. 1.7.2
*/
#pragma once

View File

@ -1,5 +1,5 @@
/*
* ver. 1.7.1
* ver. 1.7.2
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Классы для работы со строками
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
@ -331,9 +331,9 @@ public:
return {};
}
#ifdef __linux__
if constexpr(sizeof(K) == 1) {
if constexpr(sizeof(K) == 1 && requires {std::from_chars(std::declval<const K*>(), std::declval<const K*>(), std::declval<double&>()); }) {
double d{};
if (std::from_chars((const u8s*)ptr, (const u8s*)ptr + len, d).ec == std::errc{}) {
if (std::from_chars((const K*)ptr, (const K*)ptr + len, d).ec == std::errc{}) {
return d;
}
return {};

View File

@ -1,5 +1,5 @@
/*
* ver. 1.7.1
* ver. 1.7.2
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* База для строковых конкатенаций через выражения времени компиляции
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
@ -4158,7 +4158,9 @@ public:
* @en @brief Convert string to double.
* @return std::optional<double>.
*/
template<bool SkipWS = true, bool AllowPlus = true> requires (sizeof(K) == 1)
template<bool SkipWS = true, bool AllowPlus = true>
requires(sizeof(K) == 1 &&
requires { std::from_chars(std::declval<K*>(), std::declval<K*>(), std::declval<double&>()); })
std::optional<double> to_double() const noexcept {
size_t len = _len();
const K* ptr = _str();
@ -4177,9 +4179,11 @@ public:
if (!len) {
return {};
}
double d{};
if (std::from_chars((const u8s*)ptr, (const u8s*)ptr + len, d).ec == std::errc{}) {
return d;
if constexpr (requires { std::from_chars(std::declval<K*>(), std::declval<K*>(), std::declval<double&>()); }) {
double d{};
if (std::from_chars((const K*)ptr, (const K*)ptr + len, d).ec == std::errc{}) {
return d;
}
}
return {};
}
@ -4189,7 +4193,9 @@ public:
* @en @brief Convert string in hex form to double.
* @return std::optional<double>.
*/
template<bool SkipWS = true> requires (sizeof(K) == 1)
template<bool SkipWS = true>
requires(sizeof(K) == 1 &&
requires { std::from_chars(std::declval<K*>(), std::declval<K*>(), std::declval<double&>()); })
std::optional<double> to_double_hex() const noexcept {
size_t len = _len();
const K* ptr = _str();
@ -4200,9 +4206,11 @@ public:
}
}
if (len) {
double d{};
if (std::from_chars(ptr, ptr + len, d, std::chars_format::hex).ec == std::errc{}) {
return d;
if constexpr (requires { std::from_chars(std::declval<K*>(), std::declval<K*>(), std::declval<double&>()); }) {
double d{};
if (std::from_chars((const K*)ptr, (const K*)ptr + len, d, std::chars_format::hex).ec == std::errc{}) {
return d;
}
}
}
return {};

View File

@ -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.7.1.
Version 1.7.2.
<h2>Speed up your work with strings by 2-10 times!</h2>
@ -324,8 +324,8 @@ function(add_simstr)
simstr
GIT_REPOSITORY https://github.com/orefkov/simstr.git
GIT_SHALLOW TRUE
GIT_TAG tags/rel1.7.1 # Specify the desired release
FIND_PACKAGE_ARGS NAMES simstr 1.7.1
GIT_TAG tags/rel1.7.2 # Specify the desired release
FIND_PACKAGE_ARGS NAMES simstr 1.7.2
)
FetchContent_MakeAvailable(simstr)
endfunction()

View File

@ -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.7.1.
Версия 1.7.2.
<h2>Ускорь работу со строками в 2-10 раз!</h2>
@ -325,8 +325,8 @@ function(add_simstr)
simstr
GIT_REPOSITORY https://github.com/orefkov/simstr.git
GIT_SHALLOW TRUE
GIT_TAG tags/rel1.7.1 # Укажите нужный релиз
FIND_PACKAGE_ARGS NAMES simstr 1.7.1
GIT_TAG tags/rel1.7.2 # Укажите нужный релиз
FIND_PACKAGE_ARGS NAMES simstr 1.7.2
)
FetchContent_MakeAvailable(simstr)
endfunction()

View File

@ -1,5 +1,5 @@
/*
* ver. 1.7.1
* ver. 1.7.2
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Реализация строковых функций
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com

View File

@ -1,5 +1,5 @@
/*
* ver. 1.7.1
* ver. 1.7.2
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Тесты simstr
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com

View File

@ -1,5 +1,5 @@
/*
* ver. 1.7.1
* ver. 1.7.2
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Тесты simstr
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
@ -1987,13 +1987,21 @@ TEST(SimStr, HexEpr) {
std::u32string textuu = +U"val = 0X"sv + e_hex<HexFlags::No0x | HexFlags::Short>(0x12Au);
EXPECT_EQ(textuu, U"val = 0X12A");
if (sizeof(void*) == 8) {
text = +"ptr = "sv + (const void*)0xdeadbeefcafe01;
EXPECT_EQ(text, "ptr = 0x00DEADBEEFCAFE01");
text = +"ptr = "sv + (const void*)0xdeadbeefcafe01;
EXPECT_EQ(text, "ptr = 0x00DEADBEEFCAFE01");
const char* ptr = (const char*)0xdeadbeefcafe01;
std::u16string utext = ptr + +u" freed"sv;
EXPECT_EQ(utext, u"0x00DEADBEEFCAFE01 freed");
} else {
text = +"ptr = "sv + (const void*)0xdeadbeef;
EXPECT_EQ(text, "ptr = 0xDEADBEEF");
const char* ptr = (const char*)0xdeadbeefcafe01;
std::u16string utext = ptr + +u" freed"sv;
EXPECT_EQ(utext, u"0x00DEADBEEFCAFE01 freed");
const char* ptr = (const char*)0xdeadbeef;
std::u16string utext = ptr + +u" freed"sv;
EXPECT_EQ(utext, u"0xDEADBEEF freed");
}
}
TEST(SimStr, EFill) {

View File

@ -1,5 +1,5 @@
/*
* ver. 1.7.1
* ver. 1.7.2
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Тесты simstr
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com