Compare commits

...

27 Commits

Author SHA1 Message Date
Aleksandr Orefkov e9eaa6c4cb Fix noexcept in find_or_throw 2026-08-05 14:36:02 +03:00
Aleksandr Orefkov 00a4a008a9 1.9.1
- Добавлены методы get, prefix, suffix
- Методы substr и simple_str() объявлены deprecated.
- Added methods get, prefix, suffix
- The substr and simple_str() methods are deprecated.
2026-07-31 16:08:33 +03:00
Aleksandr Orefkov 86deccbac3 1.8.2
Добавлено несколько методов в hashStrMap.
Added several methods to hashStrMap.
2026-07-24 16:24:40 +03:00
Aleksandr Orefkov a779aa7320 Fix allocator use. 2026-03-23 10:38:10 +03:00
Aleksandr Orefkov e9e717c8bd 1.8.1
- Added the ability to use allocators with size specification when deallocating.
---
- Добавлена возможность использовать аллокаторы с указанием размера при деалокации.
2026-03-22 14:58:45 +03:00
Aleksandr Orefkov 0861d365f5 1.7.3
- Added several string functions.
---
- Добавлено несколько строковых функций.
2026-03-08 17:53:28 +03:00
Aleksandr Orefkov 91a2f798e3 Update description 2026-03-01 11:15:47 +03:00
Aleksandr Orefkov c8fb92fee0 1.7.2
- Fix build for Clang with libc++
- Update benchmarks.
2026-02-27 23:05:49 +03:00
Aleksandr Orefkov a083ff1b8b Some fixes 2026-02-25 14:31:11 +03:00
Aleksandr Orefkov f798e8fbbb Change docs 2026-02-22 11:23:30 +03:00
Aleksandr Orefkov 75c9d52f0d 1.7.1
- Changed hashStrMap implementation. Added the ability to specify an allocator.
- Fixed identified bugs.
---
- Изменил реализацию hashStrMap. Добавил возможность указывать аллокатор.
- Исправил найденные ошибки
2026-02-21 16:51:57 +03:00
Aleksandr Orefkov c604e89bdf Fix doc. 2026-02-16 00:34:15 +03:00
Aleksandr Orefkov 7bb7ddb766 1.7.0
- Add e_upper, e_lower, e_ascii_upper, e_ascii_lower sting expressions.
- Add str::make_ascii_upper, str::make_ascii_lower functions for std::string.

- Добавлены строковые выражения e_upper, e_lower, e_ascii_upper, e_ascii_lower.
- Добавлены функции str::make_ascii_upper, str::make_ascii_lower functions для std::string.
2026-02-16 00:03:09 +03:00
Aleksandr Orefkov 8610bea2a9 Add some benchmarks with stringzilla. 2026-02-14 13:09:54 +03:00
Aleksandr Orefkov ee73896337 1.6.7
Optimized copying of short lstrings.
The Emscripten build now allows benchmarks to run synchronously.
Оптимизировано копирование коротких lstring.
В Emscripten сборке добавлена возможность запустить бенчмарки синхронно.
2026-02-12 19:53:32 +03:00
Aleksandr Orefkov e62493a678 Fix error converting to double char8_t 2026-02-11 11:24:57 +03:00
Aleksandr Orefkov 8cf026f2c6 - Updated to 1.6.6.
- Improved UTF conversion.
- Fixed a number of bugs.
- Improved Emscripten benchmark compilation.
---
- Обновление до 1.6.6.
- Доработал UTF-конвертацию.
- Исправил ряд ошибок.
- Доработал Emscripten сборку бенчмарков.
2026-02-10 23:35:02 +03:00
Aleksandr Orefkov 2148718b32 - Update to 1.6.5.
- Benchmark build for Emscripten output text with no delay.
- Add ""_f16 flag for use e_hex as `num / 1_f16`.
2026-02-08 14:17:03 +03:00
Aleksandr Orefkov 4e1d1b5ffa Some small fixes. 2026-02-05 12:05:49 +03:00
Aleksandr Orefkov ad3a452db5 - Update to 1.6.4
- Add operator""_fmt for integer format.
2026-02-04 17:25:40 +03:00
Aleksandr Orefkov c0dfdd4ef5 Update results 2026-02-03 23:28:15 +03:00
Aleksandr Orefkov 317a4c5994 - Updated to version 1.6.3
- e_subst has been rewritten and no longer requires specifying the format string twice.
- Added the e_int method for formatting integers.
- Bug fixes and code optimizations.
- Benchmarks and tests added.
- Updated documentation and benchmark results.

- Обновлена версия на 1.6.3
- e_subst переделан и теперь не требует указывать форматную строку дважды.
- Добавлен метод e_int для форматирования целых чисел.
- Исправлены ошибки, оптимизирован код.
- Добавлены бенчмарки и тесты.
- Обновлена документация и результаты бенчмарков.
2026-02-03 18:27:57 +03:00
Aleksandr Orefkov 15c78e65f9 - Version 1.6.2.
- Add function e_vsubst.
- make e_repl constexpr.
2026-01-31 17:24:12 +03:00
Aleksandr Orefkov 1d633b72dd fix typo 2026-01-30 18:33:52 +03:00
Aleksandr Orefkov 928ed1af23 - Add new string class - cestring, constexpr string. Worked in consteval.
- Change lstring allocation align to 16 bytes.
- Update version to 1.6.1
2026-01-30 17:30:09 +03:00
Aleksandr Orefkov ce3fe2204c - Update benchmarks results.
- Add support for pretty view in debuggers for str_src and str_src_nt.
2026-01-29 23:48:41 +03:00
Aleksandr Orefkov bb70d1b0a4 - Version updated to 1.6.0.
- Added functions e_concat and e_subst.
- Added four ways to specify a type conversion to a string expression.
- Implemented a universal operator+ for string expressions and types that can be converted to string expressions.

- Версия обновлена на 1.6.0.
- Добавлены функции e_concat и e_subst.
- Добавлено четыре способа задать преобразование типа в строковое выражение.
- Реализован универсальный operator+ для строковых выражений и типов, которые могут преобразовываться в строковые выражения.
2026-01-29 18:43:08 +03:00
35 changed files with 11827 additions and 6125 deletions

View File

@ -5,7 +5,7 @@ include(FetchContent)
project( project(
simstr simstr
VERSION 1.5.0 VERSION 1.9.1
DESCRIPTION "Yet another modern C++ string library" DESCRIPTION "Yet another modern C++ string library"
HOMEPAGE_URL "https://github.com/orefkov/simstr" HOMEPAGE_URL "https://github.com/orefkov/simstr"
LANGUAGES CXX LANGUAGES CXX
@ -29,6 +29,12 @@ option(SIMSTR_BUILD_TESTS "Build tests" ON)
option(SIMSTR_BENCHMARKS "Build benchmarks" Off) option(SIMSTR_BENCHMARKS "Build benchmarks" Off)
option(USE_SYSTEM_DEPS "Use system dependencies" 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_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 add_library(simstr_simstr
src/sstring.cpp src/sstring.cpp
@ -125,6 +131,9 @@ if(SIMSTR_BUILD_TESTS)
if(TARGET gtest) if(TARGET gtest)
target_compile_features(gtest PUBLIC cxx_std_23) target_compile_features(gtest PUBLIC cxx_std_23)
target_compile_features(gtest_main PUBLIC cxx_std_23) target_compile_features(gtest_main PUBLIC cxx_std_23)
if (CLANG_COMPILER)
target_compile_options(gtest PRIVATE -Wno-error=character-conversion)
endif(CLANG_COMPILER)
endif() endif()
endif() endif()
@ -142,6 +151,10 @@ function(GBencmark)
set(BENCHMARK_INSTALL_DOCS OFF) set(BENCHMARK_INSTALL_DOCS OFF)
set(BENCHMARK_DOWNLOAD_DEPENDENCIES ON) set(BENCHMARK_DOWNLOAD_DEPENDENCIES ON)
set(BENCHMARK_ENABLE_GTEST_TESTS OFF) 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) add_compile_definitions(BENCHMARK_STATIC_DEFINE)
FetchContent_MakeAvailable(googlebench) FetchContent_MakeAvailable(googlebench)
if(TARGET benchmark) if(TARGET benchmark)

View File

@ -134,8 +134,8 @@
"inherits": "base", "inherits": "base",
"displayName": "Linux base", "displayName": "Linux base",
"cacheVariables": { "cacheVariables": {
"CMAKE_C_COMPILER": "gcc-13", "CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++-13", "CMAKE_CXX_COMPILER": "g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true "CMAKE_EXPORT_COMPILE_COMMANDS": true
}, },
"condition": { "condition": {
@ -169,7 +169,7 @@
}, },
{ {
"name": "linux-release", "name": "linux-release",
"displayName": "Linux Release", "displayName": "Linux Release GCC",
"inherits": "linux-base", "inherits": "linux-base",
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Release" "CMAKE_BUILD_TYPE": "Release"
@ -181,8 +181,20 @@
"inherits": "linux-base", "inherits": "linux-base",
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Release", "CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "clang-21", "CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++-21" "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,13 +6,34 @@ cmake_minimum_required (VERSION 3.15)
add_executable(benchStr bench_str.cpp bench.h) add_executable(benchStr bench_str.cpp bench.h)
target_link_libraries(benchStr simstr::simstr benchmark::benchmark) target_link_libraries(benchStr simstr::simstr benchmark::benchmark)
target_compile_features(benchStr PUBLIC cxx_std_23) target_compile_features(benchStr PUBLIC cxx_std_23)
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
GIT_TAG tags/12.1.0
)
FetchContent_MakeAvailable(fmt)
FetchContent_Declare(
stringzilla
GIT_REPOSITORY https://github.com/ashvardanian/StringZilla.git
GIT_TAG main # or specify a version tag
)
FetchContent_MakeAvailable(stringzilla)
target_link_libraries(benchStr fmt::fmt stringzilla_header)
add_executable(process_result process_result.cpp) add_executable(process_result process_result.cpp)
target_link_libraries(process_result simstr_simstr) target_link_libraries(process_result simstr_simstr)
if (EMSCRIPTEN) if (EMSCRIPTEN)
#target_link_options(benchStr PRIVATE -sSTACK_SIZE=1048576 -sINITIAL_MEMORY=128MB -sALLOW_MEMORY_GROWTH=0) #target_link_options(benchStr PRIVATE -sSTACK_SIZE=1048576 -sINITIAL_MEMORY=128MB -sALLOW_MEMORY_GROWTH=0)
set_target_properties (benchStr PROPERTIES SUFFIX .html) set_target_properties (benchStr PROPERTIES SUFFIX .html)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -sASYNCIFY --shell-file ${CMAKE_CURRENT_SOURCE_DIR}/emscripten/shell_minimal.html")
if(SIMSTR_EMSCRIPTEN_MT) if(SIMSTR_EMSCRIPTEN_MT)
target_link_options(benchStr PUBLIC -pthread -sPTHREAD_POOL_SIZE=navigator.hardwareConcurrency-1 -sENVIRONMENT=web,worker) target_link_options(benchStr PUBLIC -pthread -sPTHREAD_POOL_SIZE=navigator.hardwareConcurrency-1 -sENVIRONMENT=web,worker)
endif() endif()

View File

@ -1,23 +1,182 @@
/* /*
* ver. 1.9.1
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Бенчмарки * Бенчмарки
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
* Benchmarks
*/ */
#include <stringzilla/stringzilla.h>
#include <stringzilla/stringzilla.hpp>
#include "bench.h" #include "bench.h"
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <charconv> #include <charconv>
#include <iomanip>
#include <fmt/format.h>
#include <fmt/compile.h>
using namespace simstr; using namespace simstr;
using namespace std::literals; using namespace std::literals;
#ifdef EMSCRIPTEN
#include <emscripten.h>
bool do_sync = false;
static void DoTeardown(const benchmark::State& state) {
// Это нужно чтобы интерфейс браузера обновился
// This is necessary for the browser interface to refresh.
if (!do_sync) {
emscripten_sleep(1);
}
}
#undef BENCHMARK
#define BENCHMARK(...) \
BENCHMARK_PRIVATE_DECLARE(_benchmark_) = \
(::benchmark::internal::RegisterBenchmarkInternal( \
::benchmark::internal::make_unique< \
::benchmark::internal::FunctionBenchmark>(#__VA_ARGS__, \
__VA_ARGS__)))->Teardown(DoTeardown)
#undef BENCHMARK_CAPTURE
#define BENCHMARK_CAPTURE(func, test_case_name, ...) \
BENCHMARK_PRIVATE_DECLARE(_benchmark_) = \
(::benchmark::internal::RegisterBenchmarkInternal( \
::benchmark::internal::make_unique< \
::benchmark::internal::FunctionBenchmark>( \
#func "/" #test_case_name, \
[](::benchmark::State& st) { func(st, __VA_ARGS__); })))->Teardown(DoTeardown)
#endif
#define TEST_TEXT "Test text" #define TEST_TEXT "Test text"
#define LONG_TEXT "123456789012345678901234567890" #define LONG_TEXT "123456789012345678901234567890"
#define TEXT_16 "abbaabbaabbaabba" #define TEXT_16 "abbaabbaabbaabba"
#define CHECK_RESULT //#define CHECK_RESULT
void __(benchmark::State& state) { for (auto _: state) {} } void __(benchmark::State& state) { for (auto _: state) {} }
namespace sz = ashvardanian::stringzilla;
sz::string email_concat_stringzilla_app(sz::string name, sz::string_view domain, sz::string_view tld) {
return name.append("@").append(domain).append(".").append(tld);
}
//> sz::string email_concat_stringzilla_app(sz::string name, sz::string_view domain, sz::string_view tld) {
void ConcatEmailSzApp(benchmark::State& state) {
sz::string name = "username";
sz::string_view domain = "verybigdomain", tld = "tld";
for (auto _: state) {
benchmark::DoNotOptimize(name);
benchmark::DoNotOptimize(domain);
benchmark::DoNotOptimize(tld);
auto email = email_concat_stringzilla_app(name, domain, tld);
benchmark::DoNotOptimize(email);
}
}
sz::string email_concat_stringzilla_exp(sz::string name, sz::string_view domain, sz::string_view tld) {
return sz::string{name | sz::string_view{"@"} | domain | sz::string_view{"."} | tld};
}
//> sz::string email_concat_stringzilla_exp(sz::string name, sz::string_view domain, sz::string_view tld) {
void ConcatEmailSzExp(benchmark::State& state) {
sz::string name = "username";
sz::string_view domain = "verybigdomain", tld = "tld";
for (auto _: state) {
benchmark::DoNotOptimize(name);
benchmark::DoNotOptimize(domain);
benchmark::DoNotOptimize(tld);
auto email = email_concat_stringzilla_exp(name, domain, tld);
benchmark::DoNotOptimize(email);
}
}
std::string email_concat_format(std::string_view name, std::string_view domain, std::string_view tld) {
return std::format("{}@{}.{}", name, domain, tld);
}
//> std::string email_concat_format(std::string_view name, std::string_view domain, std::string_view tld) {
void ConcatEmailFormat(benchmark::State& state) {
std::string_view name = "username", domain = "verybigdomain", tld = "tld";
for (auto _: state) {
benchmark::DoNotOptimize(name);
benchmark::DoNotOptimize(domain);
benchmark::DoNotOptimize(tld);
auto email = email_concat_format(name, domain, tld);
benchmark::DoNotOptimize(email);
}
}
std::string email_concat_stream(std::string_view name, std::string_view domain, std::string_view tld) {
std::stringstream s;
s << name << "@" << domain << "." << tld;
return s.str();
}
//> std::string email_concat_stream(std::string_view name, std::string_view domain, std::string_view tld) {
void ConcatEmailStream(benchmark::State& state) {
std::string_view name = "username", domain = "verybigdomain", tld = "tld";
for (auto _: state) {
benchmark::DoNotOptimize(name);
benchmark::DoNotOptimize(domain);
benchmark::DoNotOptimize(tld);
auto email = email_concat_stream(name, domain, tld);
benchmark::DoNotOptimize(email);
}
}
std::string email_concat_std(std::string name, std::string_view domain, std::string_view tld) {
return name.append("@").append(domain).append(".").append(tld);
}
//> std::string email_concat_std(std::string name, std::string_view domain, std::string_view tld) {
void ConcatEmailStd(benchmark::State& state) {
std::string name = "username";
std::string_view domain = "verybigdomain", tld = "tld";
for (auto _: state) {
benchmark::DoNotOptimize(name);
benchmark::DoNotOptimize(domain);
benchmark::DoNotOptimize(tld);
auto email = email_concat_std(name, domain, tld);
benchmark::DoNotOptimize(email);
}
}
std::string email_concat_std_expr(std::string_view name, std::string_view domain, std::string_view tld) {
return +name + "@" + domain + "." + tld;
}
//> std::string email_concat_std_expr(std::string_view name, std::string_view domain, std::string_view tld) {
void ConcatEmailStdExp(benchmark::State& state) {
std::string_view name = "username", domain = "verybigdomain", tld = "tld";
for (auto _: state) {
benchmark::DoNotOptimize(name);
benchmark::DoNotOptimize(domain);
benchmark::DoNotOptimize(tld);
auto email = email_concat_std_expr(name, domain, tld);
benchmark::DoNotOptimize(email);
}
}
stringa email_concat_sim_expr(ssa name, ssa domain, ssa tld) {
return name + "@" + domain + "." + tld;
}
//> stringa email_concat_sim_expr(ssa name, ssa domain, ssa tld) {
void ConcatEmailSimExp(benchmark::State& state) {
ssa name = "username", domain = "verybigdomain", tld = "tld";
for (auto _: state) {
benchmark::DoNotOptimize(name);
benchmark::DoNotOptimize(domain);
benchmark::DoNotOptimize(tld);
auto email = email_concat_sim_expr(name, domain, tld);
benchmark::DoNotOptimize(email);
}
}
BENCHMARK(__)->Name("----- Concatenate email ---------")->Repetitions(1);
BENCHMARK(ConcatEmailFormat)->Name("Concat email std::format");
BENCHMARK(ConcatEmailStream)->Name("Concat email std::stringstream");
BENCHMARK(ConcatEmailSzApp) ->Name("Concat email stringzilla append");
BENCHMARK(ConcatEmailSzExp) ->Name("Concat email stringzilla concat");
BENCHMARK(ConcatEmailStd) ->Name("Concat email std::string append");
BENCHMARK(ConcatEmailStdExp)->Name("Concat email std::string by strexpr");
BENCHMARK(ConcatEmailSimExp)->Name("Concat email stringa");
void ConcatStdToStd(benchmark::State& state) { void ConcatStdToStd(benchmark::State& state) {
std::string s1 = "start "; std::string s1 = "start ";
@ -52,30 +211,71 @@ void ConcatSimToSim(benchmark::State& state) {
} }
} }
BENCHMARK(__)->Name("----- Concatenate string + Number + \"Literal\" ---------")->Repetitions(1); void ConcatSimToSimConcat(benchmark::State& state) {
BENCHMARK(ConcatStdToStd) ->Name("Concat std::string and number by std to std::string"); stra s1 = "start ";
BENCHMARK(ConcatSimToStd) ->Name("Concat std::string and number by StrExpr to std::string"); for (auto _: state) {
BENCHMARK(ConcatSimToSim) ->Name("Concat stringa and number by StrExpr to simstr::stringa"); for (int i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1);
stringa str = e_concat("", s1, i, " end");
benchmark::DoNotOptimize(str);
}
}
}
void ConcatStdToStdHex(benchmark::State& state) { BENCHMARK(__)->Name("----- Concatenate string + Number + \"Literal\" ---------")->Repetitions(1);
BENCHMARK(ConcatStdToStd) ->Name("Concat std::string and number by std to std::string");
BENCHMARK(ConcatSimToStd) ->Name("Concat std::string and number by StrExpr to std::string");
BENCHMARK(ConcatSimToSim) ->Name("Concat stringa and number by StrExpr to simstr::stringa");
BENCHMARK(ConcatSimToSimConcat) ->Name("Concat stringa and number by e_concat to simstr::stringa");
void ConcatStdToFmtHex(benchmark::State& state) {
// We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer. // We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer.
std::string s1 = "art "; std::string s1 = "art ";
for (auto _: state) { for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) { for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s1);
// What is standard method to get hex number? // It is not worked for char8_t, char16_t, char32_t :(
std::string str = s1 + std::format("0x{:x}", i) + " end"; std::string str = s1 + std::format("{:#x}", i) + " end";
benchmark::DoNotOptimize(str); benchmark::DoNotOptimize(str);
} }
} }
} }
void ConcatAllFmtToHex(benchmark::State& state) {
// We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer.
std::string s1 = "art ";
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1);
// It is not worked for char8_t, char16_t, char32_t :(
std::string str = std::format("{}{:#x} end", s1, i);
benchmark::DoNotOptimize(str);
}
}
}
void ConcatStdToCharsHex(benchmark::State& state) {
// We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer.
std::string s1 = "art ";
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1);
// it worked only for char :(
char buf[40];
size_t len = std::to_chars(buf, buf + std::size(buf), i, 16).ptr - buf;
std::string str = s1 + "0x" + std::string(buf, len) + " end";
benchmark::DoNotOptimize(str);
}
}
}
void ConcatSimToStdHex(benchmark::State& state) { void ConcatSimToStdHex(benchmark::State& state) {
// We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer. // We use a short string so that the longest result is 15 characters and fits in the std::string SSO buffer.
std::string s1 = "art "; std::string s1 = "art ";
for (auto _: state) { for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) { for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s1);
std::string str = +s1 + e_hex<HexFlags::Short>(i) + " end"; // Can work for all types of symbols
std::string str = +s1 + i / 1_f16 + " end";
benchmark::DoNotOptimize(str); benchmark::DoNotOptimize(str);
} }
} }
@ -87,16 +287,161 @@ void ConcatSimToSimHex(benchmark::State& state) {
for (auto _: state) { for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) { for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1); benchmark::DoNotOptimize(s1);
stringa str = s1 + e_hex<HexFlags::Short>(i) + " end"; // Can work for all types of symbols
stringa str = s1 + i / 1_f16 + " end";
benchmark::DoNotOptimize(str);
}
}
}
void ConcatSimToSimHexC(benchmark::State& state) {
// stringa SSO buffer is 23, but we use a short string to compare under the same conditions
stra s1 = "art ";
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1);
// Can work for all types of symbols
stringa str = e_concat("", s1, i / 1_f16, " end");
benchmark::DoNotOptimize(str);
}
}
}
void ConcatSimToSimHexS(benchmark::State& state) {
// stringa SSO buffer is 23, but we use a short string to compare under the same conditions
stra s1 = "art ";
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1);
stringa str = e_subst("{}{} end", s1, i / 1_f16);
benchmark::DoNotOptimize(str);
}
}
}
void ConcatSimToSimHexVS(benchmark::State& state) {
// stringa SSO buffer is 23, but we use a short string to compare under the same conditions
stra s1 = "art ";
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
benchmark::DoNotOptimize(s1);
stringa str = e_vsubst("{}{} end"_ss, s1, i / 1_f16);
benchmark::DoNotOptimize(str); benchmark::DoNotOptimize(str);
} }
} }
} }
BENCHMARK(__)->Name("----- Concatenate string + Hex Number + \"Literal\" ---------")->Repetitions(1); BENCHMARK(__)->Name("----- Concatenate string + Hex Number + \"Literal\" ---------")->Repetitions(1);
BENCHMARK(ConcatStdToStdHex) ->Name("Concat std::string and hex number by std to std::string"); BENCHMARK(ConcatStdToFmtHex) ->Name("Concat std::string and format hex number and literal to std::string");
BENCHMARK(ConcatSimToStdHex) ->Name("Concat std::string and hex number by StrExpr to std::string"); BENCHMARK(ConcatAllFmtToHex) ->Name("std::format std::string and hex number by literal to std::string");
BENCHMARK(ConcatSimToSimHex) ->Name("Concat stringa and hex number by StrExpr to simstr::stringa"); BENCHMARK(ConcatStdToCharsHex) ->Name("Concat std::string and std::to_chars and string to std::string");
BENCHMARK(ConcatSimToStdHex) ->Name("Concat std::string and hex number and literal by StrExpr to std::string");
BENCHMARK(ConcatSimToSimHex) ->Name("Concat stringa and hex number and literal by StrExpr to simstr::stringa");
BENCHMARK(ConcatSimToSimHexC) ->Name("Concat stringa and hex number and literal by e_concat to simstr::stringa");
BENCHMARK(ConcatSimToSimHexS) ->Name("Subst stringa and hex number by e_subst literal to simstr::stringa");
BENCHMARK(ConcatSimToSimHexVS) ->Name("Subst stringa and hex number by e_vsubst stra to simstr::stringa");
void ConcatSimToSimOct(benchmark::State& state) {
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
stringa str = "abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end";
benchmark::DoNotOptimize(str);
}
}
}
void SubstSimToSimOct(benchmark::State& state) {
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
stringa str = e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt);
benchmark::DoNotOptimize(str);
}
}
}
void VSubstSimToSimOct(benchmark::State& state) {
ssa pattern = "abcdefghihklmopqr {} end";
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
stringa str = e_vsubst(pattern, i / 0x8a010_fmt);
benchmark::DoNotOptimize(str);
}
}
}
void FormatStdToStdOct(benchmark::State& state) {
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
std::string str = std::format("abcdefghihklmopqr {:#010o} end", i);
benchmark::DoNotOptimize(str);
}
}
}
void VFormatStdToStdOct(benchmark::State& state) {
std::string_view pattern = "abcdefghihklmopqr {:#010o} end";
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
std::string str = std::vformat(pattern, std::make_format_args(i));
benchmark::DoNotOptimize(str);
}
}
}
void StreamStdToStdOct(benchmark::State& state) {
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
std::stringstream strm;
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end";
std::string str = strm.str();
benchmark::DoNotOptimize(str);
}
}
}
void FmtFormatComp(benchmark::State& state) {
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
std::string str = fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i);
benchmark::DoNotOptimize(str);
}
}
}
void FmtFormat(benchmark::State& state) {
for (auto _: state) {
for (unsigned i = 1; i <= 100'000; i *= 10) {
std::string str = fmt::format("abcdefghihklmopqr {:#010o} end", i);
benchmark::DoNotOptimize(str);
}
}
}
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;
str.resize_and_overwrite(len, [&](char* p, size_t) {
std::format_to_n(str.data(), len, "abcdefghihklmopqr {:#010o} end", i);
return len;
});
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)");
BENCHMARK(VSubstSimToSimOct) ->Name("e_vsubst(pattern, i / 0x8a010_fmt)");
BENCHMARK(FmtFormatComp) ->Name("fmt::format(FMT_COMPILE(\"abcdefghihklmopqr {:#010o} end\"), i)");
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) { void ConcatStdToStdS(benchmark::State& state) {
std::string s1 = "start "; std::string s1 = "start ";
@ -149,6 +494,10 @@ size_t find_pos_sim(ssa src, ssa name) {
return src.find(lstringa<200>{"\n- " + name + " -\n"}); return src.find(lstringa<200>{"\n- " + name + " -\n"});
} }
size_t find_pos_sz(sz::string_view src, sz::string_view name) {
return src.find(sz::string{"\n- "}.append(name).append(" -\n"));
}
//> size_t find_pos_str(std::string_view src, std::string_view name) { //> size_t find_pos_str(std::string_view src, std::string_view name) {
void FindConcatThreeStr(benchmark::State& state) { void FindConcatThreeStr(benchmark::State& state) {
std::string_view src = "sdfsdf\n- testtesttesttesttesttesttestte -\nsfrgdgfsg"; std::string_view src = "sdfsdf\n- testtesttesttesttesttesttestte -\nsfrgdgfsg";
@ -199,12 +548,27 @@ void FindConcatThreeSim(benchmark::State& state) {
#endif #endif
} }
} }
//> size_t find_pos_sz(sz::string_view src, sz::string_view name) {
void FindConcatThreeSz(benchmark::State& state) {
sz::string_view src = "sdfsdf\n- testtesttesttesttesttesttestte -\nsfrgdgfsg";
sz::string_view fnd = "testtesttesttesttesttesttestte";
for (auto _: state) {
benchmark::DoNotOptimize(src);
benchmark::DoNotOptimize(fnd);
size_t pos = find_pos_sz(src, fnd);
benchmark::DoNotOptimize(pos);
#ifdef CHECK_RESULT
if (pos != 6) {
state.SkipWithError("fail");
}
#endif
}
}
BENCHMARK(__)->Name("----- Find three concatenated string in string_view -----")->Repetitions(1); BENCHMARK(__)->Name("----- Find three concatenated string in string_view -----")->Repetitions(1);
BENCHMARK(FindConcatThreeStr)->Name("Find concat three std::string"); BENCHMARK(FindConcatThreeStr)->Name("Find concat three std::string");
BENCHMARK(FindConcatThreeExp)->Name("Find concat three strexpr"); BENCHMARK(FindConcatThreeExp)->Name("Find concat three strexpr");
BENCHMARK(FindConcatThreeSim)->Name("Find concat three simstr"); BENCHMARK(FindConcatThreeSim)->Name("Find concat three simstr");
BENCHMARK(FindConcatThreeSz) ->Name("Find concat three stringzilla string");
std::string buildTypeNameStr(std::string_view type_name, size_t prec, size_t scale) { std::string buildTypeNameStr(std::string_view type_name, size_t prec, size_t scale) {
std::string res{type_name}; std::string res{type_name};
@ -426,6 +790,7 @@ void Find(benchmark::State& state) {
} }
} }
BENCHMARK(__)->Name("----- Find 9 symbols text in end of 99 symbols text ---------")->Repetitions(1); BENCHMARK(__)->Name("----- Find 9 symbols text in end of 99 symbols text ---------")->Repetitions(1);
BENCHMARK(Find<sz::string>)->Name("sz::string::find;");
BENCHMARK(Find<std::string>) ->Name("std::string::find;"); BENCHMARK(Find<std::string>) ->Name("std::string::find;");
BENCHMARK(Find<std::string_view>) ->Name("std::string_view::find;"); BENCHMARK(Find<std::string_view>) ->Name("std::string_view::find;");
BENCHMARK(Find<ssa>) ->Name("ssa::find;"); BENCHMARK(Find<ssa>) ->Name("ssa::find;");
@ -573,7 +938,6 @@ void ToIntNoOverflow(benchmark::State& state, ssa t, int c) {
benchmark::DoNotOptimize(t); benchmark::DoNotOptimize(t);
} }
} }
BENCHMARK(__)->Name("----- Convert to int '1234567' ---------")->Repetitions(1); BENCHMARK(__)->Name("----- Convert to int '1234567' ---------")->Repetitions(1);
BENCHMARK_CAPTURE(ToIntStr10, , std::string{"123456789"}, 123456789) ->Name("std::string s = \"123456789\"; int res = std::strtol(s.c_str(), 0, 10);"); BENCHMARK_CAPTURE(ToIntStr10, , std::string{"123456789"}, 123456789) ->Name("std::string s = \"123456789\"; int res = std::strtol(s.c_str(), 0, 10);");
BENCHMARK_CAPTURE(ToIntFromChars10, , std::string_view{"123456789"}, 123456789) ->Name("std::string_view s = \"123456789\"; std::from_chars(s.data(), s.data() + s.size(), res, 10);"); BENCHMARK_CAPTURE(ToIntFromChars10, , std::string_view{"123456789"}, 123456789) ->Name("std::string_view s = \"123456789\"; std::from_chars(s.data(), s.data() + s.size(), res, 10);");
@ -608,11 +972,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) { void ToDoubleFromChars(benchmark::State& state, const std::string_view& s, double c) {
for (auto _: state) { for (auto _: state) {
double res = 0; double res = 0;
if (std::from_chars(s.data(), s.data() + s.size(), res).ec != std::errc{}) { if constexpr (requires { std::from_chars(std::declval<K*>(), std::declval<K*>(), std::declval<double&>()); }) {
state.SkipWithError("not equal"); 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 #ifdef CHECK_RESULT
if (res != c) { if (res != c) {
@ -1607,7 +1976,7 @@ void ReplaceAllLongerSimStringExpr(benchmark::State& state) {
lstringa<2048> big_source{Count, source}, big_sample{Count, sample}; lstringa<2048> big_source{Count, source}, big_sample{Count, sample};
for (auto _: state) { for (auto _: state) {
stringa result = e_repl(big_source.to_str(), "bb", "----"); stringa result = e_repl(big_source, "bb", "----");
#ifdef CHECK_RESULT #ifdef CHECK_RESULT
if (result.to_str() != big_sample) { if (result.to_str() != big_sample) {
@ -2258,8 +2627,65 @@ BENCHMARK(BuildFuncNameStream) ->Name("Build func full name std::stream;
BENCHMARK(BuildFuncNameSimStr) ->Name("Build func full name stringa;"); BENCHMARK(BuildFuncNameSimStr) ->Name("Build func full name stringa;");
BENCHMARK(BuildFuncNameSimStr1) ->Name("Build func full name stringa 1;"); BENCHMARK(BuildFuncNameSimStr1) ->Name("Build func full name stringa 1;");
void UpperCaseStd(benchmark::State& state) {
static const auto& loc = std::locale("en_US.utf8");
for (auto _: state) {
std::wstring test = L"TestПриветTest";
benchmark::DoNotOptimize(test);
std::transform(test.begin(), test.end(), test.begin(), [](wchar_t s) {
return std::toupper(s, loc);
});
benchmark::DoNotOptimize(test);
#ifdef CHECK_RESULT
if (test != L"TESTПРИВЕТTEST") {
state.SkipWithError("Bad upper case");
}
#endif
}
}
void UpperCaseSim(benchmark::State& state) {
for (auto _: state) {
lstringw<15> test = L"TestПриветTest";
benchmark::DoNotOptimize(test);
test.upper();
benchmark::DoNotOptimize(test);
#ifdef CHECK_RESULT
if (test != L"TESTПРИВЕТTEST") {
state.SkipWithError("Bad upper case");
}
#endif
}
}
BENCHMARK(__)->Name("----- Make Upper ---------")->Repetitions(1);
BENCHMARK(UpperCaseStd)->Name("To upper case std::wstring");
BENCHMARK(UpperCaseSim)->Name("To upper case lstringw<15>");
int main(int argc, char** argv) { int main(int argc, char** argv) {
char arg1[] = "--benchmark_repetitions=10", arg2[] = "--benchmark_report_aggregates_only=true"; std::cout << "Benchmarks of simstr, version " SIMSTR_VERSION << "\n"
<< "Sources: https://github.com/orefkov/simstr\n"
<< "Results: https://orefkov.github.io/simstr/results.html\n"
<< "Compiler " << CXX_COMPILER_ID << " " << CXX_COMPILER_VERSION
#ifdef _LIBCPP_VERSION
<< ", use libc++"
#endif
<< std::endl;
#ifdef EMSCRIPTEN
EM_ASM({ console.log(navigator.userAgent); });
if (argc == 2 && stra{argv[1]} == "-sync") {
do_sync = true;
argc = 1;
}
#endif
char arg1[] = "--benchmark_repetitions=4", arg2[] = "--benchmark_report_aggregates_only=true";
char* my_params[] = {argv[0], arg1, arg2}; char* my_params[] = {argv[0], arg1, arg2};
if (argc < 2) { if (argc < 2) {
argc = 3; argc = 3;
@ -2270,5 +2696,10 @@ int main(int argc, char** argv) {
return 1; return 1;
::benchmark::RunSpecifiedBenchmarks(); ::benchmark::RunSpecifiedBenchmarks();
::benchmark::Shutdown(); ::benchmark::Shutdown();
#ifdef EMSCRIPTEN
std::cout << "Done!\n";
EM_ASM({ on_done(); });
#endif
return 0; return 0;
} }

View File

@ -8,12 +8,22 @@ holds 23 characters in SSO instead of 15, so
at the end of the std::string test, memory has to be allocated, at the end of the std::string test, memory has to be allocated,
while in stringa , the entire test is included in SSO. while in stringa , the entire test is included in SSO.
- Concat email stringzilla concat
В stringzilla тоже есть конкатенация строковыми выражениями, но не
так удобна и развита, как в simstr.
Stringzilla also has concatenation by expression templates,
but it's not as convenient or advanced as simstr.
- Find concat three simstr - Find concat three simstr
Если результат конкатенации меньше 207 символов, Если результат конкатенации меньше 207 символов,
он собирается в буфере на стеке, без аллокации и деалокации. он собирается в буфере на стеке, без аллокации и деалокации.
If the concatenation result is less than 207 characters, If the concatenation result is less than 207 characters,
it is collected in a stack-based buffer, without allocation or deallocation. it is collected in a stack-based buffer, without allocation or deallocation.
- sz::string::find;
stringzilla более заточена на поиск больших строк в больших строках.
stringzilla is more focused on searching large strings within large strings.
- Concat with replace exp - Concat with replace exp
В simstr строковое выражение для замены подстрок В simstr строковое выражение для замены подстрок
есть "из коробки". есть "из коробки".
@ -147,7 +157,7 @@ However, Windows and Linux are clearly in different weight classes.
- std::string copy{str_with_len_N};/16 - std::string copy{str_with_len_N};/16
Явно виден скачок, где заканчивается SSO и начинается аллокация. Явно виден скачок, где заканчивается SSO и начинается аллокация.
Обратите внимание, что WASM - 32-битный, и там размер Обратите внимание, что WASM - 32-битный, и там размер
SSO у std::string меньше, насколько я помню, 11 символов + 0. SSO у std::string меньше, 10 символов + 0.
The jump where SSO ends and allocation begins is clearly visible. The jump where SSO ends and allocation begins is clearly visible.
Note that WASM is 32-bit, and the size of the SSO for std::string is Note that WASM is 32-bit, and the size of the SSO for std::string is
smaller, as far as I remember: 11 characters + 0. smaller, as far as I remember: 11 characters + 0.

View File

@ -0,0 +1,247 @@
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SimStr Benchmarks</title>
<style>
body {
margin: auto;
font-size: 12pt;
}
h2 {
text-align: center;
}
table {
border: 1px black;
text-align: right;
margin: auto;
}
table tr:nth-child(odd) {
background: #fff;
}
table tr:nth-child(even) {
background: #f2f2f2;
}
table th {
text-align: center;
}
.tooltip a:any-link {
text-decoration: none;
}
.tooltip a:link {
color: black;
}
.tooltip a:visited {
color: black;
}
.tooltip a:hover {
text-decoration: underline;
}
table tr:hover td {
background-color: lightcyan;
}
div.header {
max-width: 960px;
margin: 0 auto;
}
canvas {
max-width: 2000px;
margin: 0 auto;
}
.benchset {
max-width: 960px;
padding: 1px;
margin: 5px auto;
border-radius: 3px;
background-color: gainsboro;
}
.benchset h4 {
text-align: left;
padding-left: 20px;
}
.test_platforms {
margin: auto;
}
.test_platforms ul {
display: table;
}
.test_platforms li {
display: table-row;
}
.test_platforms li:before {
content: "\2022";
padding-right: 0.5em;
}
.test_platforms span.tooltip {
padding-left: 20px;
display: table-cell;
}
span.platform {
display: table-cell;
}
.info {
border-radius: 3px;
border: solid 1px lightgrey;
background-color: beige;
color: brown;
}
.code {
font-family: 'Cascadia Code', Consolas, 'Courier New', Courier, monospace;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
background-color: beige;
color: black;
text-align: left;
border-radius: 6px;
padding: 15px;
position: absolute;
z-index: 1;
top: 35px;
right: 0;
white-space: pre;
border: 1px solid darkgray;
box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
transform: translate(50%);
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
h4 {
text-align: center;
}
#output {
position: absolute;
left: 10px;
top: 50px;
right: 10px;
bottom: 60%;
margin: 0 auto;
border: 0;
display: block;
background-color: black;
color: white;
font-family: 'Cascadia Code', 'Consolas', 'Lucida Console', Monaco, monospace;
outline: none;
}
#results {
position: absolute;
left: 10px;
top: 42%;
right: 10px;
bottom: 10px;
margin: 0 auto;
border: 0;
overflow: auto;
}
div.head {
text-align: center;
}
div.head h3 {
margin: 0;
}
div.head span {
margin: 0;
}
</style>
</head>
<body>
<div class="head">
<h3>SimStr 1.8.1 Benchmark</h3>
<span><a href="https://orefkov.github.io/simstr/results.html" target="blank">All results</a></span>
<span><a href="https://github.com/orefkov/simstr/blob/main/bench/bench_str.cpp" target="blank">Sources for
benchmarks</a></span>
<textarea id="output"></textarea>
</div>
<div id="results"></div>
<script type='text/javascript'>
var outputElement = document.getElementById('output');
var resultEl = document.getElementById('results');
if (outputElement) outputElement.value = ''; // clear browser cache
var Module = {
print(...args) {
console.log(...args);
try {
var text = args.join(' ')
var m = text.match(/^--+ +(.+?) +-+\/repeats/);
if (m) {
add_benchset(m[1]);
} else {
var im = text.indexOf("_mean ");
if (im != -1) {
add_benchmark(text.substr(0, im), text.match(/ ([^ ]+?) ns/)[1]);
}
}
outputElement.value += text + "\n";
outputElement.scrollTop = outputElement.scrollHeight;
} catch (e) {
console.error(e);
}
}
};
var sync = new URLSearchParams(window.location.search).get('sync');
if (sync)
Module.arguments = ["-sync"];
function on_done() {
resultEl.scrollTop = 0;
}
function escapeHtml(unsafe) {
return unsafe
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
function add_benchset(bs_name) {
resultEl.insertAdjacentHTML("beforeend", `<div class="benchset"><h4>${escapeHtml(bs_name)}</h4><table width="100%"><thead><tr><th>Benchmark name</th><th width="8%">Time(ns)</th></tr></thead><tbody></tbody></table></div>`);
resultEl.scrollTop = resultEl.scrollHeight;
}
function add_benchmark(name, result) {
resultEl.querySelector("div:last-child table tbody").insertAdjacentHTML("beforeend", `<tr><td>${escapeHtml(name)}</td><td>${result}</td></tr>`);
resultEl.scrollTop = resultEl.scrollHeight;
}
</script>
{{{ SCRIPT }}}
</body>
</html>

View File

@ -265,6 +265,7 @@
} }
}); });
</script> </script>
</head><body><div class="header"><h2>SimStr benchmarks results</h2> </head><body><div class="header"><h2>simstr benchmarks results</h2>
<div style="font-size:16pt;margin:20px;text-align:center"><a href="https://github.com/orefkov/simstr">simstr</a> is a powerful and convenient library for productive work with strings in C++.</div>
<span>All times in ns.</span> <span>All times in ns.</span>
<span><a href="https://github.com/orefkov/simstr/blob/main/bench/bench_str.cpp">Source for benchmarks</a></span> <span><a href="https://github.com/orefkov/simstr/blob/main/bench/bench_str.cpp">Source for benchmarks</a></span>

View File

@ -3,6 +3,7 @@
#include <fstream> #include <fstream>
#include <array> #include <array>
#include <algorithm> #include <algorithm>
#include <map>
using namespace simstr; using namespace simstr;
@ -37,7 +38,7 @@ struct result_info {
} }
// Текущее положение поставим сразу за cpuinfo и откинем завершающие переводы строк // Текущее положение поставим сразу за cpuinfo и откинем завершающие переводы строк
// We will put the current position immediately after cpuinfo and discard the final line feeds // We will put the current position immediately after cpuinfo and discard the final line feeds
current_text_ = current_text_(cpu_info_.end() - current_text_.begin() + 1).trimmed_right("\n"); current_text_ = current_text_.get(cpu_info_.end() - current_text_.begin() + 1, to_end).trimmed_right("\n");
} }
}; };
@ -95,11 +96,11 @@ results_vector get_results_infos() {
// В начале имени файла может идти число и дефис, для сортировки, уберём их // В начале имени файла может идти число и дефис, для сортировки, уберём их
// At the beginning of the file name there can be a number and a hyphen, for sorting, remove them // At the beginning of the file name there can be a number and a hyphen, for sorting, remove them
if (auto delimiter = fileName.find('-'); delimiter + 1 > 1) { if (auto delimiter = fileName.find('-'); delimiter + 1 > 1) {
if (fileName(0, delimiter).to_int<unsigned, false, 10, false, false>().ec == IntConvertResult::Success) { if (fileName.prefix(delimiter).to_int<unsigned, false, 10, false, false>().ec == IntConvertResult::Success) {
fileName.remove_prefix(delimiter + 1); fileName.remove_prefix(delimiter + 1);
} }
} }
results.emplace_back(get_file_content(lstringa<128>{dirForResults + f}), fileName(0, -suffix.length())); results.emplace_back(get_file_content(lstringa<128>{dirForResults + f}), fileName.get(0, from_end(suffix.length())));
} }
} }
return results; return results;
@ -116,8 +117,8 @@ void write_platforms_cpu(out_t& out, const results_vector& results) {
for (const auto& r : results) { for (const auto& r : results) {
size_t rp = r.cpu_info_.find('(') + 1, lp = r.cpu_info_.find(')', rp); size_t rp = r.cpu_info_.find('(') + 1, lp = r.cpu_info_.find(')', rp);
ssa shortCpuInfo = r.cpu_info_.from_to(rp, lp); ssa shortCpuInfo = r.cpu_info_.from_to(rp, lp);
ssa cpuInfo = r.cpu_info_(lp + 2); ssa cpuInfo = r.cpu_info_.get(lp + 2, to_end);
out.append_formatted(R"--( out += e_subst(R"--(
<li><span class="platform">{}</span><span class="tooltip">{}<span class="tooltiptext">{}</span></span>&nbsp;Include in charts: <input type="checkbox" id="pl{}" checked onchange="buildCharts()"/></li>)--", <li><span class="platform">{}</span><span class="tooltip">{}<span class="tooltiptext">{}</span></span>&nbsp;Include in charts: <input type="checkbox" id="pl{}" checked onchange="buildCharts()"/></li>)--",
r.platform_, shortCpuInfo, cpuInfo, counter++); r.platform_, shortCpuInfo, cpuInfo, counter++);
script += "'" + e_repl(r.platform_.to_str(), "'", "\\'") + "'" + e_choice(&r == &results.back(), "]", ","); script += "'" + e_repl(r.platform_.to_str(), "'", "\\'") + "'" + e_choice(&r == &results.back(), "]", ",");
@ -166,7 +167,7 @@ ssa extract_name_result(ssa line, ssa& result) {
line.len = ns; line.len = ns;
if (inNs) { if (inNs) {
size_t end = line.find_last(' '); size_t end = line.find_last(' ');
result = line(end + 1); result = line.get(end + 1, to_end);
if (auto rp = line.find("/repeats"); rp != str::npos) { if (auto rp = line.find("/repeats"); rp != str::npos) {
line.len = rp; line.len = rp;
} else { } else {
@ -181,57 +182,62 @@ ssa extract_name_result(ssa line, ssa& result) {
ssa extract_comment(ssa commentsText, ssa benchmarkName) { ssa extract_comment(ssa commentsText, ssa benchmarkName) {
size_t idx = commentsText.find_end(lstringa<120>{"- " + benchmarkName + "\n"}); size_t idx = commentsText.find_end(lstringa<120>{"- " + benchmarkName + "\n"});
if (idx != str::npos) { if (idx != str::npos) {
if (commentsText[idx] != '\n' && commentsText(idx, 2) != "- ") { if (commentsText[idx] != '\n' && commentsText.get(idx, 2) != "- ") {
return commentsText.from_to(idx, commentsText.find("\n\n", idx)); return commentsText.from_to(idx, commentsText.find("\n\n", idx));
} }
} }
return stra::empty_str; return stra::empty_str;
} }
void write_one_result(out_t& out, ssa result, ssa line, auto& script_text, bool last) { void write_one_result(out_t& out, ssa result, ssa line, auto& script_text, char delim) {
out += "<td class=\"benchmarkresult\">" + result + "</td>"; out += "<td class=\"benchmarkresult\">" + result + "</td>";
script_text += e_choice(result[0] == 'N', "NaN", result) + e_choice(last, "]", ","); script_text += e_choice(result[0] == 'N', "NaN", result) + delim;
} }
ssa extract_source_for_benchmark(ssa benchName, ssa sourceText) { std::pair<ssa, size_t> extract_source_for_benchmark(ssa benchName, ssa sourceText) {
if (benchName == "ReplaceStr") { static hashStrMapA<std::pair<stringa, size_t>> textes;
int t = 0; static auto lines_pos = [&]() {
} std::map<size_t, size_t> l = {{0, 0}};
static hashStrMapA<stringa> textes; size_t line = 0;
sourceText.for_all_finded([&](size_t pos){
l.emplace(pos, ++line);
}, "\n");
return l;
}();
size_t delim = benchName.find_last('/'); size_t delim = benchName.find_last('/');
if (delim != str::npos && benchName(delim + 1).to_int<unsigned, false, 10, false, false>().ec == IntConvertResult::Success) { if (delim != str::npos && benchName.get(delim + 1, to_end).to_int<unsigned, false, 10, false, false>().ec == IntConvertResult::Success) {
benchName.len = delim; benchName.len = delim;
} }
auto [it, not_exist] = textes.try_emplace(benchName); auto [it, not_exist] = textes.try_emplace(benchName, stringa{}, 0);
if (not_exist) { if (not_exist) {
// Ищем имя функции для этого бенчмарка // Ищем имя функции для этого бенчмарка
// Looking for the name of the function for this benchmark // Looking for the name of the function for this benchmark
size_t start = sourceText.find(lstringa<128>{"->Name(\"" + e_repl(benchName, "\"", "\\\"") + "\")"}); size_t start = sourceText.find(lstringa<128>{"->Name(\"" + e_repl(benchName, "\"", "\\\"") + "\")"});
if (start == str::npos) { if (start == str::npos) {
std::cerr << "Can not found benchmark function name for " << benchName << std::endl; std::cerr << "Can not found benchmark function name for " << benchName << std::endl;
return stra::empty_str; return {stra::empty_str, 0};
} }
start = sourceText(0, start).find('(', sourceText.find_last('\n', start - 1)); start = sourceText.prefix(start).find('(', sourceText.find_last('\n', start - 1));
if (start == str::npos) { if (start == str::npos) {
std::cerr << "Can not found benchmark function name for " << benchName << std::endl; std::cerr << "Can not found benchmark function name for " << benchName << std::endl;
return stra::empty_str; return {stra::empty_str, 0};
} }
start++; start++;
size_t end = sourceText.find_first_of(")<,", start); size_t end = sourceText.find_first_of(")<,", start);
ssa funcName = sourceText.from_to(start, end); ssa funcName = sourceText.from_to(start, end);
auto [func_it, not_exist] = textes.try_emplace(funcName); auto [func_it, not_exist] = textes.try_emplace(funcName, stringa{}, 0);
if (not_exist) { if (not_exist) {
// Теперь ищем саму эту функцию // Теперь ищем саму эту функцию
// Now we look for this function itself // Now we look for this function itself
start = sourceText.find(lstringa<128>{funcName + "(benchmark::State"}); start = sourceText.find(lstringa<128>{funcName + "(benchmark::State"});
if (start == str::npos) { if (start == str::npos) {
std::cerr << "Can not found source function " << funcName << " for benchmark " << benchName << std::endl; std::cerr << "Can not found source function " << funcName << " for benchmark " << benchName << std::endl;
return stra::empty_str; return {stra::empty_str, 0};
} }
start = sourceText.find_last('\n', start); start = sourceText.find_last('\n', start);
size_t templ_start = sourceText.find_last('\n', start) + 1; size_t templ_start = sourceText.find_last('\n', start) + 1;
if (sourceText(templ_start).starts_with("template")) { if (sourceText.get(templ_start, to_end).starts_with("template")) {
start = templ_start; start = templ_start;
} else { } else {
start++; start++;
@ -255,18 +261,25 @@ ssa extract_source_for_benchmark(ssa benchName, ssa sourceText) {
throw std::runtime_error{"Not found end of func"}; throw std::runtime_error{"Not found end of func"};
} }
lstringa<2048> text{sourceText.from_to(beginLine, end + indent.length() + 1), indent, "\n"}; lstringa<2048> text{sourceText.from_to(beginLine, end + indent.length() + 1), indent, "\n"};
func_it->second = repl_html_symbols(text(1)); func_it->second.first = repl_html_symbols(text.get(1, to_end));
} else { } else {
end = sourceText.find("\n}\n", start); end = sourceText.find("\n}\n", start);
func_it->second = repl_html_symbols(sourceText.from_to(start, end + 2)); func_it->second.first = repl_html_symbols(sourceText.from_to(start, end + 2));
} }
func_it->second.second = lines_pos.lower_bound(start)->second;
} }
it->second = func_it->second; it->second = func_it->second;
} }
return it->second; return {it->second.first, it->second.second};
} }
void write_benchmarks(out_t& out, const results_vector& results, ssa sourceText, ssa commentsText) { void write_benchmarks(out_t& out, const results_vector& results, ssa sourceText, ssa commentsText) {
ssa releaseVersion = sourceText.get(sourceText.find_end("\n * ver. "), to_end).until("\n").trimmed();
if (!releaseVersion) {
std::cerr << "Not found release version in sources" << std::endl;
throw std::runtime_error{"Not found release version in sources"};
}
std::vector<Splitter<u8s>> splitters; std::vector<Splitter<u8s>> splitters;
splitters.reserve(results.size()); splitters.reserve(results.size());
@ -279,19 +292,19 @@ void write_benchmarks(out_t& out, const results_vector& results, ssa sourceText,
while(!splitters[0].is_done()) { while(!splitters[0].is_done()) {
ssa line = splitters[0].next(), benchName, result; ssa line = splitters[0].next(), benchName, result;
if (auto rm = line.find("_mean"); rm != str::npos) { if (auto rm = line.find("_mean"); rm != str::npos) {
benchName = extract_name_result(line, result)(0, rm); benchName = extract_name_result(line, result).prefix(rm);
auto source = extract_source_for_benchmark(benchName, sourceText); auto [source, line_num] = extract_source_for_benchmark(benchName, sourceText);
auto comment = extract_comment(commentsText, benchName); auto comment = extract_comment(commentsText, benchName);
// Нужно вывести название бенча и коммент // Нужно вывести название бенча и коммент
// Need to display title and comment // Need to display title and comment
out += "\n<tr><td class=\"benchmarkname\"><span class=\"tooltip\">" + out += "\n<tr><td class=\"benchmarkname\"><span class=\"tooltip\"><a target=\"blank\" href=\"https://github.com/orefkov/simstr/blob/rel"
repl_html_symbols(benchName) + + releaseVersion + "/bench/bench_str.cpp#L" + line_num + "\">" + repl_html_symbols(benchName) +
"<span class=\"tooltiptext code\">" + "</a><span class=\"tooltiptext code\">" +
source + "</span></span></td><td>" + source + "</span></span></td><td>" +
e_if(!comment.is_empty(), "<span class=\"tooltip info\">&nbsp;>>&nbsp;<span class=\"tooltiptext\">" + comment + "</span></span>") + e_if(!comment.is_empty(), "<span class=\"tooltip info\">&nbsp;>>&nbsp;<span class=\"tooltiptext\">" + comment + "</span></span>") +
"</td>"; "</td>";
script_text += e_if(needCommaForTests, "},") + "\n{name:'" + e_repl(benchName.to_str(), "'", "\\'") + "',data:["; script_text += e_if(needCommaForTests, "},") + "\n{name:'" + e_repl(benchName, "'", "\\'") + "',data:[";
write_one_result(out, result, line, script_text, result.size() == 1); write_one_result(out, result, line, script_text, result.size() == 1 ? ']' : ',');
for (unsigned idx = 1; idx < results.size(); idx++) { for (unsigned idx = 1; idx < results.size(); idx++) {
if (splitters[idx].is_done()) { if (splitters[idx].is_done()) {
@ -299,19 +312,19 @@ void write_benchmarks(out_t& out, const results_vector& results, ssa sourceText,
throw std::runtime_error{"Not expected end of file"}; throw std::runtime_error{"Not expected end of file"};
} }
line = splitters[idx].next(); line = splitters[idx].next();
ssa rbench_name = extract_name_result(line, result)(0, rm); ssa rbench_name = extract_name_result(line, result).prefix(rm);
if (rbench_name != benchName) { if (rbench_name != benchName) {
while (line.find("_mean") == str::npos && !splitters[idx].is_done()) { while (line.find("_mean") == str::npos && !splitters[idx].is_done()) {
line = splitters[idx].next(); line = splitters[idx].next();
} }
rbench_name = extract_name_result(line, result)(0, rm); rbench_name = extract_name_result(line, result).prefix(rm);
if (rbench_name != benchName) { if (rbench_name != benchName) {
std::cerr << "In results for " << results[idx].platform_ << " benchmark '" << rbench_name std::cerr << "In results for " << results[idx].platform_ << " benchmark '" << rbench_name
<< "' does not match with other results" << std::endl; << "' does not match with other results" << std::endl;
result = stra::empty_str; result = stra::empty_str;
} }
} }
write_one_result(out, result, line, script_text, idx == results.size() - 1); write_one_result(out, result, line, script_text, idx == results.size() - 1 ? ']' : ',');
} }
out += "</tr>"; out += "</tr>";
needCommaForTests = true; needCommaForTests = true;
@ -329,7 +342,7 @@ void write_benchmarks(out_t& out, const results_vector& results, ssa sourceText,
write_benchset_header(out, results, benchName, ++benchSetId); write_benchset_header(out, results, benchName, ++benchSetId);
needFooter = true; needFooter = true;
needCommaForTests = false; needCommaForTests = false;
script_text = "bench_sets['" + e_repl(benchName.to_str(), "'", "\\'") + "'] = {id:'bs" + benchSetId +"', tests:["; script_text = "bench_sets['" + e_repl(benchName, "'", "\\'") + "'] = {id:'bs" + benchSetId +"', tests:[";
} }
// Эти строки надо пропустить во всех файлах // Эти строки надо пропустить во всех файлах
// These lines must be skipped in all files // These lines must be skipped in all files
@ -339,9 +352,6 @@ void write_benchmarks(out_t& out, const results_vector& results, ssa sourceText,
throw std::runtime_error{"Not expected end of file"}; throw std::runtime_error{"Not expected end of file"};
} }
line = splitters[idx].next(); line = splitters[idx].next();
if (line.starts_with("std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv")) {
int t = 1;
}
} }
} }
if (needFooter) { if (needFooter) {

View File

@ -19,6 +19,19 @@ table th {
text-align: center; text-align: center;
} }
.tooltip a:any-link {
text-decoration: none;
}
.tooltip a:link {
color: black;
}
.tooltip a:visited {
color: black;
}
.tooltip a:hover {
text-decoration: underline;
}
table tr:hover td { table tr:hover td {
background-color: lightcyan; background-color: lightcyan;
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,878 +0,0 @@
2026-01-21T07:43:36+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.23, 0.51
***WARNING*** ASLR is enabled, the results may have unreproducible noise in them.
--------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------
----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and number by std to std::string_mean 226 ns 226 ns 10
Concat std::string and number by std to std::string_median 222 ns 222 ns 10
Concat std::string and number by std to std::string_stddev 15.0 ns 15.0 ns 10
Concat std::string and number by std to std::string_cv 6.64 % 6.64 % 10
Concat std::string and number by StrExpr to std::string_mean 104 ns 104 ns 10
Concat std::string and number by StrExpr to std::string_median 103 ns 103 ns 10
Concat std::string and number by StrExpr to std::string_stddev 4.29 ns 4.29 ns 10
Concat std::string and number by StrExpr to std::string_cv 4.10 % 4.10 % 10
Concat stringa and number by StrExpr to simstr::stringa_mean 63.7 ns 63.7 ns 10
Concat stringa and number by StrExpr to simstr::stringa_median 62.8 ns 62.8 ns 10
Concat stringa and number by StrExpr to simstr::stringa_stddev 2.92 ns 2.92 ns 10
Concat stringa and number by StrExpr to simstr::stringa_cv 4.59 % 4.59 % 10
----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and hex number by std to std::string_mean 681 ns 681 ns 10
Concat std::string and hex number by std to std::string_median 673 ns 673 ns 10
Concat std::string and hex number by std to std::string_stddev 19.0 ns 19.0 ns 10
Concat std::string and hex number by std to std::string_cv 2.80 % 2.80 % 10
Concat std::string and hex number by StrExpr to std::string_mean 71.7 ns 71.7 ns 10
Concat std::string and hex number by StrExpr to std::string_median 71.6 ns 71.6 ns 10
Concat std::string and hex number by StrExpr to std::string_stddev 1.90 ns 1.90 ns 10
Concat std::string and hex number by StrExpr to std::string_cv 2.65 % 2.65 % 10
Concat stringa and hex number by StrExpr to simstr::stringa_mean 67.9 ns 67.9 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_median 67.5 ns 67.5 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_stddev 1.41 ns 1.41 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_cv 2.08 % 2.08 % 10
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 49.7 ns 49.7 ns 10
Concat std::string by std to std::string_median 49.9 ns 49.9 ns 10
Concat std::string by std to std::string_stddev 0.890 ns 0.890 ns 10
Concat std::string by std to std::string_cv 1.79 % 1.79 % 10
Concat std::string by StrExpr to std::string_mean 40.5 ns 40.5 ns 10
Concat std::string by StrExpr to std::string_median 40.5 ns 40.5 ns 10
Concat std::string by StrExpr to std::string_stddev 0.767 ns 0.767 ns 10
Concat std::string by StrExpr to std::string_cv 1.89 % 1.89 % 10
Concat stringa by StrExpr to stringa_mean 27.0 ns 27.0 ns 10
Concat stringa by StrExpr to stringa_median 26.6 ns 26.6 ns 10
Concat stringa by StrExpr to stringa_stddev 1.50 ns 1.50 ns 10
Concat stringa by StrExpr to stringa_cv 5.54 % 5.54 % 10
----- 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 10
Find concat three std::string_median 116 ns 116 ns 10
Find concat three std::string_stddev 4.32 ns 4.32 ns 10
Find concat three std::string_cv 3.72 % 3.72 % 10
Find concat three strexpr_mean 51.1 ns 51.1 ns 10
Find concat three strexpr_median 51.0 ns 51.0 ns 10
Find concat three strexpr_stddev 2.58 ns 2.58 ns 10
Find concat three strexpr_cv 5.05 % 5.05 % 10
Find concat three simstr_mean 19.6 ns 19.6 ns 10
Find concat three simstr_median 19.7 ns 19.7 ns 10
Find concat three simstr_stddev 0.770 ns 0.770 ns 10
Find concat three simstr_cv 3.93 % 3.93 % 10
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 7.64 ns 7.64 ns 10
BuildTypeNameStr 0/0_median 7.63 ns 7.63 ns 10
BuildTypeNameStr 0/0_stddev 0.241 ns 0.241 ns 10
BuildTypeNameStr 0/0_cv 3.16 % 3.16 % 10
BuildTypeNameExp 0/0_mean 6.52 ns 6.52 ns 10
BuildTypeNameExp 0/0_median 6.54 ns 6.54 ns 10
BuildTypeNameExp 0/0_stddev 0.149 ns 0.149 ns 10
BuildTypeNameExp 0/0_cv 2.29 % 2.29 % 10
BuildTypeNameSim 0/0_mean 4.99 ns 4.99 ns 10
BuildTypeNameSim 0/0_median 4.92 ns 4.92 ns 10
BuildTypeNameSim 0/0_stddev 0.280 ns 0.280 ns 10
BuildTypeNameSim 0/0_cv 5.62 % 5.62 % 10
BuildTypeNameStr 10/10_mean 56.8 ns 56.8 ns 10
BuildTypeNameStr 10/10_median 57.0 ns 57.0 ns 10
BuildTypeNameStr 10/10_stddev 1.62 ns 1.62 ns 10
BuildTypeNameStr 10/10_cv 2.86 % 2.86 % 10
BuildTypeNameExp 10/10_mean 30.5 ns 30.5 ns 10
BuildTypeNameExp 10/10_median 30.3 ns 30.3 ns 10
BuildTypeNameExp 10/10_stddev 0.808 ns 0.808 ns 10
BuildTypeNameExp 10/10_cv 2.65 % 2.65 % 10
BuildTypeNameSim 10/10_mean 22.7 ns 22.7 ns 10
BuildTypeNameSim 10/10_median 22.6 ns 22.6 ns 10
BuildTypeNameSim 10/10_stddev 0.330 ns 0.330 ns 10
BuildTypeNameSim 10/10_cv 1.45 % 1.45 % 10
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 207 ns 207 ns 10
Concat with replace str_median 203 ns 203 ns 10
Concat with replace str_stddev 11.4 ns 11.4 ns 10
Concat with replace str_cv 5.52 % 5.52 % 10
Concat with replace exp_mean 149 ns 149 ns 10
Concat with replace exp_median 148 ns 148 ns 10
Concat with replace exp_stddev 4.78 ns 4.78 ns 10
Concat with replace exp_cv 3.20 % 3.20 % 10
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 1.12 ns 1.12 ns 10
std::string e;_median 1.12 ns 1.12 ns 10
std::string e;_stddev 0.022 ns 0.022 ns 10
std::string e;_cv 1.96 % 1.96 % 10
std::string_view e;_mean 0.373 ns 0.373 ns 10
std::string_view e;_median 0.369 ns 0.369 ns 10
std::string_view e;_stddev 0.012 ns 0.012 ns 10
std::string_view e;_cv 3.14 % 3.14 % 10
ssa e;_mean 0.367 ns 0.367 ns 10
ssa e;_median 0.367 ns 0.367 ns 10
ssa e;_stddev 0.006 ns 0.006 ns 10
ssa e;_cv 1.54 % 1.54 % 10
stringa e;_mean 0.753 ns 0.753 ns 10
stringa e;_median 0.748 ns 0.748 ns 10
stringa e;_stddev 0.024 ns 0.024 ns 10
stringa e;_cv 3.14 % 3.14 % 10
lstringa<20> e;_mean 1.13 ns 1.13 ns 10
lstringa<20> e;_median 1.12 ns 1.12 ns 10
lstringa<20> e;_stddev 0.027 ns 0.027 ns 10
lstringa<20> e;_cv 2.42 % 2.42 % 10
lstringa<40> e;_mean 1.13 ns 1.13 ns 10
lstringa<40> e;_median 1.12 ns 1.12 ns 10
lstringa<40> e;_stddev 0.029 ns 0.029 ns 10
lstringa<40> e;_cv 2.53 % 2.53 % 10
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 1.84 ns 1.84 ns 10
std::string e = "Test text";_median 1.84 ns 1.84 ns 10
std::string e = "Test text";_stddev 0.037 ns 0.037 ns 10
std::string e = "Test text";_cv 2.03 % 2.03 % 10
std::string_view e = "Test text";_mean 0.750 ns 0.750 ns 10
std::string_view e = "Test text";_median 0.734 ns 0.734 ns 10
std::string_view e = "Test text";_stddev 0.030 ns 0.030 ns 10
std::string_view e = "Test text";_cv 3.99 % 3.99 % 10
ssa e = "Test text";_mean 0.381 ns 0.381 ns 10
ssa e = "Test text";_median 0.380 ns 0.380 ns 10
ssa e = "Test text";_stddev 0.019 ns 0.019 ns 10
ssa e = "Test text";_cv 5.10 % 5.10 % 10
stringa e = "Test text";_mean 1.85 ns 1.85 ns 10
stringa e = "Test text";_median 1.83 ns 1.83 ns 10
stringa e = "Test text";_stddev 0.058 ns 0.058 ns 10
stringa e = "Test text";_cv 3.16 % 3.16 % 10
lstringa<20> e = "Test text";_mean 1.87 ns 1.87 ns 10
lstringa<20> e = "Test text";_median 1.84 ns 1.84 ns 10
lstringa<20> e = "Test text";_stddev 0.068 ns 0.068 ns 10
lstringa<20> e = "Test text";_cv 3.63 % 3.63 % 10
lstringa<40> e = "Test text";_mean 1.85 ns 1.85 ns 10
lstringa<40> e = "Test text";_median 1.83 ns 1.83 ns 10
lstringa<40> e = "Test text";_stddev 0.052 ns 0.052 ns 10
lstringa<40> e = "Test text";_cv 2.81 % 2.81 % 10
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 18.8 ns 18.8 ns 10
std::string e = "123456789012345678901234567890";_median 18.6 ns 18.6 ns 10
std::string e = "123456789012345678901234567890";_stddev 0.658 ns 0.658 ns 10
std::string e = "123456789012345678901234567890";_cv 3.50 % 3.50 % 10
std::string_view e = "123456789012345678901234567890";_mean 0.747 ns 0.747 ns 10
std::string_view e = "123456789012345678901234567890";_median 0.738 ns 0.738 ns 10
std::string_view e = "123456789012345678901234567890";_stddev 0.027 ns 0.027 ns 10
std::string_view e = "123456789012345678901234567890";_cv 3.58 % 3.58 % 10
ssa e = "123456789012345678901234567890";_mean 0.370 ns 0.370 ns 10
ssa e = "123456789012345678901234567890";_median 0.366 ns 0.366 ns 10
ssa e = "123456789012345678901234567890";_stddev 0.010 ns 0.010 ns 10
ssa e = "123456789012345678901234567890";_cv 2.71 % 2.71 % 10
stringa e = "123456789012345678901234567890";_mean 1.88 ns 1.88 ns 10
stringa e = "123456789012345678901234567890";_median 1.87 ns 1.87 ns 10
stringa e = "123456789012345678901234567890";_stddev 0.057 ns 0.057 ns 10
stringa e = "123456789012345678901234567890";_cv 3.02 % 3.02 % 10
lstringa<20> e = "123456789012345678901234567890";_mean 21.0 ns 21.0 ns 10
lstringa<20> e = "123456789012345678901234567890";_median 21.0 ns 21.0 ns 10
lstringa<20> e = "123456789012345678901234567890";_stddev 0.876 ns 0.876 ns 10
lstringa<20> e = "123456789012345678901234567890";_cv 4.17 % 4.17 % 10
lstringa<40> e = "123456789012345678901234567890";_mean 2.55 ns 2.55 ns 10
lstringa<40> e = "123456789012345678901234567890";_median 2.54 ns 2.54 ns 10
lstringa<40> e = "123456789012345678901234567890";_stddev 0.042 ns 0.042 ns 10
lstringa<40> e = "123456789012345678901234567890";_cv 1.63 % 1.63 % 10
----- 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.83 ns 4.83 ns 10
std::string e = "Test text"; auto c{e};_median 4.80 ns 4.80 ns 10
std::string e = "Test text"; auto c{e};_stddev 0.091 ns 0.091 ns 10
std::string e = "Test text"; auto c{e};_cv 1.89 % 1.89 % 10
std::string_view e = "Test text"; auto c{e};_mean 0.377 ns 0.377 ns 10
std::string_view e = "Test text"; auto c{e};_median 0.376 ns 0.376 ns 10
std::string_view e = "Test text"; auto c{e};_stddev 0.010 ns 0.010 ns 10
std::string_view e = "Test text"; auto c{e};_cv 2.62 % 2.62 % 10
ssa e = "Test text"; auto c{e};_mean 0.368 ns 0.368 ns 10
ssa e = "Test text"; auto c{e};_median 0.367 ns 0.367 ns 10
ssa e = "Test text"; auto c{e};_stddev 0.007 ns 0.007 ns 10
ssa e = "Test text"; auto c{e};_cv 1.99 % 1.99 % 10
stringa e = "Test text"; auto c{e};_mean 1.11 ns 1.11 ns 10
stringa e = "Test text"; auto c{e};_median 1.11 ns 1.11 ns 10
stringa e = "Test text"; auto c{e};_stddev 0.025 ns 0.025 ns 10
stringa e = "Test text"; auto c{e};_cv 2.29 % 2.29 % 10
lstringa<20> e = "Test text"; auto c{e};_mean 4.18 ns 4.18 ns 10
lstringa<20> e = "Test text"; auto c{e};_median 4.15 ns 4.15 ns 10
lstringa<20> e = "Test text"; auto c{e};_stddev 0.134 ns 0.134 ns 10
lstringa<20> e = "Test text"; auto c{e};_cv 3.20 % 3.20 % 10
lstringa<40> e = "Test text"; auto c{e};_mean 4.47 ns 4.47 ns 10
lstringa<40> e = "Test text"; auto c{e};_median 4.39 ns 4.39 ns 10
lstringa<40> e = "Test text"; auto c{e};_stddev 0.381 ns 0.381 ns 10
lstringa<40> e = "Test text"; auto c{e};_cv 8.52 % 8.52 % 10
----- 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 10
std::string e = "123456789012345678901234567890"; auto c{e};_median 19.4 ns 19.4 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.903 ns 0.903 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_cv 4.56 % 4.56 % 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.752 ns 0.752 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.744 ns 0.744 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.024 ns 0.024 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 3.23 % 3.23 % 10
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.375 ns 0.375 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.371 ns 0.371 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.010 ns 0.010 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.67 % 2.67 % 10
stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.89 ns 1.89 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_median 1.89 ns 1.89 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.049 ns 0.049 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_cv 2.60 % 2.60 % 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 21.0 ns 21.0 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 21.2 ns 21.2 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.965 ns 0.965 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 4.60 % 4.60 % 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.53 ns 4.53 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.49 ns 4.49 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.118 ns 0.118 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 2.60 % 2.60 % 10
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find;_mean 7.86 ns 7.86 ns 10
std::string::find;_median 7.80 ns 7.80 ns 10
std::string::find;_stddev 0.292 ns 0.292 ns 10
std::string::find;_cv 3.72 % 3.72 % 10
std::string_view::find;_mean 7.36 ns 7.36 ns 10
std::string_view::find;_median 7.15 ns 7.15 ns 10
std::string_view::find;_stddev 0.780 ns 0.780 ns 10
std::string_view::find;_cv 10.60 % 10.60 % 10
ssa::find;_mean 7.03 ns 7.03 ns 10
ssa::find;_median 7.02 ns 7.02 ns 10
ssa::find;_stddev 0.355 ns 0.355 ns 10
ssa::find;_cv 5.06 % 5.06 % 10
stringa::find;_mean 7.17 ns 7.17 ns 10
stringa::find;_median 7.16 ns 7.16 ns 10
stringa::find;_stddev 0.148 ns 0.148 ns 10
stringa::find;_cv 2.06 % 2.06 % 10
lstringa<20>::find;_mean 6.43 ns 6.43 ns 10
lstringa<20>::find;_median 6.42 ns 6.42 ns 10
lstringa<20>::find;_stddev 0.163 ns 0.163 ns 10
lstringa<20>::find;_cv 2.53 % 2.53 % 10
lstringa<40>::find;_mean 6.56 ns 6.56 ns 10
lstringa<40>::find;_median 6.31 ns 6.31 ns 10
lstringa<40>::find;_stddev 0.479 ns 0.479 ns 10
lstringa<40>::find;_cv 7.30 % 7.30 % 10
------- 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.69 ns 5.69 ns 10
std::string copy{str_with_len_N};/15_median 5.60 ns 5.60 ns 10
std::string copy{str_with_len_N};/15_stddev 0.168 ns 0.168 ns 10
std::string copy{str_with_len_N};/15_cv 2.95 % 2.95 % 10
std::string copy{str_with_len_N};/16_mean 23.6 ns 23.6 ns 10
std::string copy{str_with_len_N};/16_median 23.2 ns 23.2 ns 10
std::string copy{str_with_len_N};/16_stddev 0.963 ns 0.963 ns 10
std::string copy{str_with_len_N};/16_cv 4.08 % 4.08 % 10
std::string copy{str_with_len_N};/23_mean 24.0 ns 24.0 ns 10
std::string copy{str_with_len_N};/23_median 23.9 ns 23.9 ns 10
std::string copy{str_with_len_N};/23_stddev 0.815 ns 0.815 ns 10
std::string copy{str_with_len_N};/23_cv 3.40 % 3.40 % 10
std::string copy{str_with_len_N};/24_mean 23.3 ns 23.3 ns 10
std::string copy{str_with_len_N};/24_median 23.1 ns 23.1 ns 10
std::string copy{str_with_len_N};/24_stddev 0.657 ns 0.657 ns 10
std::string copy{str_with_len_N};/24_cv 2.83 % 2.83 % 10
std::string copy{str_with_len_N};/32_mean 23.2 ns 23.2 ns 10
std::string copy{str_with_len_N};/32_median 23.0 ns 23.0 ns 10
std::string copy{str_with_len_N};/32_stddev 0.736 ns 0.736 ns 10
std::string copy{str_with_len_N};/32_cv 3.17 % 3.17 % 10
std::string copy{str_with_len_N};/64_mean 23.3 ns 23.3 ns 10
std::string copy{str_with_len_N};/64_median 23.1 ns 23.1 ns 10
std::string copy{str_with_len_N};/64_stddev 0.632 ns 0.632 ns 10
std::string copy{str_with_len_N};/64_cv 2.71 % 2.71 % 10
std::string copy{str_with_len_N};/128_mean 25.2 ns 25.2 ns 10
std::string copy{str_with_len_N};/128_median 25.3 ns 25.3 ns 10
std::string copy{str_with_len_N};/128_stddev 0.448 ns 0.448 ns 10
std::string copy{str_with_len_N};/128_cv 1.78 % 1.78 % 10
std::string copy{str_with_len_N};/256_mean 25.4 ns 25.4 ns 10
std::string copy{str_with_len_N};/256_median 25.1 ns 25.1 ns 10
std::string copy{str_with_len_N};/256_stddev 0.854 ns 0.854 ns 10
std::string copy{str_with_len_N};/256_cv 3.36 % 3.36 % 10
std::string copy{str_with_len_N};/512_mean 29.9 ns 29.9 ns 10
std::string copy{str_with_len_N};/512_median 29.5 ns 29.5 ns 10
std::string copy{str_with_len_N};/512_stddev 1.73 ns 1.73 ns 10
std::string copy{str_with_len_N};/512_cv 5.79 % 5.79 % 10
std::string copy{str_with_len_N};/1024_mean 44.1 ns 44.1 ns 10
std::string copy{str_with_len_N};/1024_median 44.1 ns 44.1 ns 10
std::string copy{str_with_len_N};/1024_stddev 0.355 ns 0.355 ns 10
std::string copy{str_with_len_N};/1024_cv 0.81 % 0.81 % 10
std::string copy{str_with_len_N};/2048_mean 130 ns 130 ns 10
std::string copy{str_with_len_N};/2048_median 132 ns 132 ns 10
std::string copy{str_with_len_N};/2048_stddev 8.33 ns 8.33 ns 10
std::string copy{str_with_len_N};/2048_cv 6.39 % 6.39 % 10
std::string copy{str_with_len_N};/4096_mean 153 ns 153 ns 10
std::string copy{str_with_len_N};/4096_median 154 ns 154 ns 10
std::string copy{str_with_len_N};/4096_stddev 9.49 ns 9.49 ns 10
std::string copy{str_with_len_N};/4096_cv 6.19 % 6.19 % 10
stringa copy{str_with_len_N};/15_mean 1.10 ns 1.10 ns 10
stringa copy{str_with_len_N};/15_median 1.09 ns 1.09 ns 10
stringa copy{str_with_len_N};/15_stddev 0.023 ns 0.023 ns 10
stringa copy{str_with_len_N};/15_cv 2.13 % 2.13 % 10
stringa copy{str_with_len_N};/16_mean 1.10 ns 1.10 ns 10
stringa copy{str_with_len_N};/16_median 1.10 ns 1.10 ns 10
stringa copy{str_with_len_N};/16_stddev 0.021 ns 0.021 ns 10
stringa copy{str_with_len_N};/16_cv 1.87 % 1.87 % 10
stringa copy{str_with_len_N};/23_mean 1.10 ns 1.10 ns 10
stringa copy{str_with_len_N};/23_median 1.10 ns 1.10 ns 10
stringa copy{str_with_len_N};/23_stddev 0.020 ns 0.020 ns 10
stringa copy{str_with_len_N};/23_cv 1.77 % 1.77 % 10
stringa copy{str_with_len_N};/24_mean 16.7 ns 16.7 ns 10
stringa copy{str_with_len_N};/24_median 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/24_stddev 2.22 ns 2.22 ns 10
stringa copy{str_with_len_N};/24_cv 13.29 % 13.29 % 10
stringa copy{str_with_len_N};/32_mean 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/32_median 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/32_stddev 0.274 ns 0.274 ns 10
stringa copy{str_with_len_N};/32_cv 1.71 % 1.71 % 10
stringa copy{str_with_len_N};/64_mean 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/64_median 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/64_stddev 0.140 ns 0.140 ns 10
stringa copy{str_with_len_N};/64_cv 0.87 % 0.87 % 10
stringa copy{str_with_len_N};/128_mean 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/128_median 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/128_stddev 0.101 ns 0.101 ns 10
stringa copy{str_with_len_N};/128_cv 0.63 % 0.63 % 10
stringa copy{str_with_len_N};/256_mean 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/256_median 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/256_stddev 0.199 ns 0.199 ns 10
stringa copy{str_with_len_N};/256_cv 1.24 % 1.24 % 10
stringa copy{str_with_len_N};/512_mean 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/512_median 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/512_stddev 0.116 ns 0.116 ns 10
stringa copy{str_with_len_N};/512_cv 0.72 % 0.72 % 10
stringa copy{str_with_len_N};/1024_mean 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/1024_median 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/1024_stddev 0.086 ns 0.086 ns 10
stringa copy{str_with_len_N};/1024_cv 0.54 % 0.54 % 10
stringa copy{str_with_len_N};/2048_mean 16.1 ns 16.1 ns 10
stringa copy{str_with_len_N};/2048_median 16.1 ns 16.1 ns 10
stringa copy{str_with_len_N};/2048_stddev 0.231 ns 0.231 ns 10
stringa copy{str_with_len_N};/2048_cv 1.43 % 1.43 % 10
stringa copy{str_with_len_N};/4096_mean 16.0 ns 16.0 ns 10
stringa copy{str_with_len_N};/4096_median 15.9 ns 15.9 ns 10
stringa copy{str_with_len_N};/4096_stddev 0.137 ns 0.137 ns 10
stringa copy{str_with_len_N};/4096_cv 0.86 % 0.86 % 10
lstringa<16> copy{str_with_len_N};/15_mean 4.12 ns 4.12 ns 10
lstringa<16> copy{str_with_len_N};/15_median 4.06 ns 4.06 ns 10
lstringa<16> copy{str_with_len_N};/15_stddev 0.151 ns 0.151 ns 10
lstringa<16> copy{str_with_len_N};/15_cv 3.68 % 3.68 % 10
lstringa<16> copy{str_with_len_N};/16_mean 4.09 ns 4.09 ns 10
lstringa<16> copy{str_with_len_N};/16_median 4.04 ns 4.04 ns 10
lstringa<16> copy{str_with_len_N};/16_stddev 0.099 ns 0.099 ns 10
lstringa<16> copy{str_with_len_N};/16_cv 2.42 % 2.42 % 10
lstringa<16> copy{str_with_len_N};/23_mean 4.04 ns 4.04 ns 10
lstringa<16> copy{str_with_len_N};/23_median 4.02 ns 4.02 ns 10
lstringa<16> copy{str_with_len_N};/23_stddev 0.087 ns 0.087 ns 10
lstringa<16> copy{str_with_len_N};/23_cv 2.16 % 2.16 % 10
lstringa<16> copy{str_with_len_N};/24_mean 22.9 ns 22.9 ns 10
lstringa<16> copy{str_with_len_N};/24_median 22.9 ns 22.9 ns 10
lstringa<16> copy{str_with_len_N};/24_stddev 0.276 ns 0.276 ns 10
lstringa<16> copy{str_with_len_N};/24_cv 1.20 % 1.20 % 10
lstringa<16> copy{str_with_len_N};/32_mean 22.9 ns 22.9 ns 10
lstringa<16> copy{str_with_len_N};/32_median 23.0 ns 23.0 ns 10
lstringa<16> copy{str_with_len_N};/32_stddev 0.429 ns 0.429 ns 10
lstringa<16> copy{str_with_len_N};/32_cv 1.87 % 1.87 % 10
lstringa<16> copy{str_with_len_N};/64_mean 24.1 ns 24.1 ns 10
lstringa<16> copy{str_with_len_N};/64_median 23.8 ns 23.8 ns 10
lstringa<16> copy{str_with_len_N};/64_stddev 0.966 ns 0.966 ns 10
lstringa<16> copy{str_with_len_N};/64_cv 4.01 % 4.01 % 10
lstringa<16> copy{str_with_len_N};/128_mean 24.8 ns 24.8 ns 10
lstringa<16> copy{str_with_len_N};/128_median 24.8 ns 24.8 ns 10
lstringa<16> copy{str_with_len_N};/128_stddev 0.671 ns 0.671 ns 10
lstringa<16> copy{str_with_len_N};/128_cv 2.70 % 2.70 % 10
lstringa<16> copy{str_with_len_N};/256_mean 26.0 ns 26.0 ns 10
lstringa<16> copy{str_with_len_N};/256_median 25.8 ns 25.8 ns 10
lstringa<16> copy{str_with_len_N};/256_stddev 0.889 ns 0.889 ns 10
lstringa<16> copy{str_with_len_N};/256_cv 3.42 % 3.42 % 10
lstringa<16> copy{str_with_len_N};/512_mean 28.5 ns 28.5 ns 10
lstringa<16> copy{str_with_len_N};/512_median 28.4 ns 28.4 ns 10
lstringa<16> copy{str_with_len_N};/512_stddev 0.294 ns 0.294 ns 10
lstringa<16> copy{str_with_len_N};/512_cv 1.03 % 1.03 % 10
lstringa<16> copy{str_with_len_N};/1024_mean 93.2 ns 93.2 ns 10
lstringa<16> copy{str_with_len_N};/1024_median 96.2 ns 96.2 ns 10
lstringa<16> copy{str_with_len_N};/1024_stddev 10.7 ns 10.7 ns 10
lstringa<16> copy{str_with_len_N};/1024_cv 11.44 % 11.44 % 10
lstringa<16> copy{str_with_len_N};/2048_mean 113 ns 113 ns 10
lstringa<16> copy{str_with_len_N};/2048_median 114 ns 114 ns 10
lstringa<16> copy{str_with_len_N};/2048_stddev 12.1 ns 12.1 ns 10
lstringa<16> copy{str_with_len_N};/2048_cv 10.70 % 10.70 % 10
lstringa<16> copy{str_with_len_N};/4096_mean 127 ns 127 ns 10
lstringa<16> copy{str_with_len_N};/4096_median 126 ns 126 ns 10
lstringa<16> copy{str_with_len_N};/4096_stddev 8.40 ns 8.40 ns 10
lstringa<16> copy{str_with_len_N};/4096_cv 6.63 % 6.63 % 10
lstringa<512> copy{str_with_len_N};/15_mean 4.48 ns 4.48 ns 10
lstringa<512> copy{str_with_len_N};/15_median 4.38 ns 4.38 ns 10
lstringa<512> copy{str_with_len_N};/15_stddev 0.311 ns 0.311 ns 10
lstringa<512> copy{str_with_len_N};/15_cv 6.94 % 6.94 % 10
lstringa<512> copy{str_with_len_N};/16_mean 4.49 ns 4.49 ns 10
lstringa<512> copy{str_with_len_N};/16_median 4.48 ns 4.48 ns 10
lstringa<512> copy{str_with_len_N};/16_stddev 0.123 ns 0.123 ns 10
lstringa<512> copy{str_with_len_N};/16_cv 2.75 % 2.75 % 10
lstringa<512> copy{str_with_len_N};/23_mean 4.43 ns 4.43 ns 10
lstringa<512> copy{str_with_len_N};/23_median 4.40 ns 4.40 ns 10
lstringa<512> copy{str_with_len_N};/23_stddev 0.107 ns 0.107 ns 10
lstringa<512> copy{str_with_len_N};/23_cv 2.42 % 2.42 % 10
lstringa<512> copy{str_with_len_N};/24_mean 4.55 ns 4.55 ns 10
lstringa<512> copy{str_with_len_N};/24_median 4.53 ns 4.53 ns 10
lstringa<512> copy{str_with_len_N};/24_stddev 0.112 ns 0.112 ns 10
lstringa<512> copy{str_with_len_N};/24_cv 2.47 % 2.47 % 10
lstringa<512> copy{str_with_len_N};/32_mean 4.12 ns 4.12 ns 10
lstringa<512> copy{str_with_len_N};/32_median 4.09 ns 4.09 ns 10
lstringa<512> copy{str_with_len_N};/32_stddev 0.123 ns 0.123 ns 10
lstringa<512> copy{str_with_len_N};/32_cv 3.00 % 3.00 % 10
lstringa<512> copy{str_with_len_N};/64_mean 6.30 ns 6.30 ns 10
lstringa<512> copy{str_with_len_N};/64_median 6.16 ns 6.16 ns 10
lstringa<512> copy{str_with_len_N};/64_stddev 0.337 ns 0.337 ns 10
lstringa<512> copy{str_with_len_N};/64_cv 5.35 % 5.35 % 10
lstringa<512> copy{str_with_len_N};/128_mean 6.07 ns 6.07 ns 10
lstringa<512> copy{str_with_len_N};/128_median 6.00 ns 6.00 ns 10
lstringa<512> copy{str_with_len_N};/128_stddev 0.226 ns 0.226 ns 10
lstringa<512> copy{str_with_len_N};/128_cv 3.73 % 3.73 % 10
lstringa<512> copy{str_with_len_N};/256_mean 7.87 ns 7.87 ns 10
lstringa<512> copy{str_with_len_N};/256_median 7.88 ns 7.88 ns 10
lstringa<512> copy{str_with_len_N};/256_stddev 0.159 ns 0.159 ns 10
lstringa<512> copy{str_with_len_N};/256_cv 2.02 % 2.02 % 10
lstringa<512> copy{str_with_len_N};/512_mean 10.2 ns 10.2 ns 10
lstringa<512> copy{str_with_len_N};/512_median 10.1 ns 10.1 ns 10
lstringa<512> copy{str_with_len_N};/512_stddev 0.401 ns 0.401 ns 10
lstringa<512> copy{str_with_len_N};/512_cv 3.95 % 3.95 % 10
lstringa<512> copy{str_with_len_N};/1024_mean 95.5 ns 95.5 ns 10
lstringa<512> copy{str_with_len_N};/1024_median 95.8 ns 95.8 ns 10
lstringa<512> copy{str_with_len_N};/1024_stddev 10.0 ns 10.0 ns 10
lstringa<512> copy{str_with_len_N};/1024_cv 10.48 % 10.48 % 10
lstringa<512> copy{str_with_len_N};/2048_mean 116 ns 116 ns 10
lstringa<512> copy{str_with_len_N};/2048_median 119 ns 119 ns 10
lstringa<512> copy{str_with_len_N};/2048_stddev 12.9 ns 12.9 ns 10
lstringa<512> copy{str_with_len_N};/2048_cv 11.09 % 11.09 % 10
lstringa<512> copy{str_with_len_N};/4096_mean 130 ns 130 ns 10
lstringa<512> copy{str_with_len_N};/4096_median 126 ns 126 ns 10
lstringa<512> copy{str_with_len_N};/4096_stddev 13.5 ns 13.5 ns 10
lstringa<512> copy{str_with_len_N};/4096_cv 10.37 % 10.37 % 10
----- 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.5 ns 27.5 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 27.7 ns 27.7 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 1.02 ns 1.02 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 3.69 % 3.69 % 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 15.1 ns 15.1 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 15.1 ns 15.1 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.395 ns 0.395 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.62 % 2.62 % 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 12.4 ns 12.4 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 12.4 ns 12.4 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.134 ns 0.134 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.08 % 1.08 % 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 12.2 ns 12.2 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 12.2 ns 12.2 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.135 ns 0.135 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.11 % 1.11 % 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 12.4 ns 12.4 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 12.4 ns 12.4 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.212 ns 0.212 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.71 % 1.71 % 10
----- 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.1 ns 24.1 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 23.9 ns 23.9 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.739 ns 0.739 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 3.07 % 3.07 % 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.60 ns 9.60 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.56 ns 9.56 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.196 ns 0.196 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 2.05 % 2.05 % 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 12.7 ns 12.7 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 12.5 ns 12.5 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.388 ns 0.388 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 3.05 % 3.05 % 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 13.1 ns 13.1 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 13.0 ns 13.0 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.717 ns 0.717 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 5.46 % 5.46 % 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 12.7 ns 12.7 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 12.6 ns 12.6 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.416 ns 0.416 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 3.26 % 3.26 % 10
----- 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.9 ns 28.9 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 28.7 ns 28.7 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.802 ns 0.802 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 2.77 % 2.77 % 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 18.4 ns 18.4 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 18.4 ns 18.4 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.236 ns 0.236 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 1.28 % 1.28 % 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 15.3 ns 15.3 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 15.2 ns 15.2 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.387 ns 0.387 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 2.54 % 2.54 % 10
----- 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 65.7 ns 65.7 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 64.6 ns 64.6 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 2.02 ns 2.02 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 3.08 % 3.08 % 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 24.6 ns 24.6 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 24.4 ns 24.4 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.496 ns 0.496 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.02 % 2.02 % 10
ssa s = "1234.567e10"; double res = *s.to_double()_mean 26.1 ns 26.1 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_median 25.7 ns 25.7 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.780 ns 0.780 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.99 % 2.99 % 10
-- 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 1354 ns 1354 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_median 1341 ns 1341 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 34.1 ns 34.1 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 2.52 % 2.52 % 10
std::string str; ... str += "abbaabbaabbaabba";_mean 372 ns 372 ns 10
std::string str; ... str += "abbaabbaabbaabba";_median 375 ns 375 ns 10
std::string str; ... str += "abbaabbaabbaabba";_stddev 16.4 ns 16.4 ns 10
std::string str; ... str += "abbaabbaabbaabba";_cv 4.42 % 4.42 % 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 361 ns 361 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 364 ns 364 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 14.5 ns 14.5 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 4.02 % 4.02 % 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 272 ns 272 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 267 ns 267 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 13.2 ns 13.2 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 4.83 % 4.83 % 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 228 ns 228 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 221 ns 221 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 16.3 ns 16.3 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 7.16 % 7.16 % 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 136 ns 136 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 135 ns 135 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 2.82 ns 2.82 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.07 % 2.07 % 10
-- 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 1363 ns 1363 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1349 ns 1349 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 40.2 ns 40.2 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.95 % 2.95 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1282 ns 1282 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1276 ns 1276 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 31.1 ns 31.1 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 2.43 % 2.43 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 445 ns 445 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 447 ns 447 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 15.1 ns 15.1 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.41 % 3.41 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 386 ns 386 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 380 ns 380 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 21.8 ns 21.8 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.66 % 5.66 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 323 ns 323 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 311 ns 311 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 23.3 ns 23.3 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 7.22 % 7.22 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 204 ns 204 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 202 ns 202 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 4.94 ns 4.94 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.42 % 2.42 % 10
-- 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 76544 ns 76545 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 75664 ns 75664 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 2769 ns 2769 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 3.62 % 3.62 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 72458 ns 72459 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 72032 ns 72033 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2580 ns 2580 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.56 % 3.56 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 19689 ns 19689 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 19666 ns 19666 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 596 ns 596 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.03 % 3.03 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 15956 ns 15956 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 15932 ns 15933 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 321 ns 321 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.01 % 2.01 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 15837 ns 15837 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 15670 ns 15670 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 366 ns 366 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.31 % 2.31 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17811 ns 17812 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17760 ns 17760 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 344 ns 344 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.93 % 1.93 % 10
-- 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 1397 ns 1397 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_median 1390 ns 1390 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_stddev 58.0 ns 58.0 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_cv 4.15 % 4.15 % 10
std::string str; ... str += str_var1 + str_var2;_mean 1354 ns 1354 ns 10
std::string str; ... str += str_var1 + str_var2;_median 1353 ns 1353 ns 10
std::string str; ... str += str_var1 + str_var2;_stddev 19.0 ns 19.0 ns 10
std::string str; ... str += str_var1 + str_var2;_cv 1.41 % 1.41 % 10
lstringa<16> str; ... str += str_var1 + str_var2;_mean 524 ns 524 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_median 522 ns 522 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 37.6 ns 37.6 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_cv 7.18 % 7.18 % 10
lstringa<128> str; ... str += str_var1 + str_var2;_mean 449 ns 449 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_median 445 ns 445 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 20.3 ns 20.3 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_cv 4.52 % 4.52 % 10
lstringa<512> str; ... str += str_var1 + str_var2;_mean 385 ns 385 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_median 387 ns 387 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 15.8 ns 15.8 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_cv 4.11 % 4.11 % 10
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 305 ns 305 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_median 303 ns 303 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 7.25 ns 7.25 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 2.38 % 2.38 % 10
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 3102 ns 3102 ns 10
std::stringstream str; str << "test = " << k << " times";_median 3021 ns 3021 ns 10
std::stringstream str; str << "test = " << k << " times";_stddev 206 ns 206 ns 10
std::stringstream str; str << "test = " << k << " times";_cv 6.65 % 6.65 % 10
std::string str = "test = " + std::to_string(k) + " times";_mean 471 ns 471 ns 10
std::string str = "test = " + std::to_string(k) + " times";_median 468 ns 468 ns 10
std::string str = "test = " + std::to_string(k) + " times";_stddev 14.6 ns 14.6 ns 10
std::string str = "test = " + std::to_string(k) + " times";_cv 3.10 % 3.10 % 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1395 ns 1395 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1384 ns 1384 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 43.0 ns 43.0 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 3.08 % 3.08 % 10
std::string str = std::format("test = {} times", k);_mean 1205 ns 1205 ns 10
std::string str = std::format("test = {} times", k);_median 1179 ns 1179 ns 10
std::string str = std::format("test = {} times", k);_stddev 86.3 ns 86.3 ns 10
std::string str = std::format("test = {} times", k);_cv 7.16 % 7.16 % 10
lstringa<8> str; str.format("test = {} times", k);_mean 1377 ns 1377 ns 10
lstringa<8> str; str.format("test = {} times", k);_median 1348 ns 1348 ns 10
lstringa<8> str; str.format("test = {} times", k);_stddev 75.8 ns 75.8 ns 10
lstringa<8> str; str.format("test = {} times", k);_cv 5.51 % 5.51 % 10
lstringa<32> str; str.format("test = {} times", k);_mean 979 ns 979 ns 10
lstringa<32> str; str.format("test = {} times", k);_median 969 ns 969 ns 10
lstringa<32> str; str.format("test = {} times", k);_stddev 25.7 ns 25.7 ns 10
lstringa<32> str; str.format("test = {} times", k);_cv 2.62 % 2.62 % 10
lstringa<8> str = "test = " + k + " times";_mean 295 ns 295 ns 10
lstringa<8> str = "test = " + k + " times";_median 292 ns 292 ns 10
lstringa<8> str = "test = " + k + " times";_stddev 9.63 ns 9.63 ns 10
lstringa<8> str = "test = " + k + " times";_cv 3.26 % 3.26 % 10
lstringa<32> str = "test = " + k + " times";_mean 152 ns 152 ns 10
lstringa<32> str = "test = " + k + " times";_median 152 ns 152 ns 10
lstringa<32> str = "test = " + k + " times";_stddev 3.23 ns 3.23 ns 10
lstringa<32> str = "test = " + k + " times";_cv 2.12 % 2.12 % 10
stringa str = "test = " + k + " times";_mean 150 ns 150 ns 10
stringa str = "test = " + k + " times";_median 149 ns 149 ns 10
stringa str = "test = " + k + " times";_stddev 3.69 ns 3.69 ns 10
stringa str = "test = " + k + " times";_cv 2.46 % 2.46 % 10
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 270 ns 270 ns 10
std::string::find + substr + std::strtol_median 268 ns 268 ns 10
std::string::find + substr + std::strtol_stddev 7.74 ns 7.74 ns 10
std::string::find + substr + std::strtol_cv 2.86 % 2.86 % 10
ssa::splitter + ssa::as_int_mean 154 ns 154 ns 10
ssa::splitter + ssa::as_int_median 153 ns 153 ns 10
ssa::splitter + ssa::as_int_stddev 4.53 ns 4.53 ns 10
ssa::splitter + ssa::as_int_cv 2.94 % 2.94 % 10
ssa::splitf + functor_mean 212 ns 212 ns 10
ssa::splitf + functor_median 212 ns 212 ns 10
ssa::splitf + functor_stddev 6.59 ns 6.59 ns 10
ssa::splitf + functor_cv 3.11 % 3.11 % 10
-- 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 865 ns 865 ns 10
Naive (and wrong) replace symbols with std::string find + replace_median 867 ns 867 ns 10
Naive (and wrong) replace symbols with std::string find + replace_stddev 28.3 ns 28.3 ns 10
Naive (and wrong) replace symbols with std::string find + replace_cv 3.27 % 3.27 % 10
replace symbols with std::string find_first_of + replace_mean 2400 ns 2400 ns 10
replace symbols with std::string find_first_of + replace_median 2390 ns 2390 ns 10
replace symbols with std::string find_first_of + replace_stddev 57.5 ns 57.5 ns 10
replace symbols with std::string find_first_of + replace_cv 2.39 % 2.39 % 10
replace symbols with std::string_view find_first_of + copy_mean 1100 ns 1100 ns 10
replace symbols with std::string_view find_first_of + copy_median 1099 ns 1099 ns 10
replace symbols with std::string_view find_first_of + copy_stddev 22.3 ns 22.3 ns 10
replace symbols with std::string_view find_first_of + copy_cv 2.03 % 2.03 % 10
replace runtime symbols with string expressions and without remembering all search results_mean 1290 ns 1290 ns 10
replace runtime symbols with string expressions and without remembering all search results_median 1279 ns 1279 ns 10
replace runtime symbols with string expressions and without remembering all search results_stddev 41.5 ns 41.5 ns 10
replace runtime symbols with string expressions and without remembering all search results_cv 3.22 % 3.22 % 10
replace runtime symbols with simstr and memorization of all search results_mean 1039 ns 1039 ns 10
replace runtime symbols with simstr and memorization of all search results_median 1037 ns 1037 ns 10
replace runtime symbols with simstr and memorization of all search results_stddev 18.2 ns 18.2 ns 10
replace runtime symbols with simstr and memorization of all search results_cv 1.75 % 1.75 % 10
replace const symbols with string expressions and without remembering all search results_mean 1034 ns 1034 ns 10
replace const symbols with string expressions and without remembering all search results_median 1019 ns 1019 ns 10
replace const symbols with string expressions and without remembering all search results_stddev 35.2 ns 35.2 ns 10
replace const symbols with string expressions and without remembering all search results_cv 3.40 % 3.40 % 10
replace const symbols with string expressions and memorization of all search results_mean 892 ns 892 ns 10
replace const symbols with string expressions and memorization of all search results_median 878 ns 878 ns 10
replace const symbols with string expressions and memorization of all search results_stddev 24.3 ns 24.3 ns 10
replace const symbols with string expressions and memorization of all search results_cv 2.72 % 2.72 % 10
-- 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 156 ns 156 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_median 157 ns 157 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 3.45 ns 3.45 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.21 % 2.21 % 10
Short replace symbols with std::string find_first_of + replace_mean 343 ns 343 ns 10
Short replace symbols with std::string find_first_of + replace_median 348 ns 348 ns 10
Short replace symbols with std::string find_first_of + replace_stddev 23.7 ns 23.7 ns 10
Short replace symbols with std::string find_first_of + replace_cv 6.91 % 6.91 % 10
Short replace symbols with std::string_view find_first_of + copy_mean 167 ns 167 ns 10
Short replace symbols with std::string_view find_first_of + copy_median 165 ns 165 ns 10
Short replace symbols with std::string_view find_first_of + copy_stddev 6.66 ns 6.66 ns 10
Short replace symbols with std::string_view find_first_of + copy_cv 3.98 % 3.98 % 10
Short replace runtime symbols with string expressions and without remembering all search results_mean 191 ns 191 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_median 189 ns 189 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_stddev 7.06 ns 7.06 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_cv 3.70 % 3.70 % 10
Short replace runtime symbols with simstr and memorization of all search results_mean 185 ns 185 ns 10
Short replace runtime symbols with simstr and memorization of all search results_median 183 ns 183 ns 10
Short replace runtime symbols with simstr and memorization of all search results_stddev 5.32 ns 5.32 ns 10
Short replace runtime symbols with simstr and memorization of all search results_cv 2.88 % 2.88 % 10
Short replace const symbols with string expressions and without remembering all search results_mean 132 ns 132 ns 10
Short replace const symbols with string expressions and without remembering all search results_median 130 ns 130 ns 10
Short replace const symbols with string expressions and without remembering all search results_stddev 4.94 ns 4.94 ns 10
Short replace const symbols with string expressions and without remembering all search results_cv 3.73 % 3.73 % 10
Short replace const symbols with string expressions and memorization of all search results_mean 149 ns 149 ns 10
Short replace const symbols with string expressions and memorization of all search results_median 148 ns 148 ns 10
Short replace const symbols with string expressions and memorization of all search results_stddev 3.65 ns 3.65 ns 10
Short replace const symbols with string expressions and memorization of all search results_cv 2.46 % 2.46 % 10
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 161 ns 161 ns 10
replace bb to ---- in std::string|64_median 160 ns 160 ns 10
replace bb to ---- in std::string|64_stddev 5.40 ns 5.40 ns 10
replace bb to ---- in std::string|64_cv 3.36 % 3.36 % 10
replace bb to ---- in std::string|256_mean 543 ns 543 ns 10
replace bb to ---- in std::string|256_median 529 ns 529 ns 10
replace bb to ---- in std::string|256_stddev 35.9 ns 35.9 ns 10
replace bb to ---- in std::string|256_cv 6.61 % 6.61 % 10
replace bb to ---- in std::string|512_mean 1041 ns 1041 ns 10
replace bb to ---- in std::string|512_median 1042 ns 1042 ns 10
replace bb to ---- in std::string|512_stddev 16.1 ns 16.1 ns 10
replace bb to ---- in std::string|512_cv 1.55 % 1.55 % 10
replace bb to ---- in std::string|1024_mean 2329 ns 2329 ns 10
replace bb to ---- in std::string|1024_median 2239 ns 2239 ns 10
replace bb to ---- in std::string|1024_stddev 205 ns 205 ns 10
replace bb to ---- in std::string|1024_cv 8.81 % 8.81 % 10
replace bb to ---- in std::string|2048_mean 5815 ns 5815 ns 10
replace bb to ---- in std::string|2048_median 5657 ns 5657 ns 10
replace bb to ---- in std::string|2048_stddev 338 ns 338 ns 10
replace bb to ---- in std::string|2048_cv 5.82 % 5.82 % 10
replace bb to ---- in lstringa<8>|64_mean 143 ns 143 ns 10
replace bb to ---- in lstringa<8>|64_median 142 ns 142 ns 10
replace bb to ---- in lstringa<8>|64_stddev 3.02 ns 3.02 ns 10
replace bb to ---- in lstringa<8>|64_cv 2.12 % 2.12 % 10
replace bb to ---- in lstringa<8>|256_mean 439 ns 439 ns 10
replace bb to ---- in lstringa<8>|256_median 437 ns 437 ns 10
replace bb to ---- in lstringa<8>|256_stddev 9.49 ns 9.49 ns 10
replace bb to ---- in lstringa<8>|256_cv 2.16 % 2.16 % 10
replace bb to ---- in lstringa<8>|512_mean 833 ns 833 ns 10
replace bb to ---- in lstringa<8>|512_median 839 ns 839 ns 10
replace bb to ---- in lstringa<8>|512_stddev 25.8 ns 25.8 ns 10
replace bb to ---- in lstringa<8>|512_cv 3.10 % 3.10 % 10
replace bb to ---- in lstringa<8>|1024_mean 1669 ns 1669 ns 10
replace bb to ---- in lstringa<8>|1024_median 1646 ns 1646 ns 10
replace bb to ---- in lstringa<8>|1024_stddev 54.6 ns 54.6 ns 10
replace bb to ---- in lstringa<8>|1024_cv 3.27 % 3.27 % 10
replace bb to ---- in lstringa<8>|2048_mean 3123 ns 3123 ns 10
replace bb to ---- in lstringa<8>|2048_median 3111 ns 3111 ns 10
replace bb to ---- in lstringa<8>|2048_stddev 54.4 ns 54.4 ns 10
replace bb to ---- in lstringa<8>|2048_cv 1.74 % 1.74 % 10
replace bb to ---- by init stringa|64_mean 98.9 ns 98.9 ns 10
replace bb to ---- by init stringa|64_median 98.0 ns 98.0 ns 10
replace bb to ---- by init stringa|64_stddev 3.52 ns 3.52 ns 10
replace bb to ---- by init stringa|64_cv 3.56 % 3.56 % 10
replace bb to ---- by init stringa|256_mean 300 ns 300 ns 10
replace bb to ---- by init stringa|256_median 298 ns 298 ns 10
replace bb to ---- by init stringa|256_stddev 6.55 ns 6.55 ns 10
replace bb to ---- by init stringa|256_cv 2.18 % 2.18 % 10
replace bb to ---- by init stringa|512_mean 706 ns 706 ns 10
replace bb to ---- by init stringa|512_median 701 ns 701 ns 10
replace bb to ---- by init stringa|512_stddev 17.5 ns 17.5 ns 10
replace bb to ---- by init stringa|512_cv 2.47 % 2.47 % 10
replace bb to ---- by init stringa|1024_mean 1511 ns 1512 ns 10
replace bb to ---- by init stringa|1024_median 1510 ns 1510 ns 10
replace bb to ---- by init stringa|1024_stddev 22.4 ns 22.4 ns 10
replace bb to ---- by init stringa|1024_cv 1.48 % 1.48 % 10
replace bb to ---- by init stringa|2048_mean 3078 ns 3078 ns 10
replace bb to ---- by init stringa|2048_median 3038 ns 3038 ns 10
replace bb to ---- by init stringa|2048_stddev 113 ns 113 ns 10
replace bb to ---- by init stringa|2048_cv 3.68 % 3.68 % 10
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 121 ns 121 ns 10
replace bb to -- in std::string|64_median 119 ns 119 ns 10
replace bb to -- in std::string|64_stddev 4.36 ns 4.36 ns 10
replace bb to -- in std::string|64_cv 3.62 % 3.62 % 10
replace bb to -- in std::string|256_mean 411 ns 411 ns 10
replace bb to -- in std::string|256_median 411 ns 411 ns 10
replace bb to -- in std::string|256_stddev 23.4 ns 23.4 ns 10
replace bb to -- in std::string|256_cv 5.69 % 5.69 % 10
replace bb to -- in std::string|512_mean 759 ns 759 ns 10
replace bb to -- in std::string|512_median 760 ns 760 ns 10
replace bb to -- in std::string|512_stddev 19.8 ns 19.8 ns 10
replace bb to -- in std::string|512_cv 2.60 % 2.60 % 10
replace bb to -- in std::string|1024_mean 1460 ns 1460 ns 10
replace bb to -- in std::string|1024_median 1449 ns 1449 ns 10
replace bb to -- in std::string|1024_stddev 54.1 ns 54.1 ns 10
replace bb to -- in std::string|1024_cv 3.70 % 3.70 % 10
replace bb to -- in std::string|2048_mean 3052 ns 3052 ns 10
replace bb to -- in std::string|2048_median 3033 ns 3033 ns 10
replace bb to -- in std::string|2048_stddev 74.6 ns 74.6 ns 10
replace bb to -- in std::string|2048_cv 2.44 % 2.44 % 10
replace bb to -- in lstringa<8>|64_mean 99.0 ns 99.0 ns 10
replace bb to -- in lstringa<8>|64_median 98.1 ns 98.1 ns 10
replace bb to -- in lstringa<8>|64_stddev 2.91 ns 2.91 ns 10
replace bb to -- in lstringa<8>|64_cv 2.94 % 2.94 % 10
replace bb to -- in lstringa<8>|256_mean 300 ns 300 ns 10
replace bb to -- in lstringa<8>|256_median 299 ns 299 ns 10
replace bb to -- in lstringa<8>|256_stddev 13.2 ns 13.2 ns 10
replace bb to -- in lstringa<8>|256_cv 4.39 % 4.39 % 10
replace bb to -- in lstringa<8>|512_mean 552 ns 552 ns 10
replace bb to -- in lstringa<8>|512_median 551 ns 551 ns 10
replace bb to -- in lstringa<8>|512_stddev 12.0 ns 12.0 ns 10
replace bb to -- in lstringa<8>|512_cv 2.17 % 2.17 % 10
replace bb to -- in lstringa<8>|1024_mean 1147 ns 1147 ns 10
replace bb to -- in lstringa<8>|1024_median 1154 ns 1154 ns 10
replace bb to -- in lstringa<8>|1024_stddev 30.5 ns 30.5 ns 10
replace bb to -- in lstringa<8>|1024_cv 2.66 % 2.66 % 10
replace bb to -- in lstringa<8>|2048_mean 2183 ns 2183 ns 10
replace bb to -- in lstringa<8>|2048_median 2167 ns 2167 ns 10
replace bb to -- in lstringa<8>|2048_stddev 65.9 ns 65.9 ns 10
replace bb to -- in lstringa<8>|2048_cv 3.02 % 3.02 % 10
replace bb to -- by init stringa|64_mean 82.4 ns 82.4 ns 10
replace bb to -- by init stringa|64_median 81.8 ns 81.8 ns 10
replace bb to -- by init stringa|64_stddev 2.20 ns 2.20 ns 10
replace bb to -- by init stringa|64_cv 2.67 % 2.67 % 10
replace bb to -- by init stringa|256_mean 244 ns 244 ns 10
replace bb to -- by init stringa|256_median 240 ns 240 ns 10
replace bb to -- by init stringa|256_stddev 11.1 ns 11.1 ns 10
replace bb to -- by init stringa|256_cv 4.53 % 4.53 % 10
replace bb to -- by init stringa|512_mean 444 ns 444 ns 10
replace bb to -- by init stringa|512_median 444 ns 444 ns 10
replace bb to -- by init stringa|512_stddev 18.2 ns 18.2 ns 10
replace bb to -- by init stringa|512_cv 4.11 % 4.11 % 10
replace bb to -- by init stringa|1024_mean 886 ns 886 ns 10
replace bb to -- by init stringa|1024_median 868 ns 868 ns 10
replace bb to -- by init stringa|1024_stddev 32.1 ns 32.1 ns 10
replace bb to -- by init stringa|1024_cv 3.62 % 3.62 % 10
replace bb to -- by init stringa|2048_mean 1707 ns 1707 ns 10
replace bb to -- by init stringa|2048_median 1696 ns 1696 ns 10
replace bb to -- by init stringa|2048_stddev 55.5 ns 55.5 ns 10
replace bb to -- by init stringa|2048_cv 3.25 % 3.25 % 10
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3625242 ns 3625255 ns 10
hashStrMapA<size_t> emplace & find stringa;_median 3613086 ns 3613099 ns 10
hashStrMapA<size_t> emplace & find stringa;_stddev 56566 ns 56566 ns 10
hashStrMapA<size_t> emplace & find stringa;_cv 1.56 % 1.56 % 10
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3517784 ns 3517795 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3487503 ns 3487513 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 77853 ns 77854 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 2.21 % 2.21 % 10
hashStrMapA<size_t> emplace & find ssa;_mean 3618716 ns 3618730 ns 10
hashStrMapA<size_t> emplace & find ssa;_median 3594424 ns 3594438 ns 10
hashStrMapA<size_t> emplace & find ssa;_stddev 62317 ns 62318 ns 10
hashStrMapA<size_t> emplace & find ssa;_cv 1.72 % 1.72 % 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 4166457 ns 4166472 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 4166618 ns 4166634 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 80853 ns 80854 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 1.94 % 1.94 % 10
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 708 ns 708 ns 10
Build func full name std::string;_median 710 ns 710 ns 10
Build func full name std::string;_stddev 23.6 ns 23.6 ns 10
Build func full name std::string;_cv 3.33 % 3.33 % 10
Build func full name std::string 1;_mean 846 ns 846 ns 10
Build func full name std::string 1;_median 834 ns 834 ns 10
Build func full name std::string 1;_stddev 26.7 ns 26.7 ns 10
Build func full name std::string 1;_cv 3.15 % 3.15 % 10
Build func full name std::stream;_mean 2571 ns 2571 ns 10
Build func full name std::stream;_median 2542 ns 2542 ns 10
Build func full name std::stream;_stddev 73.7 ns 73.7 ns 10
Build func full name std::stream;_cv 2.87 % 2.87 % 10
Build func full name stringa;_mean 508 ns 508 ns 10
Build func full name stringa;_median 504 ns 504 ns 10
Build func full name stringa;_stddev 22.6 ns 22.6 ns 10
Build func full name stringa;_cv 4.45 % 4.45 % 10
Build func full name stringa 1;_mean 648 ns 648 ns 10
Build func full name stringa 1;_median 642 ns 642 ns 10
Build func full name stringa 1;_stddev 15.7 ns 15.7 ns 10
Build func full name stringa 1;_cv 2.43 % 2.43 % 10

View File

@ -0,0 +1,989 @@
Benchmarks of simstr, version 1.8.1
Sources: https://github.com/orefkov/simstr
Results: https://orefkov.github.io/simstr/results.html
Compiler Clang 22.0.0
2026-03-22T13:18:22+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.20, 0.67, 0.53
***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 167 ns 167 ns 4
Concat email std::format_median 166 ns 166 ns 4
Concat email std::format_stddev 2.04 ns 2.04 ns 4
Concat email std::format_cv 1.22 % 1.22 % 4
Concat email std::stringstream_mean 379 ns 379 ns 4
Concat email std::stringstream_median 379 ns 379 ns 4
Concat email std::stringstream_stddev 2.80 ns 2.80 ns 4
Concat email std::stringstream_cv 0.74 % 0.74 % 4
Concat email stringzilla append_mean 143 ns 143 ns 4
Concat email stringzilla append_median 142 ns 142 ns 4
Concat email stringzilla append_stddev 4.40 ns 4.40 ns 4
Concat email stringzilla append_cv 3.07 % 3.07 % 4
Concat email stringzilla concat_mean 54.6 ns 54.6 ns 4
Concat email stringzilla concat_median 54.3 ns 54.3 ns 4
Concat email stringzilla concat_stddev 1.36 ns 1.36 ns 4
Concat email stringzilla concat_cv 2.50 % 2.50 % 4
Concat email std::string append_mean 73.9 ns 73.9 ns 4
Concat email std::string append_median 74.2 ns 74.2 ns 4
Concat email std::string append_stddev 0.919 ns 0.919 ns 4
Concat email std::string append_cv 1.24 % 1.24 % 4
Concat email std::string by strexpr_mean 46.8 ns 46.8 ns 4
Concat email std::string by strexpr_median 47.4 ns 47.4 ns 4
Concat email std::string by strexpr_stddev 1.39 ns 1.39 ns 4
Concat email std::string by strexpr_cv 2.96 % 2.96 % 4
Concat email stringa_mean 39.1 ns 39.1 ns 4
Concat email stringa_median 38.9 ns 38.9 ns 4
Concat email stringa_stddev 0.543 ns 0.543 ns 4
Concat email stringa_cv 1.39 % 1.39 % 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 223 ns 223 ns 4
Concat std::string and number by std to std::string_median 223 ns 223 ns 4
Concat std::string and number by std to std::string_stddev 3.04 ns 3.04 ns 4
Concat std::string and number by std to std::string_cv 1.36 % 1.36 % 4
Concat std::string and number by StrExpr to std::string_mean 105 ns 105 ns 4
Concat std::string and number by StrExpr to std::string_median 106 ns 106 ns 4
Concat std::string and number by StrExpr to std::string_stddev 2.70 ns 2.70 ns 4
Concat std::string and number by StrExpr to std::string_cv 2.56 % 2.56 % 4
Concat stringa and number by StrExpr to simstr::stringa_mean 64.9 ns 64.9 ns 4
Concat stringa and number by StrExpr to simstr::stringa_median 64.8 ns 64.8 ns 4
Concat stringa and number by StrExpr to simstr::stringa_stddev 0.353 ns 0.353 ns 4
Concat stringa and number by StrExpr to simstr::stringa_cv 0.54 % 0.54 % 4
Concat stringa and number by e_concat to simstr::stringa_mean 72.3 ns 72.3 ns 4
Concat stringa and number by e_concat to simstr::stringa_median 71.9 ns 71.9 ns 4
Concat stringa and number by e_concat to simstr::stringa_stddev 1.59 ns 1.59 ns 4
Concat stringa and number by e_concat to simstr::stringa_cv 2.20 % 2.20 % 4
----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and format hex number and literal to std::string_mean 696 ns 696 ns 4
Concat std::string and format hex number and literal to std::string_median 699 ns 699 ns 4
Concat std::string and format hex number and literal to std::string_stddev 9.35 ns 9.34 ns 4
Concat std::string and format hex number and literal to std::string_cv 1.34 % 1.34 % 4
std::format std::string and hex number by literal to std::string_mean 828 ns 828 ns 4
std::format std::string and hex number by literal to std::string_median 827 ns 827 ns 4
std::format std::string and hex number by literal to std::string_stddev 25.8 ns 25.8 ns 4
std::format std::string and hex number by literal to std::string_cv 3.11 % 3.11 % 4
Concat std::string and std::to_chars and string to std::string_mean 210 ns 210 ns 4
Concat std::string and std::to_chars and string to std::string_median 210 ns 210 ns 4
Concat std::string and std::to_chars and string to std::string_stddev 3.35 ns 3.35 ns 4
Concat std::string and std::to_chars and string to std::string_cv 1.60 % 1.60 % 4
Concat std::string and hex number and literal by StrExpr to std::string_mean 134 ns 134 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_median 134 ns 134 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_stddev 1.42 ns 1.42 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_cv 1.06 % 1.06 % 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 118 ns 118 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 0.602 ns 0.602 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 0.51 % 0.51 % 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 128 ns 128 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_median 126 ns 126 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 4.95 ns 4.95 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 3.87 % 3.87 % 4
Subst stringa and hex number by e_subst literal to simstr::stringa_mean 193 ns 193 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_median 187 ns 187 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 13.1 ns 13.1 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_cv 6.78 % 6.78 % 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 333 ns 333 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 324 ns 324 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 29.5 ns 29.5 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 8.88 % 8.88 % 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 271 ns 271 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 271 ns 271 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 1.20 ns 1.20 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 0.44 % 0.44 % 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 357 ns 357 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 357 ns 357 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 1.91 ns 1.91 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 0.54 % 0.54 % 4
e_vsubst(pattern, i / 0x8a010_fmt)_mean 621 ns 621 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_median 607 ns 607 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_stddev 47.0 ns 47.0 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_cv 7.56 % 7.56 % 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 723 ns 723 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 722 ns 722 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 12.0 ns 12.0 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 1.66 % 1.66 % 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 842 ns 842 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 840 ns 840 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 27.2 ns 27.2 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 3.22 % 3.22 % 4
std::format("abcdefghihklmopqr {:#010o} end", i)_mean 1017 ns 1017 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_median 1011 ns 1011 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 11.7 ns 11.7 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_cv 1.15 % 1.15 % 4
std::vformat(pattern, std::make_format_args(i))_mean 999 ns 999 ns 4
std::vformat(pattern, std::make_format_args(i))_median 994 ns 994 ns 4
std::vformat(pattern, std::make_format_args(i))_stddev 24.6 ns 24.6 ns 4
std::vformat(pattern, std::make_format_args(i))_cv 2.46 % 2.46 % 4
std::format with std::formatted_size_mean 1867 ns 1867 ns 4
std::format with std::formatted_size_median 1881 ns 1881 ns 4
std::format with std::formatted_size_stddev 33.7 ns 33.7 ns 4
std::format with std::formatted_size_cv 1.80 % 1.80 % 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 2074 ns 2074 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 2074 ns 2074 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 6.88 ns 6.87 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 0.33 % 0.33 % 4
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 51.7 ns 51.7 ns 4
Concat std::string by std to std::string_median 51.6 ns 51.6 ns 4
Concat std::string by std to std::string_stddev 0.623 ns 0.623 ns 4
Concat std::string by std to std::string_cv 1.21 % 1.21 % 4
Concat std::string by StrExpr to std::string_mean 36.9 ns 36.9 ns 4
Concat std::string by StrExpr to std::string_median 36.8 ns 36.8 ns 4
Concat std::string by StrExpr to std::string_stddev 0.272 ns 0.272 ns 4
Concat std::string by StrExpr to std::string_cv 0.74 % 0.74 % 4
Concat stringa by StrExpr to stringa_mean 31.6 ns 31.6 ns 4
Concat stringa by StrExpr to stringa_median 31.8 ns 31.8 ns 4
Concat stringa by StrExpr to stringa_stddev 0.842 ns 0.842 ns 4
Concat stringa by StrExpr to stringa_cv 2.66 % 2.66 % 4
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 112 ns 112 ns 4
Find concat three std::string_median 112 ns 112 ns 4
Find concat three std::string_stddev 2.70 ns 2.70 ns 4
Find concat three std::string_cv 2.41 % 2.41 % 4
Find concat three strexpr_mean 52.4 ns 52.4 ns 4
Find concat three strexpr_median 52.6 ns 52.6 ns 4
Find concat three strexpr_stddev 2.35 ns 2.35 ns 4
Find concat three strexpr_cv 4.48 % 4.48 % 4
Find concat three simstr_mean 18.9 ns 18.9 ns 4
Find concat three simstr_median 18.8 ns 18.8 ns 4
Find concat three simstr_stddev 0.278 ns 0.278 ns 4
Find concat three simstr_cv 1.47 % 1.47 % 4
Find concat three stringzilla string_mean 153 ns 153 ns 4
Find concat three stringzilla string_median 153 ns 153 ns 4
Find concat three stringzilla string_stddev 1.37 ns 1.37 ns 4
Find concat three stringzilla string_cv 0.90 % 0.90 % 4
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 7.58 ns 7.58 ns 4
BuildTypeNameStr 0/0_median 7.65 ns 7.65 ns 4
BuildTypeNameStr 0/0_stddev 0.170 ns 0.170 ns 4
BuildTypeNameStr 0/0_cv 2.25 % 2.25 % 4
BuildTypeNameExp 0/0_mean 6.94 ns 6.94 ns 4
BuildTypeNameExp 0/0_median 6.94 ns 6.94 ns 4
BuildTypeNameExp 0/0_stddev 0.141 ns 0.141 ns 4
BuildTypeNameExp 0/0_cv 2.03 % 2.03 % 4
BuildTypeNameSim 0/0_mean 5.03 ns 5.03 ns 4
BuildTypeNameSim 0/0_median 5.02 ns 5.02 ns 4
BuildTypeNameSim 0/0_stddev 0.096 ns 0.096 ns 4
BuildTypeNameSim 0/0_cv 1.91 % 1.91 % 4
BuildTypeNameStr 10/10_mean 59.1 ns 59.1 ns 4
BuildTypeNameStr 10/10_median 59.0 ns 59.0 ns 4
BuildTypeNameStr 10/10_stddev 2.58 ns 2.58 ns 4
BuildTypeNameStr 10/10_cv 4.37 % 4.37 % 4
BuildTypeNameExp 10/10_mean 31.0 ns 31.0 ns 4
BuildTypeNameExp 10/10_median 31.1 ns 31.1 ns 4
BuildTypeNameExp 10/10_stddev 0.361 ns 0.361 ns 4
BuildTypeNameExp 10/10_cv 1.16 % 1.16 % 4
BuildTypeNameSim 10/10_mean 23.4 ns 23.4 ns 4
BuildTypeNameSim 10/10_median 23.5 ns 23.5 ns 4
BuildTypeNameSim 10/10_stddev 0.470 ns 0.470 ns 4
BuildTypeNameSim 10/10_cv 2.01 % 2.01 % 4
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 210 ns 210 ns 4
Concat with replace str_median 209 ns 209 ns 4
Concat with replace str_stddev 4.51 ns 4.51 ns 4
Concat with replace str_cv 2.14 % 2.14 % 4
Concat with replace exp_mean 154 ns 154 ns 4
Concat with replace exp_median 154 ns 154 ns 4
Concat with replace exp_stddev 1.87 ns 1.87 ns 4
Concat with replace exp_cv 1.22 % 1.22 % 4
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 1.13 ns 1.13 ns 4
std::string e;_median 1.14 ns 1.14 ns 4
std::string e;_stddev 0.019 ns 0.019 ns 4
std::string e;_cv 1.68 % 1.68 % 4
std::string_view e;_mean 0.377 ns 0.377 ns 4
std::string_view e;_median 0.377 ns 0.377 ns 4
std::string_view e;_stddev 0.006 ns 0.006 ns 4
std::string_view e;_cv 1.57 % 1.57 % 4
ssa e;_mean 0.372 ns 0.372 ns 4
ssa e;_median 0.371 ns 0.371 ns 4
ssa e;_stddev 0.005 ns 0.005 ns 4
ssa e;_cv 1.34 % 1.34 % 4
stringa e;_mean 0.763 ns 0.763 ns 4
stringa e;_median 0.759 ns 0.759 ns 4
stringa e;_stddev 0.012 ns 0.012 ns 4
stringa e;_cv 1.61 % 1.61 % 4
lstringa<20> e;_mean 1.14 ns 1.14 ns 4
lstringa<20> e;_median 1.13 ns 1.13 ns 4
lstringa<20> e;_stddev 0.015 ns 0.015 ns 4
lstringa<20> e;_cv 1.36 % 1.36 % 4
lstringa<40> e;_mean 1.14 ns 1.14 ns 4
lstringa<40> e;_median 1.12 ns 1.12 ns 4
lstringa<40> e;_stddev 0.026 ns 0.026 ns 4
lstringa<40> e;_cv 2.27 % 2.27 % 4
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 1.87 ns 1.87 ns 4
std::string e = "Test text";_median 1.87 ns 1.87 ns 4
std::string e = "Test text";_stddev 0.027 ns 0.027 ns 4
std::string e = "Test text";_cv 1.46 % 1.46 % 4
std::string_view e = "Test text";_mean 0.761 ns 0.761 ns 4
std::string_view e = "Test text";_median 0.765 ns 0.765 ns 4
std::string_view e = "Test text";_stddev 0.010 ns 0.010 ns 4
std::string_view e = "Test text";_cv 1.36 % 1.36 % 4
ssa e = "Test text";_mean 0.382 ns 0.382 ns 4
ssa e = "Test text";_median 0.382 ns 0.382 ns 4
ssa e = "Test text";_stddev 0.005 ns 0.005 ns 4
ssa e = "Test text";_cv 1.41 % 1.41 % 4
stringa e = "Test text";_mean 1.15 ns 1.15 ns 4
stringa e = "Test text";_median 1.14 ns 1.14 ns 4
stringa e = "Test text";_stddev 0.029 ns 0.029 ns 4
stringa e = "Test text";_cv 2.50 % 2.50 % 4
lstringa<20> e = "Test text";_mean 1.90 ns 1.90 ns 4
lstringa<20> e = "Test text";_median 1.90 ns 1.90 ns 4
lstringa<20> e = "Test text";_stddev 0.045 ns 0.045 ns 4
lstringa<20> e = "Test text";_cv 2.37 % 2.36 % 4
lstringa<40> e = "Test text";_mean 1.88 ns 1.88 ns 4
lstringa<40> e = "Test text";_median 1.87 ns 1.87 ns 4
lstringa<40> e = "Test text";_stddev 0.046 ns 0.046 ns 4
lstringa<40> e = "Test text";_cv 2.46 % 2.46 % 4
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 19.5 ns 19.5 ns 4
std::string e = "123456789012345678901234567890";_median 19.3 ns 19.3 ns 4
std::string e = "123456789012345678901234567890";_stddev 0.398 ns 0.398 ns 4
std::string e = "123456789012345678901234567890";_cv 2.04 % 2.04 % 4
std::string_view e = "123456789012345678901234567890";_mean 0.763 ns 0.763 ns 4
std::string_view e = "123456789012345678901234567890";_median 0.764 ns 0.764 ns 4
std::string_view e = "123456789012345678901234567890";_stddev 0.008 ns 0.008 ns 4
std::string_view e = "123456789012345678901234567890";_cv 1.10 % 1.10 % 4
ssa e = "123456789012345678901234567890";_mean 0.375 ns 0.375 ns 4
ssa e = "123456789012345678901234567890";_median 0.374 ns 0.374 ns 4
ssa e = "123456789012345678901234567890";_stddev 0.005 ns 0.005 ns 4
ssa e = "123456789012345678901234567890";_cv 1.45 % 1.45 % 4
stringa e = "123456789012345678901234567890";_mean 1.14 ns 1.14 ns 4
stringa e = "123456789012345678901234567890";_median 1.13 ns 1.13 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 18.0 ns 18.0 ns 4
lstringa<20> e = "123456789012345678901234567890";_median 18.0 ns 18.0 ns 4
lstringa<20> e = "123456789012345678901234567890";_stddev 0.581 ns 0.581 ns 4
lstringa<20> e = "123456789012345678901234567890";_cv 3.22 % 3.22 % 4
lstringa<40> e = "123456789012345678901234567890";_mean 2.68 ns 2.68 ns 4
lstringa<40> e = "123456789012345678901234567890";_median 2.67 ns 2.67 ns 4
lstringa<40> e = "123456789012345678901234567890";_stddev 0.020 ns 0.020 ns 4
lstringa<40> e = "123456789012345678901234567890";_cv 0.73 % 0.73 % 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.77 ns 5.77 ns 4
std::string e = "Test text"; auto c{e};_median 5.75 ns 5.75 ns 4
std::string e = "Test text"; auto c{e};_stddev 0.095 ns 0.095 ns 4
std::string e = "Test text"; auto c{e};_cv 1.64 % 1.64 % 4
std::string_view e = "Test text"; auto c{e};_mean 0.388 ns 0.388 ns 4
std::string_view e = "Test text"; auto c{e};_median 0.379 ns 0.379 ns 4
std::string_view e = "Test text"; auto c{e};_stddev 0.022 ns 0.022 ns 4
std::string_view e = "Test text"; auto c{e};_cv 5.79 % 5.79 % 4
ssa e = "Test text"; auto c{e};_mean 0.380 ns 0.380 ns 4
ssa e = "Test text"; auto c{e};_median 0.382 ns 0.382 ns 4
ssa e = "Test text"; auto c{e};_stddev 0.005 ns 0.005 ns 4
ssa e = "Test text"; auto c{e};_cv 1.43 % 1.43 % 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.016 ns 0.016 ns 4
stringa e = "Test text"; auto c{e};_cv 1.46 % 1.46 % 4
lstringa<20> e = "Test text"; auto c{e};_mean 1.14 ns 1.14 ns 4
lstringa<20> e = "Test text"; auto c{e};_median 1.13 ns 1.13 ns 4
lstringa<20> e = "Test text"; auto c{e};_stddev 0.024 ns 0.024 ns 4
lstringa<20> e = "Test text"; auto c{e};_cv 2.13 % 2.13 % 4
lstringa<40> e = "Test text"; auto c{e};_mean 1.15 ns 1.15 ns 4
lstringa<40> e = "Test text"; auto c{e};_median 1.15 ns 1.15 ns 4
lstringa<40> e = "Test text"; auto c{e};_stddev 0.014 ns 0.014 ns 4
lstringa<40> e = "Test text"; auto c{e};_cv 1.19 % 1.19 % 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 20.2 ns 20.2 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_median 20.2 ns 20.2 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.353 ns 0.353 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_cv 1.75 % 1.75 % 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.758 ns 0.758 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.754 ns 0.755 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.009 ns 0.009 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.19 % 1.19 % 4
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.374 ns 0.374 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.374 ns 0.374 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.002 ns 0.002 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_cv 0.58 % 0.59 % 4
stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.14 ns 1.14 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_median 1.14 ns 1.14 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.014 ns 0.014 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_cv 1.23 % 1.23 % 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 19.1 ns 19.1 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 19.1 ns 19.1 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.086 ns 0.086 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 0.45 % 0.45 % 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.98 ns 4.98 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 5.03 ns 5.03 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.146 ns 0.146 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 2.94 % 2.94 % 4
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
sz::string::find;_mean 95.9 ns 95.9 ns 4
sz::string::find;_median 95.8 ns 95.8 ns 4
sz::string::find;_stddev 1.48 ns 1.48 ns 4
sz::string::find;_cv 1.54 % 1.54 % 4
std::string::find;_mean 7.34 ns 7.34 ns 4
std::string::find;_median 7.33 ns 7.33 ns 4
std::string::find;_stddev 0.128 ns 0.128 ns 4
std::string::find;_cv 1.75 % 1.75 % 4
std::string_view::find;_mean 7.81 ns 7.81 ns 4
std::string_view::find;_median 7.78 ns 7.78 ns 4
std::string_view::find;_stddev 0.124 ns 0.124 ns 4
std::string_view::find;_cv 1.59 % 1.59 % 4
ssa::find;_mean 7.37 ns 7.37 ns 4
ssa::find;_median 7.37 ns 7.37 ns 4
ssa::find;_stddev 0.149 ns 0.149 ns 4
ssa::find;_cv 2.02 % 2.02 % 4
stringa::find;_mean 8.14 ns 8.14 ns 4
stringa::find;_median 8.14 ns 8.14 ns 4
stringa::find;_stddev 0.027 ns 0.027 ns 4
stringa::find;_cv 0.33 % 0.33 % 4
lstringa<20>::find;_mean 6.94 ns 6.94 ns 4
lstringa<20>::find;_median 6.90 ns 6.90 ns 4
lstringa<20>::find;_stddev 0.118 ns 0.118 ns 4
lstringa<20>::find;_cv 1.70 % 1.70 % 4
lstringa<40>::find;_mean 6.93 ns 6.93 ns 4
lstringa<40>::find;_median 6.92 ns 6.92 ns 4
lstringa<40>::find;_stddev 0.091 ns 0.091 ns 4
lstringa<40>::find;_cv 1.31 % 1.31 % 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.78 ns 5.78 ns 4
std::string copy{str_with_len_N};/15_median 5.78 ns 5.78 ns 4
std::string copy{str_with_len_N};/15_stddev 0.153 ns 0.153 ns 4
std::string copy{str_with_len_N};/15_cv 2.64 % 2.64 % 4
std::string copy{str_with_len_N};/16_mean 24.5 ns 24.5 ns 4
std::string copy{str_with_len_N};/16_median 24.6 ns 24.6 ns 4
std::string copy{str_with_len_N};/16_stddev 1.08 ns 1.08 ns 4
std::string copy{str_with_len_N};/16_cv 4.42 % 4.42 % 4
std::string copy{str_with_len_N};/23_mean 28.5 ns 28.5 ns 4
std::string copy{str_with_len_N};/23_median 28.6 ns 28.6 ns 4
std::string copy{str_with_len_N};/23_stddev 0.346 ns 0.346 ns 4
std::string copy{str_with_len_N};/23_cv 1.21 % 1.21 % 4
std::string copy{str_with_len_N};/24_mean 23.3 ns 23.3 ns 4
std::string copy{str_with_len_N};/24_median 23.3 ns 23.3 ns 4
std::string copy{str_with_len_N};/24_stddev 0.222 ns 0.222 ns 4
std::string copy{str_with_len_N};/24_cv 0.95 % 0.95 % 4
std::string copy{str_with_len_N};/32_mean 23.2 ns 23.2 ns 4
std::string copy{str_with_len_N};/32_median 23.3 ns 23.3 ns 4
std::string copy{str_with_len_N};/32_stddev 0.377 ns 0.377 ns 4
std::string copy{str_with_len_N};/32_cv 1.62 % 1.62 % 4
std::string copy{str_with_len_N};/64_mean 23.3 ns 23.3 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.320 ns 0.320 ns 4
std::string copy{str_with_len_N};/64_cv 1.37 % 1.37 % 4
std::string copy{str_with_len_N};/128_mean 24.9 ns 24.9 ns 4
std::string copy{str_with_len_N};/128_median 24.9 ns 24.9 ns 4
std::string copy{str_with_len_N};/128_stddev 0.584 ns 0.584 ns 4
std::string copy{str_with_len_N};/128_cv 2.34 % 2.34 % 4
std::string copy{str_with_len_N};/256_mean 26.0 ns 26.0 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 1.69 ns 1.69 ns 4
std::string copy{str_with_len_N};/256_cv 6.53 % 6.53 % 4
std::string copy{str_with_len_N};/512_mean 29.4 ns 29.4 ns 4
std::string copy{str_with_len_N};/512_median 29.5 ns 29.5 ns 4
std::string copy{str_with_len_N};/512_stddev 0.683 ns 0.683 ns 4
std::string copy{str_with_len_N};/512_cv 2.32 % 2.32 % 4
std::string copy{str_with_len_N};/1024_mean 47.7 ns 47.7 ns 4
std::string copy{str_with_len_N};/1024_median 47.8 ns 47.8 ns 4
std::string copy{str_with_len_N};/1024_stddev 0.457 ns 0.457 ns 4
std::string copy{str_with_len_N};/1024_cv 0.96 % 0.96 % 4
std::string copy{str_with_len_N};/2048_mean 125 ns 125 ns 4
std::string copy{str_with_len_N};/2048_median 125 ns 125 ns 4
std::string copy{str_with_len_N};/2048_stddev 3.96 ns 3.96 ns 4
std::string copy{str_with_len_N};/2048_cv 3.17 % 3.17 % 4
std::string copy{str_with_len_N};/4096_mean 152 ns 152 ns 4
std::string copy{str_with_len_N};/4096_median 154 ns 154 ns 4
std::string copy{str_with_len_N};/4096_stddev 4.76 ns 4.76 ns 4
std::string copy{str_with_len_N};/4096_cv 3.13 % 3.13 % 4
stringa copy{str_with_len_N};/15_mean 1.12 ns 1.12 ns 4
stringa copy{str_with_len_N};/15_median 1.12 ns 1.12 ns 4
stringa copy{str_with_len_N};/15_stddev 0.013 ns 0.013 ns 4
stringa copy{str_with_len_N};/15_cv 1.17 % 1.17 % 4
stringa copy{str_with_len_N};/16_mean 1.13 ns 1.13 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.021 ns 0.021 ns 4
stringa copy{str_with_len_N};/16_cv 1.88 % 1.88 % 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.12 ns 1.12 ns 4
stringa copy{str_with_len_N};/23_stddev 0.019 ns 0.019 ns 4
stringa copy{str_with_len_N};/23_cv 1.67 % 1.67 % 4
stringa copy{str_with_len_N};/24_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/24_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/24_stddev 0.135 ns 0.135 ns 4
stringa copy{str_with_len_N};/24_cv 0.82 % 0.82 % 4
stringa copy{str_with_len_N};/32_mean 16.3 ns 16.3 ns 4
stringa copy{str_with_len_N};/32_median 16.3 ns 16.3 ns 4
stringa copy{str_with_len_N};/32_stddev 0.180 ns 0.180 ns 4
stringa copy{str_with_len_N};/32_cv 1.10 % 1.10 % 4
stringa copy{str_with_len_N};/64_mean 16.3 ns 16.3 ns 4
stringa copy{str_with_len_N};/64_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/64_stddev 0.113 ns 0.113 ns 4
stringa copy{str_with_len_N};/64_cv 0.69 % 0.69 % 4
stringa copy{str_with_len_N};/128_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/128_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/128_stddev 0.085 ns 0.085 ns 4
stringa copy{str_with_len_N};/128_cv 0.52 % 0.52 % 4
stringa copy{str_with_len_N};/256_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/256_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/256_stddev 0.068 ns 0.068 ns 4
stringa copy{str_with_len_N};/256_cv 0.42 % 0.42 % 4
stringa copy{str_with_len_N};/512_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/512_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/512_stddev 0.072 ns 0.072 ns 4
stringa copy{str_with_len_N};/512_cv 0.44 % 0.44 % 4
stringa copy{str_with_len_N};/1024_mean 16.3 ns 16.3 ns 4
stringa copy{str_with_len_N};/1024_median 16.3 ns 16.3 ns 4
stringa copy{str_with_len_N};/1024_stddev 0.069 ns 0.069 ns 4
stringa copy{str_with_len_N};/1024_cv 0.42 % 0.42 % 4
stringa copy{str_with_len_N};/2048_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/2048_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/2048_stddev 0.041 ns 0.041 ns 4
stringa copy{str_with_len_N};/2048_cv 0.25 % 0.25 % 4
stringa copy{str_with_len_N};/4096_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/4096_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/4096_stddev 0.080 ns 0.080 ns 4
stringa copy{str_with_len_N};/4096_cv 0.49 % 0.49 % 4
lstringa<16> copy{str_with_len_N};/15_mean 1.14 ns 1.14 ns 4
lstringa<16> copy{str_with_len_N};/15_median 1.13 ns 1.13 ns 4
lstringa<16> copy{str_with_len_N};/15_stddev 0.024 ns 0.024 ns 4
lstringa<16> copy{str_with_len_N};/15_cv 2.09 % 2.09 % 4
lstringa<16> copy{str_with_len_N};/16_mean 5.10 ns 5.10 ns 4
lstringa<16> copy{str_with_len_N};/16_median 5.10 ns 5.10 ns 4
lstringa<16> copy{str_with_len_N};/16_stddev 0.076 ns 0.076 ns 4
lstringa<16> copy{str_with_len_N};/16_cv 1.49 % 1.49 % 4
lstringa<16> copy{str_with_len_N};/23_mean 5.16 ns 5.16 ns 4
lstringa<16> copy{str_with_len_N};/23_median 5.14 ns 5.14 ns 4
lstringa<16> copy{str_with_len_N};/23_stddev 0.062 ns 0.062 ns 4
lstringa<16> copy{str_with_len_N};/23_cv 1.21 % 1.21 % 4
lstringa<16> copy{str_with_len_N};/24_mean 21.9 ns 21.9 ns 4
lstringa<16> copy{str_with_len_N};/24_median 22.0 ns 22.0 ns 4
lstringa<16> copy{str_with_len_N};/24_stddev 0.377 ns 0.377 ns 4
lstringa<16> copy{str_with_len_N};/24_cv 1.72 % 1.72 % 4
lstringa<16> copy{str_with_len_N};/32_mean 22.1 ns 22.1 ns 4
lstringa<16> copy{str_with_len_N};/32_median 22.0 ns 22.0 ns 4
lstringa<16> copy{str_with_len_N};/32_stddev 0.310 ns 0.310 ns 4
lstringa<16> copy{str_with_len_N};/32_cv 1.41 % 1.41 % 4
lstringa<16> copy{str_with_len_N};/64_mean 23.4 ns 23.4 ns 4
lstringa<16> copy{str_with_len_N};/64_median 23.3 ns 23.3 ns 4
lstringa<16> copy{str_with_len_N};/64_stddev 0.348 ns 0.348 ns 4
lstringa<16> copy{str_with_len_N};/64_cv 1.49 % 1.49 % 4
lstringa<16> copy{str_with_len_N};/128_mean 24.5 ns 24.5 ns 4
lstringa<16> copy{str_with_len_N};/128_median 24.6 ns 24.6 ns 4
lstringa<16> copy{str_with_len_N};/128_stddev 0.410 ns 0.410 ns 4
lstringa<16> copy{str_with_len_N};/128_cv 1.67 % 1.67 % 4
lstringa<16> copy{str_with_len_N};/256_mean 25.4 ns 25.4 ns 4
lstringa<16> copy{str_with_len_N};/256_median 25.4 ns 25.4 ns 4
lstringa<16> copy{str_with_len_N};/256_stddev 0.347 ns 0.347 ns 4
lstringa<16> copy{str_with_len_N};/256_cv 1.37 % 1.37 % 4
lstringa<16> copy{str_with_len_N};/512_mean 28.6 ns 28.6 ns 4
lstringa<16> copy{str_with_len_N};/512_median 28.6 ns 28.6 ns 4
lstringa<16> copy{str_with_len_N};/512_stddev 0.490 ns 0.490 ns 4
lstringa<16> copy{str_with_len_N};/512_cv 1.71 % 1.71 % 4
lstringa<16> copy{str_with_len_N};/1024_mean 98.9 ns 98.9 ns 4
lstringa<16> copy{str_with_len_N};/1024_median 97.3 ns 97.3 ns 4
lstringa<16> copy{str_with_len_N};/1024_stddev 5.56 ns 5.56 ns 4
lstringa<16> copy{str_with_len_N};/1024_cv 5.62 % 5.62 % 4
lstringa<16> copy{str_with_len_N};/2048_mean 103 ns 103 ns 4
lstringa<16> copy{str_with_len_N};/2048_median 103 ns 103 ns 4
lstringa<16> copy{str_with_len_N};/2048_stddev 1.53 ns 1.53 ns 4
lstringa<16> copy{str_with_len_N};/2048_cv 1.48 % 1.48 % 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 5.22 ns 5.22 ns 4
lstringa<16> copy{str_with_len_N};/4096_cv 4.29 % 4.29 % 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.13 ns 1.13 ns 4
lstringa<512> copy{str_with_len_N};/15_stddev 0.011 ns 0.011 ns 4
lstringa<512> copy{str_with_len_N};/15_cv 0.95 % 0.95 % 4
lstringa<512> copy{str_with_len_N};/16_mean 5.00 ns 5.00 ns 4
lstringa<512> copy{str_with_len_N};/16_median 5.05 ns 5.05 ns 4
lstringa<512> copy{str_with_len_N};/16_stddev 0.126 ns 0.126 ns 4
lstringa<512> copy{str_with_len_N};/16_cv 2.52 % 2.52 % 4
lstringa<512> copy{str_with_len_N};/23_mean 4.92 ns 4.92 ns 4
lstringa<512> copy{str_with_len_N};/23_median 4.87 ns 4.87 ns 4
lstringa<512> copy{str_with_len_N};/23_stddev 0.113 ns 0.113 ns 4
lstringa<512> copy{str_with_len_N};/23_cv 2.30 % 2.30 % 4
lstringa<512> copy{str_with_len_N};/24_mean 29.6 ns 29.6 ns 4
lstringa<512> copy{str_with_len_N};/24_median 29.5 ns 29.5 ns 4
lstringa<512> copy{str_with_len_N};/24_stddev 0.353 ns 0.353 ns 4
lstringa<512> copy{str_with_len_N};/24_cv 1.19 % 1.19 % 4
lstringa<512> copy{str_with_len_N};/32_mean 29.6 ns 29.6 ns 4
lstringa<512> copy{str_with_len_N};/32_median 29.6 ns 29.6 ns 4
lstringa<512> copy{str_with_len_N};/32_stddev 0.133 ns 0.133 ns 4
lstringa<512> copy{str_with_len_N};/32_cv 0.45 % 0.45 % 4
lstringa<512> copy{str_with_len_N};/64_mean 30.2 ns 30.2 ns 4
lstringa<512> copy{str_with_len_N};/64_median 30.2 ns 30.2 ns 4
lstringa<512> copy{str_with_len_N};/64_stddev 0.095 ns 0.095 ns 4
lstringa<512> copy{str_with_len_N};/64_cv 0.31 % 0.31 % 4
lstringa<512> copy{str_with_len_N};/128_mean 30.5 ns 30.5 ns 4
lstringa<512> copy{str_with_len_N};/128_median 30.5 ns 30.5 ns 4
lstringa<512> copy{str_with_len_N};/128_stddev 0.108 ns 0.108 ns 4
lstringa<512> copy{str_with_len_N};/128_cv 0.35 % 0.35 % 4
lstringa<512> copy{str_with_len_N};/256_mean 21.7 ns 21.7 ns 4
lstringa<512> copy{str_with_len_N};/256_median 21.7 ns 21.7 ns 4
lstringa<512> copy{str_with_len_N};/256_stddev 0.257 ns 0.257 ns 4
lstringa<512> copy{str_with_len_N};/256_cv 1.19 % 1.19 % 4
lstringa<512> copy{str_with_len_N};/512_mean 24.7 ns 24.7 ns 4
lstringa<512> copy{str_with_len_N};/512_median 24.6 ns 24.6 ns 4
lstringa<512> copy{str_with_len_N};/512_stddev 0.267 ns 0.267 ns 4
lstringa<512> copy{str_with_len_N};/512_cv 1.08 % 1.08 % 4
lstringa<512> copy{str_with_len_N};/1024_mean 96.9 ns 96.9 ns 4
lstringa<512> copy{str_with_len_N};/1024_median 96.8 ns 96.8 ns 4
lstringa<512> copy{str_with_len_N};/1024_stddev 1.87 ns 1.87 ns 4
lstringa<512> copy{str_with_len_N};/1024_cv 1.93 % 1.93 % 4
lstringa<512> copy{str_with_len_N};/2048_mean 106 ns 106 ns 4
lstringa<512> copy{str_with_len_N};/2048_median 107 ns 107 ns 4
lstringa<512> copy{str_with_len_N};/2048_stddev 2.33 ns 2.33 ns 4
lstringa<512> copy{str_with_len_N};/2048_cv 2.20 % 2.20 % 4
lstringa<512> copy{str_with_len_N};/4096_mean 123 ns 123 ns 4
lstringa<512> copy{str_with_len_N};/4096_median 123 ns 123 ns 4
lstringa<512> copy{str_with_len_N};/4096_stddev 1.45 ns 1.45 ns 4
lstringa<512> copy{str_with_len_N};/4096_cv 1.19 % 1.19 % 4
----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 26.9 ns 26.9 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 26.9 ns 26.9 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.215 ns 0.215 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 0.80 % 0.80 % 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 14.9 ns 14.9 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 14.9 ns 14.9 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.293 ns 0.293 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 1.97 % 1.97 % 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 9.36 ns 9.36 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 9.36 ns 9.36 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.047 ns 0.047 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 0.50 % 0.50 % 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 9.52 ns 9.52 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 9.50 ns 9.50 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.079 ns 0.079 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 0.83 % 0.83 % 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 9.61 ns 9.61 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 9.59 ns 9.59 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.146 ns 0.146 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.52 % 1.52 % 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.5 ns 24.5 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 24.4 ns 24.4 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.615 ns 0.615 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.51 % 2.51 % 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.59 ns 9.59 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.63 ns 9.63 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.166 ns 0.166 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.73 % 1.73 % 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 8.04 ns 8.04 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 8.04 ns 8.04 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.114 ns 0.114 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.41 % 1.41 % 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 7.57 ns 7.57 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 7.52 ns 7.52 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.139 ns 0.139 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.84 % 1.84 % 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 7.82 ns 7.82 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 7.82 ns 7.82 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.025 ns 0.025 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 0.32 % 0.32 % 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.2 ns 29.2 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 29.1 ns 29.1 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.09 ns 1.09 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 3.74 % 3.74 % 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 11.0 ns 11.0 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 11.0 ns 11.0 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.152 ns 0.152 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 1.39 % 1.39 % 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 13.3 ns 13.3 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 13.2 ns 13.2 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.137 ns 0.137 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 1.03 % 1.03 % 4
----- Convert to double '1234.567e10' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 66.6 ns 66.6 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 66.0 ns 66.0 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 1.62 ns 1.62 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 2.43 % 2.43 % 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 24.5 ns 24.5 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 24.5 ns 24.5 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.348 ns 0.348 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.42 % 1.42 % 4
ssa s = "1234.567e10"; double res = *s.to_double()_mean 26.8 ns 26.8 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_median 26.8 ns 26.8 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.384 ns 0.384 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_cv 1.43 % 1.43 % 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 1424 ns 1424 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_median 1429 ns 1429 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 35.2 ns 35.2 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 2.47 % 2.47 % 4
std::string str; ... str += "abbaabbaabbaabba";_mean 445 ns 445 ns 4
std::string str; ... str += "abbaabbaabbaabba";_median 446 ns 446 ns 4
std::string str; ... str += "abbaabbaabbaabba";_stddev 7.09 ns 7.08 ns 4
std::string str; ... str += "abbaabbaabbaabba";_cv 1.59 % 1.59 % 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 388 ns 388 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 388 ns 388 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 3.37 ns 3.37 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 0.87 % 0.87 % 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 276 ns 276 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 278 ns 278 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 7.15 ns 7.15 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 2.59 % 2.59 % 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 219 ns 219 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 224 ns 224 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 11.1 ns 11.1 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 5.04 % 5.04 % 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 137 ns 137 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 137 ns 137 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 0.634 ns 0.634 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 0.46 % 0.46 % 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 1426 ns 1426 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1428 ns 1428 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 39.2 ns 39.2 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.75 % 2.75 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1288 ns 1288 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1289 ns 1289 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 12.9 ns 12.9 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 1.01 % 1.01 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 426 ns 426 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 426 ns 426 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 5.08 ns 5.08 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.19 % 1.19 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 340 ns 340 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 346 ns 346 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 14.2 ns 14.2 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.17 % 4.17 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 313 ns 313 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 314 ns 314 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 11.6 ns 11.6 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.71 % 3.71 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 217 ns 217 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 218 ns 218 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 6.95 ns 6.95 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.21 % 3.21 % 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 75809 ns 75810 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 75636 ns 75637 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 1270 ns 1270 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 1.68 % 1.68 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 73098 ns 73098 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 73402 ns 73402 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1487 ns 1487 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.03 % 2.03 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 19767 ns 19767 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 19715 ns 19715 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 326 ns 326 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.65 % 1.65 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17379 ns 17379 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17356 ns 17356 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 164 ns 164 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 0.94 % 0.94 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16895 ns 16895 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16961 ns 16961 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 186 ns 186 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.10 % 1.10 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17082 ns 17082 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17027 ns 17027 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 244 ns 244 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.43 % 1.43 % 4
-- Append 2 string of 16 bytes 32 times, 1024 total length --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; ... str << str_var1 << str_var2;_mean 1469 ns 1469 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_median 1481 ns 1481 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_stddev 31.4 ns 31.4 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_cv 2.14 % 2.14 % 4
std::string str; ... str += str_var1 + str_var2;_mean 1415 ns 1415 ns 4
std::string str; ... str += str_var1 + str_var2;_median 1404 ns 1404 ns 4
std::string str; ... str += str_var1 + str_var2;_stddev 26.0 ns 26.0 ns 4
std::string str; ... str += str_var1 + str_var2;_cv 1.84 % 1.84 % 4
lstringa<16> str; ... str += str_var1 + str_var2;_mean 527 ns 527 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_median 525 ns 525 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 8.07 ns 8.07 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_cv 1.53 % 1.53 % 4
lstringa<128> str; ... str += str_var1 + str_var2;_mean 465 ns 465 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_median 469 ns 469 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 22.5 ns 22.5 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_cv 4.85 % 4.85 % 4
lstringa<512> str; ... str += str_var1 + str_var2;_mean 408 ns 408 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_median 415 ns 415 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 20.7 ns 20.7 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_cv 5.06 % 5.06 % 4
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 309 ns 309 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_median 310 ns 310 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 3.18 ns 3.18 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.03 % 1.03 % 4
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 3067 ns 3067 ns 4
std::stringstream str; str << "test = " << k << " times";_median 3055 ns 3055 ns 4
std::stringstream str; str << "test = " << k << " times";_stddev 47.1 ns 47.1 ns 4
std::stringstream str; str << "test = " << k << " times";_cv 1.54 % 1.54 % 4
std::string str = "test = " + std::to_string(k) + " times";_mean 457 ns 457 ns 4
std::string str = "test = " + std::to_string(k) + " times";_median 457 ns 457 ns 4
std::string str = "test = " + std::to_string(k) + " times";_stddev 4.69 ns 4.69 ns 4
std::string str = "test = " + std::to_string(k) + " times";_cv 1.03 % 1.03 % 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1393 ns 1393 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1390 ns 1390 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 25.7 ns 25.6 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.84 % 1.84 % 4
std::string str = std::format("test = {} times", k);_mean 1140 ns 1140 ns 4
std::string str = std::format("test = {} times", k);_median 1150 ns 1150 ns 4
std::string str = std::format("test = {} times", k);_stddev 32.3 ns 32.3 ns 4
std::string str = std::format("test = {} times", k);_cv 2.83 % 2.83 % 4
lstringa<8> str; str.format("test = {} times", k);_mean 1356 ns 1356 ns 4
lstringa<8> str; str.format("test = {} times", k);_median 1349 ns 1349 ns 4
lstringa<8> str; str.format("test = {} times", k);_stddev 39.1 ns 39.1 ns 4
lstringa<8> str; str.format("test = {} times", k);_cv 2.88 % 2.88 % 4
lstringa<32> str; str.format("test = {} times", k);_mean 1002 ns 1003 ns 4
lstringa<32> str; str.format("test = {} times", k);_median 1005 ns 1005 ns 4
lstringa<32> str; str.format("test = {} times", k);_stddev 24.7 ns 24.7 ns 4
lstringa<32> str; str.format("test = {} times", k);_cv 2.46 % 2.46 % 4
lstringa<8> str = "test = " + k + " times";_mean 262 ns 262 ns 4
lstringa<8> str = "test = " + k + " times";_median 261 ns 261 ns 4
lstringa<8> str = "test = " + k + " times";_stddev 3.40 ns 3.40 ns 4
lstringa<8> str = "test = " + k + " times";_cv 1.30 % 1.30 % 4
lstringa<32> str = "test = " + k + " times";_mean 126 ns 126 ns 4
lstringa<32> str = "test = " + k + " times";_median 126 ns 126 ns 4
lstringa<32> str = "test = " + k + " times";_stddev 0.511 ns 0.511 ns 4
lstringa<32> str = "test = " + k + " times";_cv 0.40 % 0.40 % 4
stringa str = "test = " + k + " times";_mean 124 ns 124 ns 4
stringa str = "test = " + k + " times";_median 124 ns 124 ns 4
stringa str = "test = " + k + " times";_stddev 3.39 ns 3.39 ns 4
stringa str = "test = " + k + " times";_cv 2.74 % 2.74 % 4
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 270 ns 270 ns 4
std::string::find + substr + std::strtol_median 268 ns 268 ns 4
std::string::find + substr + std::strtol_stddev 7.54 ns 7.54 ns 4
std::string::find + substr + std::strtol_cv 2.79 % 2.79 % 4
ssa::splitter + ssa::as_int_mean 156 ns 156 ns 4
ssa::splitter + ssa::as_int_median 156 ns 156 ns 4
ssa::splitter + ssa::as_int_stddev 1.99 ns 1.99 ns 4
ssa::splitter + ssa::as_int_cv 1.28 % 1.28 % 4
ssa::splitf + functor_mean 207 ns 207 ns 4
ssa::splitf + functor_median 207 ns 207 ns 4
ssa::splitf + functor_stddev 2.33 ns 2.33 ns 4
ssa::splitf + functor_cv 1.12 % 1.12 % 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 844 ns 844 ns 4
Naive (and wrong) replace symbols with std::string find + replace_median 846 ns 846 ns 4
Naive (and wrong) replace symbols with std::string find + replace_stddev 8.40 ns 8.40 ns 4
Naive (and wrong) replace symbols with std::string find + replace_cv 1.00 % 1.00 % 4
replace symbols with std::string find_first_of + replace_mean 2647 ns 2647 ns 4
replace symbols with std::string find_first_of + replace_median 2649 ns 2649 ns 4
replace symbols with std::string find_first_of + replace_stddev 41.4 ns 41.4 ns 4
replace symbols with std::string find_first_of + replace_cv 1.56 % 1.56 % 4
replace symbols with std::string_view find_first_of + copy_mean 1123 ns 1123 ns 4
replace symbols with std::string_view find_first_of + copy_median 1119 ns 1119 ns 4
replace symbols with std::string_view find_first_of + copy_stddev 27.0 ns 27.0 ns 4
replace symbols with std::string_view find_first_of + copy_cv 2.40 % 2.40 % 4
replace runtime symbols with string expressions and without remembering all search results_mean 1273 ns 1273 ns 4
replace runtime symbols with string expressions and without remembering all search results_median 1269 ns 1269 ns 4
replace runtime symbols with string expressions and without remembering all search results_stddev 42.9 ns 42.9 ns 4
replace runtime symbols with string expressions and without remembering all search results_cv 3.37 % 3.37 % 4
replace runtime symbols with simstr and memorization of all search results_mean 1067 ns 1067 ns 4
replace runtime symbols with simstr and memorization of all search results_median 1068 ns 1068 ns 4
replace runtime symbols with simstr and memorization of all search results_stddev 9.03 ns 9.03 ns 4
replace runtime symbols with simstr and memorization of all search results_cv 0.85 % 0.85 % 4
replace const symbols with string expressions and without remembering all search results_mean 1029 ns 1029 ns 4
replace const symbols with string expressions and without remembering all search results_median 1021 ns 1021 ns 4
replace const symbols with string expressions and without remembering all search results_stddev 24.0 ns 24.0 ns 4
replace const symbols with string expressions and without remembering all search results_cv 2.33 % 2.33 % 4
replace const symbols with string expressions and memorization of all search results_mean 887 ns 887 ns 4
replace const symbols with string expressions and memorization of all search results_median 884 ns 884 ns 4
replace const symbols with string expressions and memorization of all search results_stddev 19.8 ns 19.8 ns 4
replace const symbols with string expressions and memorization of all search results_cv 2.23 % 2.23 % 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 166 ns 166 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_median 166 ns 166 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 1.88 ns 1.88 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_cv 1.13 % 1.13 % 4
Short replace symbols with std::string find_first_of + replace_mean 334 ns 334 ns 4
Short replace symbols with std::string find_first_of + replace_median 334 ns 334 ns 4
Short replace symbols with std::string find_first_of + replace_stddev 5.22 ns 5.23 ns 4
Short replace symbols with std::string find_first_of + replace_cv 1.57 % 1.57 % 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 152 ns 152 ns 4
Short replace symbols with std::string_view find_first_of + copy_stddev 4.50 ns 4.50 ns 4
Short replace symbols with std::string_view find_first_of + copy_cv 2.92 % 2.92 % 4
Short replace runtime symbols with string expressions and without remembering all search results_mean 169 ns 169 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_median 169 ns 169 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_stddev 2.26 ns 2.26 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_cv 1.34 % 1.34 % 4
Short replace runtime symbols with simstr and memorization of all search results_mean 201 ns 201 ns 4
Short replace runtime symbols with simstr and memorization of all search results_median 200 ns 200 ns 4
Short replace runtime symbols with simstr and memorization of all search results_stddev 2.87 ns 2.87 ns 4
Short replace runtime symbols with simstr and memorization of all search results_cv 1.43 % 1.43 % 4
Short replace const symbols with string expressions and without remembering all search results_mean 130 ns 130 ns 4
Short replace const symbols with string expressions and without remembering all search results_median 131 ns 131 ns 4
Short replace const symbols with string expressions and without remembering all search results_stddev 2.75 ns 2.75 ns 4
Short replace const symbols with string expressions and without remembering all search results_cv 2.12 % 2.12 % 4
Short replace const symbols with string expressions and memorization of all search results_mean 145 ns 145 ns 4
Short replace const symbols with string expressions and memorization of all search results_median 145 ns 145 ns 4
Short replace const symbols with string expressions and memorization of all search results_stddev 1.24 ns 1.24 ns 4
Short replace const symbols with string expressions and memorization of all search results_cv 0.85 % 0.85 % 4
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 151 ns 151 ns 4
replace bb to ---- in std::string|64_median 150 ns 150 ns 4
replace bb to ---- in std::string|64_stddev 2.03 ns 2.03 ns 4
replace bb to ---- in std::string|64_cv 1.34 % 1.34 % 4
replace bb to ---- in std::string|256_mean 603 ns 603 ns 4
replace bb to ---- in std::string|256_median 600 ns 600 ns 4
replace bb to ---- in std::string|256_stddev 7.38 ns 7.38 ns 4
replace bb to ---- in std::string|256_cv 1.22 % 1.22 % 4
replace bb to ---- in std::string|512_mean 1060 ns 1060 ns 4
replace bb to ---- in std::string|512_median 1058 ns 1058 ns 4
replace bb to ---- in std::string|512_stddev 32.9 ns 32.9 ns 4
replace bb to ---- in std::string|512_cv 3.10 % 3.10 % 4
replace bb to ---- in std::string|1024_mean 2332 ns 2332 ns 4
replace bb to ---- in std::string|1024_median 2323 ns 2323 ns 4
replace bb to ---- in std::string|1024_stddev 156 ns 156 ns 4
replace bb to ---- in std::string|1024_cv 6.71 % 6.71 % 4
replace bb to ---- in std::string|2048_mean 5851 ns 5851 ns 4
replace bb to ---- in std::string|2048_median 5742 ns 5742 ns 4
replace bb to ---- in std::string|2048_stddev 405 ns 405 ns 4
replace bb to ---- in std::string|2048_cv 6.92 % 6.92 % 4
replace bb to ---- in lstringa<8>|64_mean 127 ns 127 ns 4
replace bb to ---- in lstringa<8>|64_median 126 ns 126 ns 4
replace bb to ---- in lstringa<8>|64_stddev 1.74 ns 1.74 ns 4
replace bb to ---- in lstringa<8>|64_cv 1.37 % 1.37 % 4
replace bb to ---- in lstringa<8>|256_mean 442 ns 442 ns 4
replace bb to ---- in lstringa<8>|256_median 439 ns 439 ns 4
replace bb to ---- in lstringa<8>|256_stddev 9.86 ns 9.86 ns 4
replace bb to ---- in lstringa<8>|256_cv 2.23 % 2.23 % 4
replace bb to ---- in lstringa<8>|512_mean 831 ns 831 ns 4
replace bb to ---- in lstringa<8>|512_median 832 ns 832 ns 4
replace bb to ---- in lstringa<8>|512_stddev 13.7 ns 13.7 ns 4
replace bb to ---- in lstringa<8>|512_cv 1.65 % 1.65 % 4
replace bb to ---- in lstringa<8>|1024_mean 1698 ns 1698 ns 4
replace bb to ---- in lstringa<8>|1024_median 1696 ns 1696 ns 4
replace bb to ---- in lstringa<8>|1024_stddev 26.9 ns 26.9 ns 4
replace bb to ---- in lstringa<8>|1024_cv 1.59 % 1.59 % 4
replace bb to ---- in lstringa<8>|2048_mean 3256 ns 3256 ns 4
replace bb to ---- in lstringa<8>|2048_median 3280 ns 3280 ns 4
replace bb to ---- in lstringa<8>|2048_stddev 73.1 ns 73.1 ns 4
replace bb to ---- in lstringa<8>|2048_cv 2.25 % 2.25 % 4
replace bb to ---- by init stringa|64_mean 91.5 ns 91.5 ns 4
replace bb to ---- by init stringa|64_median 91.9 ns 91.9 ns 4
replace bb to ---- by init stringa|64_stddev 3.42 ns 3.42 ns 4
replace bb to ---- by init stringa|64_cv 3.74 % 3.74 % 4
replace bb to ---- by init stringa|256_mean 306 ns 306 ns 4
replace bb to ---- by init stringa|256_median 305 ns 305 ns 4
replace bb to ---- by init stringa|256_stddev 7.25 ns 7.25 ns 4
replace bb to ---- by init stringa|256_cv 2.37 % 2.37 % 4
replace bb to ---- by init stringa|512_mean 718 ns 718 ns 4
replace bb to ---- by init stringa|512_median 719 ns 719 ns 4
replace bb to ---- by init stringa|512_stddev 7.71 ns 7.71 ns 4
replace bb to ---- by init stringa|512_cv 1.07 % 1.07 % 4
replace bb to ---- by init stringa|1024_mean 1629 ns 1629 ns 4
replace bb to ---- by init stringa|1024_median 1626 ns 1626 ns 4
replace bb to ---- by init stringa|1024_stddev 21.1 ns 21.1 ns 4
replace bb to ---- by init stringa|1024_cv 1.30 % 1.30 % 4
replace bb to ---- by init stringa|2048_mean 3400 ns 3400 ns 4
replace bb to ---- by init stringa|2048_median 3411 ns 3411 ns 4
replace bb to ---- by init stringa|2048_stddev 57.0 ns 57.0 ns 4
replace bb to ---- by init stringa|2048_cv 1.68 % 1.68 % 4
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 114 ns 114 ns 4
replace bb to -- in std::string|64_median 113 ns 113 ns 4
replace bb to -- in std::string|64_stddev 3.00 ns 3.00 ns 4
replace bb to -- in std::string|64_cv 2.62 % 2.62 % 4
replace bb to -- in std::string|256_mean 390 ns 390 ns 4
replace bb to -- in std::string|256_median 391 ns 391 ns 4
replace bb to -- in std::string|256_stddev 6.46 ns 6.46 ns 4
replace bb to -- in std::string|256_cv 1.66 % 1.66 % 4
replace bb to -- in std::string|512_mean 743 ns 743 ns 4
replace bb to -- in std::string|512_median 741 ns 741 ns 4
replace bb to -- in std::string|512_stddev 7.17 ns 7.17 ns 4
replace bb to -- in std::string|512_cv 0.97 % 0.97 % 4
replace bb to -- in std::string|1024_mean 1477 ns 1477 ns 4
replace bb to -- in std::string|1024_median 1477 ns 1477 ns 4
replace bb to -- in std::string|1024_stddev 22.5 ns 22.5 ns 4
replace bb to -- in std::string|1024_cv 1.52 % 1.52 % 4
replace bb to -- in std::string|2048_mean 2929 ns 2929 ns 4
replace bb to -- in std::string|2048_median 2932 ns 2932 ns 4
replace bb to -- in std::string|2048_stddev 32.1 ns 32.1 ns 4
replace bb to -- in std::string|2048_cv 1.09 % 1.09 % 4
replace bb to -- in lstringa<8>|64_mean 89.2 ns 89.2 ns 4
replace bb to -- in lstringa<8>|64_median 88.6 ns 88.6 ns 4
replace bb to -- in lstringa<8>|64_stddev 1.62 ns 1.62 ns 4
replace bb to -- in lstringa<8>|64_cv 1.82 % 1.82 % 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 5.80 ns 5.80 ns 4
replace bb to -- in lstringa<8>|256_cv 1.97 % 1.97 % 4
replace bb to -- in lstringa<8>|512_mean 553 ns 553 ns 4
replace bb to -- in lstringa<8>|512_median 547 ns 547 ns 4
replace bb to -- in lstringa<8>|512_stddev 15.1 ns 14.9 ns 4
replace bb to -- in lstringa<8>|512_cv 2.72 % 2.69 % 4
replace bb to -- in lstringa<8>|1024_mean 1122 ns 1122 ns 4
replace bb to -- in lstringa<8>|1024_median 1112 ns 1112 ns 4
replace bb to -- in lstringa<8>|1024_stddev 33.2 ns 33.2 ns 4
replace bb to -- in lstringa<8>|1024_cv 2.96 % 2.96 % 4
replace bb to -- in lstringa<8>|2048_mean 2088 ns 2088 ns 4
replace bb to -- in lstringa<8>|2048_median 2076 ns 2076 ns 4
replace bb to -- in lstringa<8>|2048_stddev 33.4 ns 33.4 ns 4
replace bb to -- in lstringa<8>|2048_cv 1.60 % 1.60 % 4
replace bb to -- by init stringa|64_mean 73.9 ns 73.9 ns 4
replace bb to -- by init stringa|64_median 74.1 ns 74.1 ns 4
replace bb to -- by init stringa|64_stddev 1.95 ns 1.95 ns 4
replace bb to -- by init stringa|64_cv 2.63 % 2.63 % 4
replace bb to -- by init stringa|256_mean 240 ns 240 ns 4
replace bb to -- by init stringa|256_median 240 ns 240 ns 4
replace bb to -- by init stringa|256_stddev 3.28 ns 3.28 ns 4
replace bb to -- by init stringa|256_cv 1.37 % 1.37 % 4
replace bb to -- by init stringa|512_mean 434 ns 434 ns 4
replace bb to -- by init stringa|512_median 434 ns 434 ns 4
replace bb to -- by init stringa|512_stddev 4.69 ns 4.69 ns 4
replace bb to -- by init stringa|512_cv 1.08 % 1.08 % 4
replace bb to -- by init stringa|1024_mean 898 ns 898 ns 4
replace bb to -- by init stringa|1024_median 897 ns 897 ns 4
replace bb to -- by init stringa|1024_stddev 22.5 ns 22.5 ns 4
replace bb to -- by init stringa|1024_cv 2.51 % 2.51 % 4
replace bb to -- by init stringa|2048_mean 1709 ns 1709 ns 4
replace bb to -- by init stringa|2048_median 1711 ns 1711 ns 4
replace bb to -- by init stringa|2048_stddev 28.4 ns 28.4 ns 4
replace bb to -- by init stringa|2048_cv 1.66 % 1.66 % 4
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3754473 ns 3754484 ns 4
hashStrMapA<size_t> emplace & find stringa;_median 3770505 ns 3770516 ns 4
hashStrMapA<size_t> emplace & find stringa;_stddev 44910 ns 44913 ns 4
hashStrMapA<size_t> emplace & find stringa;_cv 1.20 % 1.20 % 4
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3584569 ns 3584594 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3584871 ns 3584864 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 54232 ns 54206 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 1.51 % 1.51 % 4
hashStrMapA<size_t> emplace & find ssa;_mean 3718652 ns 3718652 ns 4
hashStrMapA<size_t> emplace & find ssa;_median 3722300 ns 3722310 ns 4
hashStrMapA<size_t> emplace & find ssa;_stddev 63421 ns 63405 ns 4
hashStrMapA<size_t> emplace & find ssa;_cv 1.71 % 1.71 % 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 4196609 ns 4196628 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 4205044 ns 4205067 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 39442 ns 39443 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 0.94 % 0.94 % 4
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 673 ns 673 ns 4
Build func full name std::string;_median 673 ns 673 ns 4
Build func full name std::string;_stddev 6.64 ns 6.64 ns 4
Build func full name std::string;_cv 0.99 % 0.99 % 4
Build func full name std::string 1;_mean 768 ns 768 ns 4
Build func full name std::string 1;_median 770 ns 770 ns 4
Build func full name std::string 1;_stddev 19.1 ns 19.1 ns 4
Build func full name std::string 1;_cv 2.49 % 2.49 % 4
Build func full name std::stream;_mean 3165 ns 3165 ns 4
Build func full name std::stream;_median 3169 ns 3169 ns 4
Build func full name std::stream;_stddev 34.1 ns 34.1 ns 4
Build func full name std::stream;_cv 1.08 % 1.08 % 4
Build func full name stringa;_mean 472 ns 472 ns 4
Build func full name stringa;_median 474 ns 474 ns 4
Build func full name stringa;_stddev 10.3 ns 10.3 ns 4
Build func full name stringa;_cv 2.18 % 2.18 % 4
Build func full name stringa 1;_mean 616 ns 616 ns 4
Build func full name stringa 1;_median 600 ns 600 ns 4
Build func full name stringa 1;_stddev 37.3 ns 37.3 ns 4
Build func full name stringa 1;_cv 6.06 % 6.06 % 4
----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
To upper case std::wstring_mean 162 ns 162 ns 4
To upper case std::wstring_median 161 ns 161 ns 4
To upper case std::wstring_stddev 3.72 ns 3.72 ns 4
To upper case std::wstring_cv 2.29 % 2.29 % 4
To upper case lstringw<15>_mean 43.7 ns 43.7 ns 4
To upper case lstringw<15>_median 42.9 ns 42.9 ns 4
To upper case lstringw<15>_stddev 1.64 ns 1.64 ns 4
To upper case lstringw<15>_cv 3.75 % 3.75 % 4

View File

@ -0,0 +1,989 @@
Benchmarks of simstr, version 1.8.1
Sources: https://github.com/orefkov/simstr
Results: https://orefkov.github.io/simstr/results.html
Compiler Clang 22.0.0, use libc++
2026-03-22T13:31:21+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.28, 0.77, 0.74
***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 170 ns 170 ns 4
Concat email std::format_median 170 ns 170 ns 4
Concat email std::format_stddev 3.56 ns 3.56 ns 4
Concat email std::format_cv 2.09 % 2.09 % 4
Concat email std::stringstream_mean 279 ns 279 ns 4
Concat email std::stringstream_median 277 ns 277 ns 4
Concat email std::stringstream_stddev 4.82 ns 4.82 ns 4
Concat email std::stringstream_cv 1.73 % 1.73 % 4
Concat email stringzilla append_mean 141 ns 141 ns 4
Concat email stringzilla append_median 141 ns 141 ns 4
Concat email stringzilla append_stddev 1.31 ns 1.31 ns 4
Concat email stringzilla append_cv 0.93 % 0.93 % 4
Concat email stringzilla concat_mean 55.0 ns 55.0 ns 4
Concat email stringzilla concat_median 55.5 ns 55.5 ns 4
Concat email stringzilla concat_stddev 1.41 ns 1.41 ns 4
Concat email stringzilla concat_cv 2.57 % 2.57 % 4
Concat email std::string append_mean 91.0 ns 91.0 ns 4
Concat email std::string append_median 91.0 ns 91.0 ns 4
Concat email std::string append_stddev 0.590 ns 0.591 ns 4
Concat email std::string append_cv 0.65 % 0.65 % 4
Concat email std::string by strexpr_mean 46.8 ns 46.8 ns 4
Concat email std::string by strexpr_median 46.7 ns 46.7 ns 4
Concat email std::string by strexpr_stddev 1.12 ns 1.13 ns 4
Concat email std::string by strexpr_cv 2.40 % 2.40 % 4
Concat email stringa_mean 38.7 ns 38.7 ns 4
Concat email stringa_median 38.6 ns 38.6 ns 4
Concat email stringa_stddev 0.446 ns 0.446 ns 4
Concat email stringa_cv 1.15 % 1.15 % 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 242 ns 242 ns 4
Concat std::string and number by std to std::string_median 242 ns 242 ns 4
Concat std::string and number by std to std::string_stddev 4.41 ns 4.41 ns 4
Concat std::string and number by std to std::string_cv 1.82 % 1.82 % 4
Concat std::string and number by StrExpr to std::string_mean 102 ns 102 ns 4
Concat std::string and number by StrExpr to std::string_median 102 ns 102 ns 4
Concat std::string and number by StrExpr to std::string_stddev 2.17 ns 2.17 ns 4
Concat std::string and number by StrExpr to std::string_cv 2.13 % 2.13 % 4
Concat stringa and number by StrExpr to simstr::stringa_mean 64.3 ns 64.3 ns 4
Concat stringa and number by StrExpr to simstr::stringa_median 64.5 ns 64.5 ns 4
Concat stringa and number by StrExpr to simstr::stringa_stddev 0.626 ns 0.626 ns 4
Concat stringa and number by StrExpr to simstr::stringa_cv 0.97 % 0.97 % 4
Concat stringa and number by e_concat to simstr::stringa_mean 72.1 ns 72.1 ns 4
Concat stringa and number by e_concat to simstr::stringa_median 72.6 ns 72.6 ns 4
Concat stringa and number by e_concat to simstr::stringa_stddev 1.16 ns 1.16 ns 4
Concat stringa and number by e_concat to simstr::stringa_cv 1.61 % 1.61 % 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 724 ns 724 ns 4
Concat std::string and format hex number and literal to std::string_median 719 ns 719 ns 4
Concat std::string and format hex number and literal to std::string_stddev 20.0 ns 20.0 ns 4
Concat std::string and format hex number and literal to std::string_cv 2.76 % 2.77 % 4
std::format std::string and hex number by literal to std::string_mean 783 ns 783 ns 4
std::format std::string and hex number by literal to std::string_median 784 ns 784 ns 4
std::format std::string and hex number by literal to std::string_stddev 20.1 ns 20.1 ns 4
std::format std::string and hex number by literal to std::string_cv 2.56 % 2.56 % 4
Concat std::string and std::to_chars and string to std::string_mean 221 ns 221 ns 4
Concat std::string and std::to_chars and string to std::string_median 222 ns 222 ns 4
Concat std::string and std::to_chars and string to std::string_stddev 3.44 ns 3.44 ns 4
Concat std::string and std::to_chars and string to std::string_cv 1.56 % 1.56 % 4
Concat std::string and hex number and literal by StrExpr to std::string_mean 150 ns 150 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_median 151 ns 151 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_stddev 2.94 ns 2.94 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_cv 1.96 % 1.96 % 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 120 ns 120 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 119 ns 119 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 1.85 ns 1.85 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 1.54 % 1.54 % 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 124 ns 124 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 2.45 ns 2.45 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.97 % 1.97 % 4
Subst stringa and hex number by e_subst literal to simstr::stringa_mean 187 ns 187 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_median 186 ns 186 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 4.21 ns 4.21 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_cv 2.25 % 2.25 % 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 332 ns 332 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 334 ns 334 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 5.45 ns 5.45 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.64 % 1.64 % 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 278 ns 278 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 277 ns 277 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 3.23 ns 3.23 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 1.16 % 1.16 % 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 358 ns 358 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 358 ns 358 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 4.17 ns 4.17 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 1.16 % 1.16 % 4
e_vsubst(pattern, i / 0x8a010_fmt)_mean 608 ns 608 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_median 607 ns 607 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_stddev 8.27 ns 8.26 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_cv 1.36 % 1.36 % 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 697 ns 697 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 695 ns 695 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 8.91 ns 8.91 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 1.28 % 1.28 % 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 814 ns 814 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 810 ns 810 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 23.1 ns 23.1 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 2.84 % 2.84 % 4
std::format("abcdefghihklmopqr {:#010o} end", i)_mean 1268 ns 1268 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_median 1255 ns 1255 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 30.3 ns 30.3 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_cv 2.39 % 2.39 % 4
std::vformat(pattern, std::make_format_args(i))_mean 1228 ns 1228 ns 4
std::vformat(pattern, std::make_format_args(i))_median 1227 ns 1227 ns 4
std::vformat(pattern, std::make_format_args(i))_stddev 9.77 ns 9.77 ns 4
std::vformat(pattern, std::make_format_args(i))_cv 0.80 % 0.80 % 4
std::format with std::formatted_size_mean 2175 ns 2175 ns 4
std::format with std::formatted_size_median 2181 ns 2180 ns 4
std::format with std::formatted_size_stddev 13.9 ns 13.9 ns 4
std::format with std::formatted_size_cv 0.64 % 0.64 % 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 2608 ns 2608 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 2609 ns 2609 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 18.4 ns 18.4 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 0.71 % 0.70 % 4
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 34.1 ns 34.1 ns 4
Concat std::string by std to std::string_median 33.7 ns 33.7 ns 4
Concat std::string by std to std::string_stddev 0.874 ns 0.874 ns 4
Concat std::string by std to std::string_cv 2.56 % 2.56 % 4
Concat std::string by StrExpr to std::string_mean 37.3 ns 37.3 ns 4
Concat std::string by StrExpr to std::string_median 37.2 ns 37.2 ns 4
Concat std::string by StrExpr to std::string_stddev 0.340 ns 0.340 ns 4
Concat std::string by StrExpr to std::string_cv 0.91 % 0.91 % 4
Concat stringa by StrExpr to stringa_mean 28.3 ns 28.3 ns 4
Concat stringa by StrExpr to stringa_median 28.0 ns 28.0 ns 4
Concat stringa by StrExpr to stringa_stddev 0.716 ns 0.716 ns 4
Concat stringa by StrExpr to stringa_cv 2.53 % 2.53 % 4
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 92.4 ns 92.4 ns 4
Find concat three std::string_median 92.1 ns 92.1 ns 4
Find concat three std::string_stddev 1.44 ns 1.44 ns 4
Find concat three std::string_cv 1.56 % 1.56 % 4
Find concat three strexpr_mean 46.5 ns 46.5 ns 4
Find concat three strexpr_median 45.9 ns 45.9 ns 4
Find concat three strexpr_stddev 1.25 ns 1.25 ns 4
Find concat three strexpr_cv 2.68 % 2.68 % 4
Find concat three simstr_mean 17.0 ns 17.0 ns 4
Find concat three simstr_median 16.9 ns 16.9 ns 4
Find concat three simstr_stddev 0.649 ns 0.649 ns 4
Find concat three simstr_cv 3.81 % 3.81 % 4
Find concat three stringzilla string_mean 176 ns 176 ns 4
Find concat three stringzilla string_median 177 ns 177 ns 4
Find concat three stringzilla string_stddev 4.56 ns 4.56 ns 4
Find concat three stringzilla string_cv 2.59 % 2.59 % 4
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 6.45 ns 6.44 ns 4
BuildTypeNameStr 0/0_median 6.46 ns 6.46 ns 4
BuildTypeNameStr 0/0_stddev 0.192 ns 0.192 ns 4
BuildTypeNameStr 0/0_cv 2.97 % 2.97 % 4
BuildTypeNameExp 0/0_mean 6.41 ns 6.41 ns 4
BuildTypeNameExp 0/0_median 6.39 ns 6.39 ns 4
BuildTypeNameExp 0/0_stddev 0.052 ns 0.052 ns 4
BuildTypeNameExp 0/0_cv 0.81 % 0.81 % 4
BuildTypeNameSim 0/0_mean 4.99 ns 4.99 ns 4
BuildTypeNameSim 0/0_median 4.98 ns 4.98 ns 4
BuildTypeNameSim 0/0_stddev 0.092 ns 0.092 ns 4
BuildTypeNameSim 0/0_cv 1.84 % 1.84 % 4
BuildTypeNameStr 10/10_mean 90.0 ns 90.0 ns 4
BuildTypeNameStr 10/10_median 89.9 ns 89.9 ns 4
BuildTypeNameStr 10/10_stddev 0.738 ns 0.739 ns 4
BuildTypeNameStr 10/10_cv 0.82 % 0.82 % 4
BuildTypeNameExp 10/10_mean 39.0 ns 39.0 ns 4
BuildTypeNameExp 10/10_median 39.2 ns 39.2 ns 4
BuildTypeNameExp 10/10_stddev 1.05 ns 1.05 ns 4
BuildTypeNameExp 10/10_cv 2.70 % 2.70 % 4
BuildTypeNameSim 10/10_mean 23.6 ns 23.6 ns 4
BuildTypeNameSim 10/10_median 23.6 ns 23.6 ns 4
BuildTypeNameSim 10/10_stddev 0.539 ns 0.539 ns 4
BuildTypeNameSim 10/10_cv 2.28 % 2.28 % 4
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 243 ns 243 ns 4
Concat with replace str_median 243 ns 243 ns 4
Concat with replace str_stddev 5.58 ns 5.58 ns 4
Concat with replace str_cv 2.29 % 2.29 % 4
Concat with replace exp_mean 151 ns 151 ns 4
Concat with replace exp_median 151 ns 151 ns 4
Concat with replace exp_stddev 1.04 ns 1.03 ns 4
Concat with replace exp_cv 0.69 % 0.69 % 4
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 0.758 ns 0.758 ns 4
std::string e;_median 0.756 ns 0.756 ns 4
std::string e;_stddev 0.006 ns 0.006 ns 4
std::string e;_cv 0.74 % 0.74 % 4
std::string_view e;_mean 0.380 ns 0.380 ns 4
std::string_view e;_median 0.380 ns 0.380 ns 4
std::string_view e;_stddev 0.002 ns 0.002 ns 4
std::string_view e;_cv 0.49 % 0.49 % 4
ssa e;_mean 0.375 ns 0.375 ns 4
ssa e;_median 0.375 ns 0.375 ns 4
ssa e;_stddev 0.006 ns 0.006 ns 4
ssa e;_cv 1.57 % 1.57 % 4
stringa e;_mean 0.754 ns 0.754 ns 4
stringa e;_median 0.754 ns 0.754 ns 4
stringa e;_stddev 0.005 ns 0.005 ns 4
stringa e;_cv 0.66 % 0.66 % 4
lstringa<20> e;_mean 1.13 ns 1.13 ns 4
lstringa<20> e;_median 1.12 ns 1.12 ns 4
lstringa<20> e;_stddev 0.026 ns 0.026 ns 4
lstringa<20> e;_cv 2.28 % 2.28 % 4
lstringa<40> e;_mean 1.14 ns 1.14 ns 4
lstringa<40> e;_median 1.15 ns 1.15 ns 4
lstringa<40> e;_stddev 0.027 ns 0.027 ns 4
lstringa<40> e;_cv 2.39 % 2.39 % 4
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 1.51 ns 1.51 ns 4
std::string e = "Test text";_median 1.51 ns 1.51 ns 4
std::string e = "Test text";_stddev 0.020 ns 0.020 ns 4
std::string e = "Test text";_cv 1.30 % 1.30 % 4
std::string_view e = "Test text";_mean 0.767 ns 0.767 ns 4
std::string_view e = "Test text";_median 0.765 ns 0.765 ns 4
std::string_view e = "Test text";_stddev 0.010 ns 0.010 ns 4
std::string_view e = "Test text";_cv 1.33 % 1.33 % 4
ssa e = "Test text";_mean 0.381 ns 0.381 ns 4
ssa e = "Test text";_median 0.382 ns 0.382 ns 4
ssa e = "Test text";_stddev 0.006 ns 0.006 ns 4
ssa e = "Test text";_cv 1.64 % 1.64 % 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.014 ns 0.014 ns 4
stringa e = "Test text";_cv 1.24 % 1.24 % 4
lstringa<20> e = "Test text";_mean 1.89 ns 1.89 ns 4
lstringa<20> e = "Test text";_median 1.89 ns 1.89 ns 4
lstringa<20> e = "Test text";_stddev 0.038 ns 0.038 ns 4
lstringa<20> e = "Test text";_cv 2.03 % 2.03 % 4
lstringa<40> e = "Test text";_mean 1.86 ns 1.86 ns 4
lstringa<40> e = "Test text";_median 1.86 ns 1.86 ns 4
lstringa<40> e = "Test text";_stddev 0.017 ns 0.017 ns 4
lstringa<40> e = "Test text";_cv 0.92 % 0.92 % 4
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 19.3 ns 19.3 ns 4
std::string e = "123456789012345678901234567890";_median 19.3 ns 19.2 ns 4
std::string e = "123456789012345678901234567890";_stddev 0.214 ns 0.214 ns 4
std::string e = "123456789012345678901234567890";_cv 1.11 % 1.11 % 4
std::string_view e = "123456789012345678901234567890";_mean 0.745 ns 0.745 ns 4
std::string_view e = "123456789012345678901234567890";_median 0.745 ns 0.745 ns 4
std::string_view e = "123456789012345678901234567890";_stddev 0.016 ns 0.016 ns 4
std::string_view e = "123456789012345678901234567890";_cv 2.09 % 2.09 % 4
ssa e = "123456789012345678901234567890";_mean 0.374 ns 0.374 ns 4
ssa e = "123456789012345678901234567890";_median 0.373 ns 0.373 ns 4
ssa e = "123456789012345678901234567890";_stddev 0.004 ns 0.004 ns 4
ssa e = "123456789012345678901234567890";_cv 1.01 % 1.01 % 4
stringa e = "123456789012345678901234567890";_mean 1.12 ns 1.12 ns 4
stringa e = "123456789012345678901234567890";_median 1.12 ns 1.12 ns 4
stringa e = "123456789012345678901234567890";_stddev 0.017 ns 0.017 ns 4
stringa e = "123456789012345678901234567890";_cv 1.53 % 1.53 % 4
lstringa<20> e = "123456789012345678901234567890";_mean 18.9 ns 18.9 ns 4
lstringa<20> e = "123456789012345678901234567890";_median 18.9 ns 18.9 ns 4
lstringa<20> e = "123456789012345678901234567890";_stddev 0.143 ns 0.143 ns 4
lstringa<20> e = "123456789012345678901234567890";_cv 0.75 % 0.75 % 4
lstringa<40> e = "123456789012345678901234567890";_mean 1.89 ns 1.89 ns 4
lstringa<40> e = "123456789012345678901234567890";_median 1.89 ns 1.89 ns 4
lstringa<40> e = "123456789012345678901234567890";_stddev 0.023 ns 0.023 ns 4
lstringa<40> e = "123456789012345678901234567890";_cv 1.21 % 1.22 % 4
----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text"; auto c{e};_mean 1.18 ns 1.18 ns 4
std::string e = "Test text"; auto c{e};_median 1.18 ns 1.18 ns 4
std::string e = "Test text"; auto c{e};_stddev 0.010 ns 0.010 ns 4
std::string e = "Test text"; auto c{e};_cv 0.82 % 0.82 % 4
std::string_view e = "Test text"; auto c{e};_mean 0.377 ns 0.377 ns 4
std::string_view e = "Test text"; auto c{e};_median 0.375 ns 0.375 ns 4
std::string_view e = "Test text"; auto c{e};_stddev 0.004 ns 0.004 ns 4
std::string_view e = "Test text"; auto c{e};_cv 1.03 % 1.03 % 4
ssa e = "Test text"; auto c{e};_mean 0.378 ns 0.378 ns 4
ssa e = "Test text"; auto c{e};_median 0.378 ns 0.378 ns 4
ssa e = "Test text"; auto c{e};_stddev 0.003 ns 0.003 ns 4
ssa e = "Test text"; auto c{e};_cv 0.80 % 0.80 % 4
stringa e = "Test text"; auto c{e};_mean 1.13 ns 1.13 ns 4
stringa e = "Test text"; auto c{e};_median 1.13 ns 1.13 ns 4
stringa e = "Test text"; auto c{e};_stddev 0.020 ns 0.020 ns 4
stringa e = "Test text"; auto c{e};_cv 1.76 % 1.76 % 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.12 ns 1.12 ns 4
lstringa<20> e = "Test text"; auto c{e};_stddev 0.012 ns 0.012 ns 4
lstringa<20> e = "Test text"; auto c{e};_cv 1.04 % 1.04 % 4
lstringa<40> e = "Test text"; auto c{e};_mean 1.85 ns 1.85 ns 4
lstringa<40> e = "Test text"; auto c{e};_median 1.85 ns 1.85 ns 4
lstringa<40> e = "Test text"; auto c{e};_stddev 0.023 ns 0.023 ns 4
lstringa<40> e = "Test text"; auto c{e};_cv 1.27 % 1.27 % 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 24.9 ns 24.9 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_median 24.8 ns 24.8 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.277 ns 0.277 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_cv 1.11 % 1.11 % 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.757 ns 0.757 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.754 ns 0.754 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.013 ns 0.013 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.67 % 1.67 % 4
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.381 ns 0.381 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.382 ns 0.382 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.004 ns 0.004 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.01 % 1.01 % 4
stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.14 ns 1.14 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_median 1.14 ns 1.14 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.019 ns 0.019 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_cv 1.66 % 1.66 % 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 18.0 ns 18.0 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 18.1 ns 18.1 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.454 ns 0.454 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.52 % 2.52 % 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 5.53 ns 5.53 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 5.52 ns 5.52 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.080 ns 0.080 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.45 % 1.45 % 4
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
sz::string::find;_mean 96.5 ns 96.5 ns 4
sz::string::find;_median 96.3 ns 96.3 ns 4
sz::string::find;_stddev 1.47 ns 1.47 ns 4
sz::string::find;_cv 1.53 % 1.53 % 4
std::string::find;_mean 7.76 ns 7.76 ns 4
std::string::find;_median 7.84 ns 7.84 ns 4
std::string::find;_stddev 0.180 ns 0.180 ns 4
std::string::find;_cv 2.31 % 2.31 % 4
std::string_view::find;_mean 7.82 ns 7.82 ns 4
std::string_view::find;_median 7.85 ns 7.84 ns 4
std::string_view::find;_stddev 0.082 ns 0.082 ns 4
std::string_view::find;_cv 1.05 % 1.05 % 4
ssa::find;_mean 7.82 ns 7.82 ns 4
ssa::find;_median 7.81 ns 7.81 ns 4
ssa::find;_stddev 0.113 ns 0.113 ns 4
ssa::find;_cv 1.44 % 1.45 % 4
stringa::find;_mean 8.60 ns 8.60 ns 4
stringa::find;_median 8.59 ns 8.59 ns 4
stringa::find;_stddev 0.045 ns 0.045 ns 4
stringa::find;_cv 0.52 % 0.52 % 4
lstringa<20>::find;_mean 6.98 ns 6.98 ns 4
lstringa<20>::find;_median 6.95 ns 6.95 ns 4
lstringa<20>::find;_stddev 0.090 ns 0.090 ns 4
lstringa<20>::find;_cv 1.29 % 1.29 % 4
lstringa<40>::find;_mean 7.01 ns 7.01 ns 4
lstringa<40>::find;_median 7.02 ns 7.02 ns 4
lstringa<40>::find;_stddev 0.253 ns 0.253 ns 4
lstringa<40>::find;_cv 3.61 % 3.61 % 4
------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string copy{str_with_len_N};/15_mean 1.18 ns 1.18 ns 4
std::string copy{str_with_len_N};/15_median 1.17 ns 1.17 ns 4
std::string copy{str_with_len_N};/15_stddev 0.043 ns 0.043 ns 4
std::string copy{str_with_len_N};/15_cv 3.65 % 3.65 % 4
std::string copy{str_with_len_N};/16_mean 1.16 ns 1.16 ns 4
std::string copy{str_with_len_N};/16_median 1.16 ns 1.16 ns 4
std::string copy{str_with_len_N};/16_stddev 0.028 ns 0.028 ns 4
std::string copy{str_with_len_N};/16_cv 2.42 % 2.42 % 4
std::string copy{str_with_len_N};/23_mean 25.8 ns 25.8 ns 4
std::string copy{str_with_len_N};/23_median 25.6 ns 25.6 ns 4
std::string copy{str_with_len_N};/23_stddev 0.708 ns 0.707 ns 4
std::string copy{str_with_len_N};/23_cv 2.75 % 2.75 % 4
std::string copy{str_with_len_N};/24_mean 24.8 ns 24.8 ns 4
std::string copy{str_with_len_N};/24_median 24.9 ns 24.9 ns 4
std::string copy{str_with_len_N};/24_stddev 0.390 ns 0.390 ns 4
std::string copy{str_with_len_N};/24_cv 1.57 % 1.57 % 4
std::string copy{str_with_len_N};/32_mean 24.7 ns 24.7 ns 4
std::string copy{str_with_len_N};/32_median 24.9 ns 24.9 ns 4
std::string copy{str_with_len_N};/32_stddev 0.466 ns 0.466 ns 4
std::string copy{str_with_len_N};/32_cv 1.88 % 1.89 % 4
std::string copy{str_with_len_N};/64_mean 26.2 ns 26.2 ns 4
std::string copy{str_with_len_N};/64_median 26.2 ns 26.2 ns 4
std::string copy{str_with_len_N};/64_stddev 0.221 ns 0.221 ns 4
std::string copy{str_with_len_N};/64_cv 0.84 % 0.84 % 4
std::string copy{str_with_len_N};/128_mean 26.8 ns 26.8 ns 4
std::string copy{str_with_len_N};/128_median 26.8 ns 26.8 ns 4
std::string copy{str_with_len_N};/128_stddev 0.300 ns 0.300 ns 4
std::string copy{str_with_len_N};/128_cv 1.12 % 1.12 % 4
std::string copy{str_with_len_N};/256_mean 27.5 ns 27.5 ns 4
std::string copy{str_with_len_N};/256_median 27.5 ns 27.5 ns 4
std::string copy{str_with_len_N};/256_stddev 0.234 ns 0.234 ns 4
std::string copy{str_with_len_N};/256_cv 0.85 % 0.85 % 4
std::string copy{str_with_len_N};/512_mean 31.6 ns 31.6 ns 4
std::string copy{str_with_len_N};/512_median 31.6 ns 31.6 ns 4
std::string copy{str_with_len_N};/512_stddev 0.751 ns 0.751 ns 4
std::string copy{str_with_len_N};/512_cv 2.38 % 2.38 % 4
std::string copy{str_with_len_N};/1024_mean 38.4 ns 38.4 ns 4
std::string copy{str_with_len_N};/1024_median 38.4 ns 38.4 ns 4
std::string copy{str_with_len_N};/1024_stddev 1.03 ns 1.03 ns 4
std::string copy{str_with_len_N};/1024_cv 2.67 % 2.67 % 4
std::string copy{str_with_len_N};/2048_mean 86.0 ns 86.0 ns 4
std::string copy{str_with_len_N};/2048_median 87.3 ns 87.3 ns 4
std::string copy{str_with_len_N};/2048_stddev 4.29 ns 4.29 ns 4
std::string copy{str_with_len_N};/2048_cv 4.99 % 4.99 % 4
std::string copy{str_with_len_N};/4096_mean 117 ns 117 ns 4
std::string copy{str_with_len_N};/4096_median 118 ns 118 ns 4
std::string copy{str_with_len_N};/4096_stddev 3.68 ns 3.68 ns 4
std::string copy{str_with_len_N};/4096_cv 3.14 % 3.14 % 4
stringa copy{str_with_len_N};/15_mean 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/15_median 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/15_stddev 0.037 ns 0.037 ns 4
stringa copy{str_with_len_N};/15_cv 3.27 % 3.27 % 4
stringa copy{str_with_len_N};/16_mean 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/16_median 1.14 ns 1.14 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.22 % 1.22 % 4
stringa copy{str_with_len_N};/23_mean 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/23_median 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/23_stddev 0.006 ns 0.006 ns 4
stringa copy{str_with_len_N};/23_cv 0.58 % 0.58 % 4
stringa copy{str_with_len_N};/24_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/24_median 16.5 ns 16.5 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.01 % 1.01 % 4
stringa copy{str_with_len_N};/32_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/32_median 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/32_stddev 0.075 ns 0.075 ns 4
stringa copy{str_with_len_N};/32_cv 0.46 % 0.46 % 4
stringa copy{str_with_len_N};/64_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/64_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/64_stddev 0.129 ns 0.129 ns 4
stringa copy{str_with_len_N};/64_cv 0.78 % 0.78 % 4
stringa copy{str_with_len_N};/128_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/128_median 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/128_stddev 0.176 ns 0.176 ns 4
stringa copy{str_with_len_N};/128_cv 1.06 % 1.06 % 4
stringa copy{str_with_len_N};/256_mean 16.6 ns 16.6 ns 4
stringa copy{str_with_len_N};/256_median 16.6 ns 16.6 ns 4
stringa copy{str_with_len_N};/256_stddev 0.081 ns 0.081 ns 4
stringa copy{str_with_len_N};/256_cv 0.49 % 0.49 % 4
stringa copy{str_with_len_N};/512_mean 16.6 ns 16.6 ns 4
stringa copy{str_with_len_N};/512_median 16.6 ns 16.6 ns 4
stringa copy{str_with_len_N};/512_stddev 0.117 ns 0.117 ns 4
stringa copy{str_with_len_N};/512_cv 0.71 % 0.71 % 4
stringa copy{str_with_len_N};/1024_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/1024_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/1024_stddev 0.232 ns 0.232 ns 4
stringa copy{str_with_len_N};/1024_cv 1.41 % 1.41 % 4
stringa copy{str_with_len_N};/2048_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/2048_median 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/2048_stddev 0.122 ns 0.122 ns 4
stringa copy{str_with_len_N};/2048_cv 0.74 % 0.74 % 4
stringa copy{str_with_len_N};/4096_mean 16.7 ns 16.7 ns 4
stringa copy{str_with_len_N};/4096_median 16.7 ns 16.7 ns 4
stringa copy{str_with_len_N};/4096_stddev 0.175 ns 0.175 ns 4
stringa copy{str_with_len_N};/4096_cv 1.05 % 1.05 % 4
lstringa<16> copy{str_with_len_N};/15_mean 1.12 ns 1.12 ns 4
lstringa<16> copy{str_with_len_N};/15_median 1.12 ns 1.12 ns 4
lstringa<16> copy{str_with_len_N};/15_stddev 0.018 ns 0.018 ns 4
lstringa<16> copy{str_with_len_N};/15_cv 1.63 % 1.63 % 4
lstringa<16> copy{str_with_len_N};/16_mean 5.35 ns 5.35 ns 4
lstringa<16> copy{str_with_len_N};/16_median 5.32 ns 5.32 ns 4
lstringa<16> copy{str_with_len_N};/16_stddev 0.139 ns 0.139 ns 4
lstringa<16> copy{str_with_len_N};/16_cv 2.60 % 2.60 % 4
lstringa<16> copy{str_with_len_N};/23_mean 5.31 ns 5.31 ns 4
lstringa<16> copy{str_with_len_N};/23_median 5.33 ns 5.33 ns 4
lstringa<16> copy{str_with_len_N};/23_stddev 0.075 ns 0.075 ns 4
lstringa<16> copy{str_with_len_N};/23_cv 1.42 % 1.42 % 4
lstringa<16> copy{str_with_len_N};/24_mean 21.8 ns 21.8 ns 4
lstringa<16> copy{str_with_len_N};/24_median 21.9 ns 21.9 ns 4
lstringa<16> copy{str_with_len_N};/24_stddev 0.457 ns 0.457 ns 4
lstringa<16> copy{str_with_len_N};/24_cv 2.10 % 2.10 % 4
lstringa<16> copy{str_with_len_N};/32_mean 21.9 ns 21.9 ns 4
lstringa<16> copy{str_with_len_N};/32_median 21.8 ns 21.8 ns 4
lstringa<16> copy{str_with_len_N};/32_stddev 0.650 ns 0.650 ns 4
lstringa<16> copy{str_with_len_N};/32_cv 2.97 % 2.97 % 4
lstringa<16> copy{str_with_len_N};/64_mean 23.1 ns 23.1 ns 4
lstringa<16> copy{str_with_len_N};/64_median 22.9 ns 22.9 ns 4
lstringa<16> copy{str_with_len_N};/64_stddev 0.476 ns 0.476 ns 4
lstringa<16> copy{str_with_len_N};/64_cv 2.06 % 2.06 % 4
lstringa<16> copy{str_with_len_N};/128_mean 25.7 ns 25.7 ns 4
lstringa<16> copy{str_with_len_N};/128_median 25.8 ns 25.8 ns 4
lstringa<16> copy{str_with_len_N};/128_stddev 0.666 ns 0.666 ns 4
lstringa<16> copy{str_with_len_N};/128_cv 2.59 % 2.59 % 4
lstringa<16> copy{str_with_len_N};/256_mean 24.8 ns 24.8 ns 4
lstringa<16> copy{str_with_len_N};/256_median 24.7 ns 24.7 ns 4
lstringa<16> copy{str_with_len_N};/256_stddev 0.339 ns 0.339 ns 4
lstringa<16> copy{str_with_len_N};/256_cv 1.37 % 1.37 % 4
lstringa<16> copy{str_with_len_N};/512_mean 27.7 ns 27.7 ns 4
lstringa<16> copy{str_with_len_N};/512_median 27.7 ns 27.7 ns 4
lstringa<16> copy{str_with_len_N};/512_stddev 0.248 ns 0.248 ns 4
lstringa<16> copy{str_with_len_N};/512_cv 0.90 % 0.90 % 4
lstringa<16> copy{str_with_len_N};/1024_mean 78.4 ns 78.4 ns 4
lstringa<16> copy{str_with_len_N};/1024_median 87.3 ns 87.3 ns 4
lstringa<16> copy{str_with_len_N};/1024_stddev 19.5 ns 19.5 ns 4
lstringa<16> copy{str_with_len_N};/1024_cv 24.87 % 24.87 % 4
lstringa<16> copy{str_with_len_N};/2048_mean 73.4 ns 73.4 ns 4
lstringa<16> copy{str_with_len_N};/2048_median 76.1 ns 76.1 ns 4
lstringa<16> copy{str_with_len_N};/2048_stddev 6.12 ns 6.12 ns 4
lstringa<16> copy{str_with_len_N};/2048_cv 8.34 % 8.34 % 4
lstringa<16> copy{str_with_len_N};/4096_mean 88.6 ns 88.6 ns 4
lstringa<16> copy{str_with_len_N};/4096_median 88.9 ns 88.9 ns 4
lstringa<16> copy{str_with_len_N};/4096_stddev 0.993 ns 0.993 ns 4
lstringa<16> copy{str_with_len_N};/4096_cv 1.12 % 1.12 % 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.14 ns 1.14 ns 4
lstringa<512> copy{str_with_len_N};/15_stddev 0.008 ns 0.008 ns 4
lstringa<512> copy{str_with_len_N};/15_cv 0.74 % 0.74 % 4
lstringa<512> copy{str_with_len_N};/16_mean 4.98 ns 4.98 ns 4
lstringa<512> copy{str_with_len_N};/16_median 4.96 ns 4.96 ns 4
lstringa<512> copy{str_with_len_N};/16_stddev 0.149 ns 0.149 ns 4
lstringa<512> copy{str_with_len_N};/16_cv 3.00 % 3.00 % 4
lstringa<512> copy{str_with_len_N};/23_mean 5.01 ns 5.01 ns 4
lstringa<512> copy{str_with_len_N};/23_median 5.02 ns 5.02 ns 4
lstringa<512> copy{str_with_len_N};/23_stddev 0.121 ns 0.120 ns 4
lstringa<512> copy{str_with_len_N};/23_cv 2.41 % 2.40 % 4
lstringa<512> copy{str_with_len_N};/24_mean 4.59 ns 4.59 ns 4
lstringa<512> copy{str_with_len_N};/24_median 4.59 ns 4.59 ns 4
lstringa<512> copy{str_with_len_N};/24_stddev 0.088 ns 0.088 ns 4
lstringa<512> copy{str_with_len_N};/24_cv 1.92 % 1.92 % 4
lstringa<512> copy{str_with_len_N};/32_mean 4.64 ns 4.64 ns 4
lstringa<512> copy{str_with_len_N};/32_median 4.64 ns 4.64 ns 4
lstringa<512> copy{str_with_len_N};/32_stddev 0.075 ns 0.075 ns 4
lstringa<512> copy{str_with_len_N};/32_cv 1.61 % 1.61 % 4
lstringa<512> copy{str_with_len_N};/64_mean 6.06 ns 6.06 ns 4
lstringa<512> copy{str_with_len_N};/64_median 6.10 ns 6.10 ns 4
lstringa<512> copy{str_with_len_N};/64_stddev 0.122 ns 0.122 ns 4
lstringa<512> copy{str_with_len_N};/64_cv 2.01 % 2.01 % 4
lstringa<512> copy{str_with_len_N};/128_mean 6.63 ns 6.63 ns 4
lstringa<512> copy{str_with_len_N};/128_median 6.60 ns 6.60 ns 4
lstringa<512> copy{str_with_len_N};/128_stddev 0.128 ns 0.128 ns 4
lstringa<512> copy{str_with_len_N};/128_cv 1.93 % 1.93 % 4
lstringa<512> copy{str_with_len_N};/256_mean 17.3 ns 17.3 ns 4
lstringa<512> copy{str_with_len_N};/256_median 17.3 ns 17.3 ns 4
lstringa<512> copy{str_with_len_N};/256_stddev 0.252 ns 0.252 ns 4
lstringa<512> copy{str_with_len_N};/256_cv 1.45 % 1.45 % 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.6 ns 10.6 ns 4
lstringa<512> copy{str_with_len_N};/512_stddev 0.094 ns 0.094 ns 4
lstringa<512> copy{str_with_len_N};/512_cv 0.88 % 0.88 % 4
lstringa<512> copy{str_with_len_N};/1024_mean 52.1 ns 52.1 ns 4
lstringa<512> copy{str_with_len_N};/1024_median 52.0 ns 52.0 ns 4
lstringa<512> copy{str_with_len_N};/1024_stddev 1.85 ns 1.85 ns 4
lstringa<512> copy{str_with_len_N};/1024_cv 3.55 % 3.55 % 4
lstringa<512> copy{str_with_len_N};/2048_mean 73.6 ns 73.6 ns 4
lstringa<512> copy{str_with_len_N};/2048_median 76.5 ns 76.5 ns 4
lstringa<512> copy{str_with_len_N};/2048_stddev 8.36 ns 8.36 ns 4
lstringa<512> copy{str_with_len_N};/2048_cv 11.35 % 11.35 % 4
lstringa<512> copy{str_with_len_N};/4096_mean 90.1 ns 90.1 ns 4
lstringa<512> copy{str_with_len_N};/4096_median 90.3 ns 90.3 ns 4
lstringa<512> copy{str_with_len_N};/4096_stddev 0.860 ns 0.860 ns 4
lstringa<512> copy{str_with_len_N};/4096_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, 10);_mean 27.4 ns 27.4 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 27.5 ns 27.5 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.390 ns 0.390 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.42 % 1.42 % 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 17.5 ns 17.5 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 17.6 ns 17.6 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.354 ns 0.354 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.02 % 2.02 % 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 9.48 ns 9.48 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 9.50 ns 9.50 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.135 ns 0.135 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.42 % 1.42 % 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 9.76 ns 9.76 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 9.80 ns 9.80 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.135 ns 0.135 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.38 % 1.38 % 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 9.51 ns 9.51 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 9.53 ns 9.53 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.042 ns 0.042 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 0.44 % 0.44 % 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.4 ns 24.4 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 24.3 ns 24.3 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.490 ns 0.490 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.01 % 2.01 % 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 22.0 ns 22.0 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 22.2 ns 22.2 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.697 ns 0.697 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 3.17 % 3.17 % 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 8.28 ns 8.28 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 8.15 ns 8.15 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.363 ns 0.363 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 4.38 % 4.38 % 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 7.65 ns 7.65 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 7.63 ns 7.63 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.109 ns 0.109 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.43 % 1.43 % 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 7.84 ns 7.84 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 7.87 ns 7.87 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.130 ns 0.130 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.66 % 1.66 % 4
----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 29.4 ns 29.4 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 29.3 ns 29.3 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.371 ns 0.371 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 1.26 % 1.26 % 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 11.4 ns 11.4 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 11.4 ns 11.4 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.079 ns 0.079 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 0.70 % 0.70 % 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 13.2 ns 13.2 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 13.2 ns 13.2 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.292 ns 0.292 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 2.21 % 2.21 % 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 65.8 ns 65.8 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 65.6 ns 65.6 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 0.998 ns 0.998 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.52 % 1.52 % 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res); ERROR OCCURRED: 'not implemented'
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res); ERROR OCCURRED: 'not implemented'
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res); ERROR OCCURRED: 'not implemented'
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res); ERROR OCCURRED: 'not implemented'
ssa s = "1234.567e10"; double res = *s.to_double()_mean 34.8 ns 34.8 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_median 34.7 ns 34.7 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.864 ns 0.864 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.48 % 2.48 % 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 2080 ns 2080 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_median 2077 ns 2077 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 35.9 ns 35.9 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 1.72 % 1.72 % 4
std::string str; ... str += "abbaabbaabbaabba";_mean 416 ns 416 ns 4
std::string str; ... str += "abbaabbaabbaabba";_median 416 ns 416 ns 4
std::string str; ... str += "abbaabbaabbaabba";_stddev 18.5 ns 18.5 ns 4
std::string str; ... str += "abbaabbaabbaabba";_cv 4.45 % 4.45 % 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 362 ns 362 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 362 ns 362 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 3.73 ns 3.73 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 1.03 % 1.03 % 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 245 ns 245 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 248 ns 248 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 19.5 ns 19.5 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 7.96 % 7.96 % 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 217 ns 217 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 222 ns 222 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 16.2 ns 16.2 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 7.49 % 7.49 % 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 136 ns 136 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 136 ns 136 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 1.48 ns 1.48 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.09 % 1.08 % 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 2037 ns 2037 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 2042 ns 2042 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 54.5 ns 54.5 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.68 % 2.67 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1253 ns 1253 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1255 ns 1255 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 17.7 ns 17.7 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 1.41 % 1.41 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 401 ns 401 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 406 ns 406 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 23.1 ns 23.1 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.75 % 5.75 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 335 ns 335 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 346 ns 346 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 24.4 ns 24.4 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 7.29 % 7.29 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 291 ns 291 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 297 ns 297 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.8 ns 18.8 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 6.47 % 6.47 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 214 ns 214 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 214 ns 214 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 1.16 ns 1.16 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 0.54 % 0.54 % 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 159733 ns 159734 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 158296 ns 158296 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 6342 ns 6342 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 3.97 % 3.97 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 104710 ns 104710 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 104630 ns 104630 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1116 ns 1116 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.07 % 1.07 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 49815 ns 49815 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 49890 ns 49891 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 327 ns 327 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 0.66 % 0.66 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 27270 ns 27270 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 27160 ns 27160 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 903 ns 903 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.31 % 3.31 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16860 ns 16860 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16838 ns 16838 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 204 ns 204 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.21 % 1.21 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16899 ns 16899 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16878 ns 16878 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 88.6 ns 88.6 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 0.52 % 0.52 % 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 2073 ns 2073 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_median 2050 ns 2050 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_stddev 66.2 ns 66.2 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_cv 3.19 % 3.19 % 4
std::string str; ... str += str_var1 + str_var2;_mean 1492 ns 1492 ns 4
std::string str; ... str += str_var1 + str_var2;_median 1494 ns 1494 ns 4
std::string str; ... str += str_var1 + str_var2;_stddev 29.6 ns 29.6 ns 4
std::string str; ... str += str_var1 + str_var2;_cv 1.98 % 1.98 % 4
lstringa<16> str; ... str += str_var1 + str_var2;_mean 476 ns 476 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_median 480 ns 480 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 20.4 ns 20.4 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_cv 4.29 % 4.29 % 4
lstringa<128> str; ... str += str_var1 + str_var2;_mean 448 ns 448 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_median 460 ns 460 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 27.7 ns 27.7 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_cv 6.18 % 6.18 % 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 13.8 ns 13.8 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_cv 3.63 % 3.63 % 4
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 298 ns 298 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_median 296 ns 296 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 4.34 ns 4.34 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.46 % 1.46 % 4
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 3419 ns 3419 ns 4
std::stringstream str; str << "test = " << k << " times";_median 3420 ns 3420 ns 4
std::stringstream str; str << "test = " << k << " times";_stddev 78.3 ns 78.3 ns 4
std::stringstream str; str << "test = " << k << " times";_cv 2.29 % 2.29 % 4
std::string str = "test = " + std::to_string(k) + " times";_mean 474 ns 474 ns 4
std::string str = "test = " + std::to_string(k) + " times";_median 477 ns 477 ns 4
std::string str = "test = " + std::to_string(k) + " times";_stddev 9.20 ns 9.20 ns 4
std::string str = "test = " + std::to_string(k) + " times";_cv 1.94 % 1.94 % 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1229 ns 1229 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1226 ns 1226 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 15.9 ns 15.9 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.29 % 1.29 % 4
std::string str = std::format("test = {} times", k);_mean 959 ns 959 ns 4
std::string str = std::format("test = {} times", k);_median 955 ns 955 ns 4
std::string str = std::format("test = {} times", k);_stddev 9.35 ns 9.35 ns 4
std::string str = std::format("test = {} times", k);_cv 0.97 % 0.97 % 4
lstringa<8> str; str.format("test = {} times", k);_mean 2002 ns 2002 ns 4
lstringa<8> str; str.format("test = {} times", k);_median 2000 ns 2000 ns 4
lstringa<8> str; str.format("test = {} times", k);_stddev 27.3 ns 27.3 ns 4
lstringa<8> str; str.format("test = {} times", k);_cv 1.37 % 1.37 % 4
lstringa<32> str; str.format("test = {} times", k);_mean 1745 ns 1745 ns 4
lstringa<32> str; str.format("test = {} times", k);_median 1743 ns 1743 ns 4
lstringa<32> str; str.format("test = {} times", k);_stddev 33.1 ns 33.1 ns 4
lstringa<32> str; str.format("test = {} times", k);_cv 1.90 % 1.90 % 4
lstringa<8> str = "test = " + k + " times";_mean 263 ns 263 ns 4
lstringa<8> str = "test = " + k + " times";_median 264 ns 264 ns 4
lstringa<8> str = "test = " + k + " times";_stddev 5.32 ns 5.32 ns 4
lstringa<8> str = "test = " + k + " times";_cv 2.02 % 2.02 % 4
lstringa<32> str = "test = " + k + " times";_mean 119 ns 119 ns 4
lstringa<32> str = "test = " + k + " times";_median 119 ns 119 ns 4
lstringa<32> str = "test = " + k + " times";_stddev 1.45 ns 1.45 ns 4
lstringa<32> str = "test = " + k + " times";_cv 1.22 % 1.22 % 4
stringa str = "test = " + k + " times";_mean 118 ns 118 ns 4
stringa str = "test = " + k + " times";_median 118 ns 118 ns 4
stringa str = "test = " + k + " times";_stddev 0.943 ns 0.943 ns 4
stringa str = "test = " + k + " times";_cv 0.80 % 0.80 % 4
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 277 ns 277 ns 4
std::string::find + substr + std::strtol_median 276 ns 276 ns 4
std::string::find + substr + std::strtol_stddev 2.54 ns 2.54 ns 4
std::string::find + substr + std::strtol_cv 0.92 % 0.92 % 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 3.14 ns 3.14 ns 4
ssa::splitter + ssa::as_int_cv 1.97 % 1.97 % 4
ssa::splitf + functor_mean 213 ns 213 ns 4
ssa::splitf + functor_median 212 ns 212 ns 4
ssa::splitf + functor_stddev 8.20 ns 8.20 ns 4
ssa::splitf + functor_cv 3.84 % 3.84 % 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 916 ns 916 ns 4
Naive (and wrong) replace symbols with std::string find + replace_median 909 ns 909 ns 4
Naive (and wrong) replace symbols with std::string find + replace_stddev 27.2 ns 27.2 ns 4
Naive (and wrong) replace symbols with std::string find + replace_cv 2.97 % 2.97 % 4
replace symbols with std::string find_first_of + replace_mean 2428 ns 2428 ns 4
replace symbols with std::string find_first_of + replace_median 2432 ns 2432 ns 4
replace symbols with std::string find_first_of + replace_stddev 22.9 ns 22.9 ns 4
replace symbols with std::string find_first_of + replace_cv 0.94 % 0.94 % 4
replace symbols with std::string_view find_first_of + copy_mean 1026 ns 1026 ns 4
replace symbols with std::string_view find_first_of + copy_median 1018 ns 1018 ns 4
replace symbols with std::string_view find_first_of + copy_stddev 22.2 ns 22.2 ns 4
replace symbols with std::string_view find_first_of + copy_cv 2.16 % 2.16 % 4
replace runtime symbols with string expressions and without remembering all search results_mean 1408 ns 1408 ns 4
replace runtime symbols with string expressions and without remembering all search results_median 1410 ns 1410 ns 4
replace runtime symbols with string expressions and without remembering all search results_stddev 14.7 ns 14.7 ns 4
replace runtime symbols with string expressions and without remembering all search results_cv 1.04 % 1.04 % 4
replace runtime symbols with simstr and memorization of all search results_mean 1083 ns 1083 ns 4
replace runtime symbols with simstr and memorization of all search results_median 1076 ns 1076 ns 4
replace runtime symbols with simstr and memorization of all search results_stddev 17.0 ns 17.0 ns 4
replace runtime symbols with simstr and memorization of all search results_cv 1.57 % 1.57 % 4
replace const symbols with string expressions and without remembering all search results_mean 1128 ns 1128 ns 4
replace const symbols with string expressions and without remembering all search results_median 1130 ns 1130 ns 4
replace const symbols with string expressions and without remembering all search results_stddev 7.02 ns 7.02 ns 4
replace const symbols with string expressions and without remembering all search results_cv 0.62 % 0.62 % 4
replace const symbols with string expressions and memorization of all search results_mean 820 ns 820 ns 4
replace const symbols with string expressions and memorization of all search results_median 812 ns 812 ns 4
replace const symbols with string expressions and memorization of all search results_stddev 23.0 ns 23.0 ns 4
replace const symbols with string expressions and memorization of all search results_cv 2.81 % 2.81 % 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 177 ns 177 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_median 177 ns 177 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 0.976 ns 0.976 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_cv 0.55 % 0.55 % 4
Short replace symbols with std::string find_first_of + replace_mean 324 ns 324 ns 4
Short replace symbols with std::string find_first_of + replace_median 325 ns 325 ns 4
Short replace symbols with std::string find_first_of + replace_stddev 4.96 ns 4.96 ns 4
Short replace symbols with std::string find_first_of + replace_cv 1.53 % 1.53 % 4
Short replace symbols with std::string_view find_first_of + copy_mean 141 ns 141 ns 4
Short replace symbols with std::string_view find_first_of + copy_median 139 ns 139 ns 4
Short replace symbols with std::string_view find_first_of + copy_stddev 4.79 ns 4.79 ns 4
Short replace symbols with std::string_view find_first_of + copy_cv 3.41 % 3.41 % 4
Short replace runtime symbols with string expressions and without remembering all search results_mean 198 ns 198 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_median 197 ns 197 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_stddev 6.51 ns 6.51 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 186 ns 186 ns 4
Short replace runtime symbols with simstr and memorization of all search results_median 186 ns 186 ns 4
Short replace runtime symbols with simstr and memorization of all search results_stddev 2.39 ns 2.39 ns 4
Short replace runtime symbols with simstr and memorization of all search results_cv 1.28 % 1.28 % 4
Short replace const symbols with string expressions and without remembering all search results_mean 126 ns 126 ns 4
Short replace const symbols with string expressions and without remembering all search results_median 126 ns 126 ns 4
Short replace const symbols with string expressions and without remembering all search results_stddev 1.64 ns 1.64 ns 4
Short replace const symbols with string expressions and without remembering all search results_cv 1.30 % 1.30 % 4
Short replace const symbols with string expressions and memorization of all search results_mean 136 ns 136 ns 4
Short replace const symbols with string expressions and memorization of all search results_median 136 ns 136 ns 4
Short replace const symbols with string expressions and memorization of all search results_stddev 2.88 ns 2.88 ns 4
Short replace const symbols with string expressions and memorization of all search results_cv 2.12 % 2.12 % 4
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 180 ns 180 ns 4
replace bb to ---- in std::string|64_median 181 ns 181 ns 4
replace bb to ---- in std::string|64_stddev 5.27 ns 5.27 ns 4
replace bb to ---- in std::string|64_cv 2.93 % 2.93 % 4
replace bb to ---- in std::string|256_mean 842 ns 842 ns 4
replace bb to ---- in std::string|256_median 844 ns 844 ns 4
replace bb to ---- in std::string|256_stddev 12.7 ns 12.7 ns 4
replace bb to ---- in std::string|256_cv 1.50 % 1.50 % 4
replace bb to ---- in std::string|512_mean 1259 ns 1259 ns 4
replace bb to ---- in std::string|512_median 1269 ns 1269 ns 4
replace bb to ---- in std::string|512_stddev 30.9 ns 30.9 ns 4
replace bb to ---- in std::string|512_cv 2.45 % 2.45 % 4
replace bb to ---- in std::string|1024_mean 2422 ns 2422 ns 4
replace bb to ---- in std::string|1024_median 2423 ns 2423 ns 4
replace bb to ---- in std::string|1024_stddev 19.3 ns 19.3 ns 4
replace bb to ---- in std::string|1024_cv 0.80 % 0.80 % 4
replace bb to ---- in std::string|2048_mean 6347 ns 6347 ns 4
replace bb to ---- in std::string|2048_median 6403 ns 6403 ns 4
replace bb to ---- in std::string|2048_stddev 221 ns 221 ns 4
replace bb to ---- in std::string|2048_cv 3.48 % 3.48 % 4
replace bb to ---- in lstringa<8>|64_mean 129 ns 129 ns 4
replace bb to ---- in lstringa<8>|64_median 129 ns 129 ns 4
replace bb to ---- in lstringa<8>|64_stddev 3.09 ns 3.09 ns 4
replace bb to ---- in lstringa<8>|64_cv 2.39 % 2.39 % 4
replace bb to ---- in lstringa<8>|256_mean 444 ns 444 ns 4
replace bb to ---- in lstringa<8>|256_median 444 ns 444 ns 4
replace bb to ---- in lstringa<8>|256_stddev 12.1 ns 12.1 ns 4
replace bb to ---- in lstringa<8>|256_cv 2.73 % 2.73 % 4
replace bb to ---- in lstringa<8>|512_mean 828 ns 828 ns 4
replace bb to ---- in lstringa<8>|512_median 825 ns 825 ns 4
replace bb to ---- in lstringa<8>|512_stddev 23.9 ns 23.9 ns 4
replace bb to ---- in lstringa<8>|512_cv 2.89 % 2.89 % 4
replace bb to ---- in lstringa<8>|1024_mean 1614 ns 1614 ns 4
replace bb to ---- in lstringa<8>|1024_median 1611 ns 1611 ns 4
replace bb to ---- in lstringa<8>|1024_stddev 19.6 ns 19.6 ns 4
replace bb to ---- in lstringa<8>|1024_cv 1.21 % 1.21 % 4
replace bb to ---- in lstringa<8>|2048_mean 3127 ns 3127 ns 4
replace bb to ---- in lstringa<8>|2048_median 3109 ns 3109 ns 4
replace bb to ---- in lstringa<8>|2048_stddev 54.0 ns 54.0 ns 4
replace bb to ---- in lstringa<8>|2048_cv 1.73 % 1.73 % 4
replace bb to ---- by init stringa|64_mean 90.9 ns 90.9 ns 4
replace bb to ---- by init stringa|64_median 91.5 ns 91.5 ns 4
replace bb to ---- by init stringa|64_stddev 2.07 ns 2.07 ns 4
replace bb to ---- by init stringa|64_cv 2.28 % 2.28 % 4
replace bb to ---- by init stringa|256_mean 308 ns 308 ns 4
replace bb to ---- by init stringa|256_median 309 ns 309 ns 4
replace bb to ---- by init stringa|256_stddev 3.01 ns 3.01 ns 4
replace bb to ---- by init stringa|256_cv 0.98 % 0.98 % 4
replace bb to ---- by init stringa|512_mean 709 ns 709 ns 4
replace bb to ---- by init stringa|512_median 709 ns 709 ns 4
replace bb to ---- by init stringa|512_stddev 3.56 ns 3.56 ns 4
replace bb to ---- by init stringa|512_cv 0.50 % 0.50 % 4
replace bb to ---- by init stringa|1024_mean 1392 ns 1392 ns 4
replace bb to ---- by init stringa|1024_median 1391 ns 1391 ns 4
replace bb to ---- by init stringa|1024_stddev 5.76 ns 5.76 ns 4
replace bb to ---- by init stringa|1024_cv 0.41 % 0.41 % 4
replace bb to ---- by init stringa|2048_mean 2810 ns 2810 ns 4
replace bb to ---- by init stringa|2048_median 2815 ns 2815 ns 4
replace bb to ---- by init stringa|2048_stddev 36.4 ns 36.4 ns 4
replace bb to ---- by init stringa|2048_cv 1.29 % 1.29 % 4
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 130 ns 130 ns 4
replace bb to -- in std::string|64_median 129 ns 129 ns 4
replace bb to -- in std::string|64_stddev 2.30 ns 2.30 ns 4
replace bb to -- in std::string|64_cv 1.77 % 1.77 % 4
replace bb to -- in std::string|256_mean 427 ns 427 ns 4
replace bb to -- in std::string|256_median 429 ns 429 ns 4
replace bb to -- in std::string|256_stddev 6.83 ns 6.83 ns 4
replace bb to -- in std::string|256_cv 1.60 % 1.60 % 4
replace bb to -- in std::string|512_mean 851 ns 851 ns 4
replace bb to -- in std::string|512_median 849 ns 849 ns 4
replace bb to -- in std::string|512_stddev 11.5 ns 11.5 ns 4
replace bb to -- in std::string|512_cv 1.35 % 1.35 % 4
replace bb to -- in std::string|1024_mean 1603 ns 1603 ns 4
replace bb to -- in std::string|1024_median 1613 ns 1613 ns 4
replace bb to -- in std::string|1024_stddev 35.0 ns 35.0 ns 4
replace bb to -- in std::string|1024_cv 2.18 % 2.18 % 4
replace bb to -- in std::string|2048_mean 3230 ns 3230 ns 4
replace bb to -- in std::string|2048_median 3217 ns 3217 ns 4
replace bb to -- in std::string|2048_stddev 41.6 ns 41.6 ns 4
replace bb to -- in std::string|2048_cv 1.29 % 1.29 % 4
replace bb to -- in lstringa<8>|64_mean 90.8 ns 90.8 ns 4
replace bb to -- in lstringa<8>|64_median 91.5 ns 91.5 ns 4
replace bb to -- in lstringa<8>|64_stddev 1.56 ns 1.56 ns 4
replace bb to -- in lstringa<8>|64_cv 1.72 % 1.72 % 4
replace bb to -- in lstringa<8>|256_mean 294 ns 294 ns 4
replace bb to -- in lstringa<8>|256_median 294 ns 294 ns 4
replace bb to -- in lstringa<8>|256_stddev 5.26 ns 5.26 ns 4
replace bb to -- in lstringa<8>|256_cv 1.79 % 1.79 % 4
replace bb to -- in lstringa<8>|512_mean 551 ns 551 ns 4
replace bb to -- in lstringa<8>|512_median 555 ns 555 ns 4
replace bb to -- in lstringa<8>|512_stddev 9.79 ns 9.78 ns 4
replace bb to -- in lstringa<8>|512_cv 1.78 % 1.78 % 4
replace bb to -- in lstringa<8>|1024_mean 1066 ns 1066 ns 4
replace bb to -- in lstringa<8>|1024_median 1071 ns 1071 ns 4
replace bb to -- in lstringa<8>|1024_stddev 18.1 ns 18.1 ns 4
replace bb to -- in lstringa<8>|1024_cv 1.70 % 1.70 % 4
replace bb to -- in lstringa<8>|2048_mean 2242 ns 2242 ns 4
replace bb to -- in lstringa<8>|2048_median 2197 ns 2197 ns 4
replace bb to -- in lstringa<8>|2048_stddev 132 ns 132 ns 4
replace bb to -- in lstringa<8>|2048_cv 5.90 % 5.90 % 4
replace bb to -- by init stringa|64_mean 83.0 ns 83.0 ns 4
replace bb to -- by init stringa|64_median 81.6 ns 81.6 ns 4
replace bb to -- by init stringa|64_stddev 4.12 ns 4.12 ns 4
replace bb to -- by init stringa|64_cv 4.96 % 4.96 % 4
replace bb to -- by init stringa|256_mean 237 ns 237 ns 4
replace bb to -- by init stringa|256_median 236 ns 236 ns 4
replace bb to -- by init stringa|256_stddev 4.04 ns 4.04 ns 4
replace bb to -- by init stringa|256_cv 1.70 % 1.70 % 4
replace bb to -- by init stringa|512_mean 435 ns 435 ns 4
replace bb to -- by init stringa|512_median 435 ns 435 ns 4
replace bb to -- by init stringa|512_stddev 5.95 ns 5.95 ns 4
replace bb to -- by init stringa|512_cv 1.37 % 1.37 % 4
replace bb to -- by init stringa|1024_mean 851 ns 851 ns 4
replace bb to -- by init stringa|1024_median 846 ns 846 ns 4
replace bb to -- by init stringa|1024_stddev 18.7 ns 18.7 ns 4
replace bb to -- by init stringa|1024_cv 2.20 % 2.20 % 4
replace bb to -- by init stringa|2048_mean 1658 ns 1658 ns 4
replace bb to -- by init stringa|2048_median 1652 ns 1652 ns 4
replace bb to -- by init stringa|2048_stddev 28.9 ns 28.9 ns 4
replace bb to -- by init stringa|2048_cv 1.74 % 1.74 % 4
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3780026 ns 3780035 ns 4
hashStrMapA<size_t> emplace & find stringa;_median 3764708 ns 3764717 ns 4
hashStrMapA<size_t> emplace & find stringa;_stddev 108428 ns 108427 ns 4
hashStrMapA<size_t> emplace & find stringa;_cv 2.87 % 2.87 % 4
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3706958 ns 3706967 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3712805 ns 3712816 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 32417 ns 32419 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 0.87 % 0.87 % 4
hashStrMapA<size_t> emplace & find ssa;_mean 3815600 ns 3815610 ns 4
hashStrMapA<size_t> emplace & find ssa;_median 3818146 ns 3818155 ns 4
hashStrMapA<size_t> emplace & find ssa;_stddev 36526 ns 36523 ns 4
hashStrMapA<size_t> emplace & find ssa;_cv 0.96 % 0.96 % 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 4134155 ns 4134170 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 4133427 ns 4133445 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 54010 ns 54012 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 1.31 % 1.31 % 4
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 1021 ns 1021 ns 4
Build func full name std::string;_median 1018 ns 1018 ns 4
Build func full name std::string;_stddev 20.5 ns 20.5 ns 4
Build func full name std::string;_cv 2.01 % 2.01 % 4
Build func full name std::string 1;_mean 1021 ns 1021 ns 4
Build func full name std::string 1;_median 1019 ns 1019 ns 4
Build func full name std::string 1;_stddev 26.5 ns 26.5 ns 4
Build func full name std::string 1;_cv 2.60 % 2.60 % 4
Build func full name std::stream;_mean 2984 ns 2984 ns 4
Build func full name std::stream;_median 2987 ns 2987 ns 4
Build func full name std::stream;_stddev 37.7 ns 37.7 ns 4
Build func full name std::stream;_cv 1.26 % 1.26 % 4
Build func full name stringa;_mean 471 ns 471 ns 4
Build func full name stringa;_median 470 ns 470 ns 4
Build func full name stringa;_stddev 4.83 ns 4.83 ns 4
Build func full name stringa;_cv 1.02 % 1.02 % 4
Build func full name stringa 1;_mean 648 ns 648 ns 4
Build func full name stringa 1;_median 651 ns 651 ns 4
Build func full name stringa 1;_stddev 9.87 ns 9.87 ns 4
Build func full name stringa 1;_cv 1.52 % 1.52 % 4
----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
To upper case std::wstring_mean 175 ns 175 ns 4
To upper case std::wstring_median 177 ns 177 ns 4
To upper case std::wstring_stddev 3.99 ns 3.99 ns 4
To upper case std::wstring_cv 2.28 % 2.28 % 4
To upper case lstringw<15>_mean 38.5 ns 38.5 ns 4
To upper case lstringw<15>_median 38.5 ns 38.5 ns 4
To upper case lstringw<15>_stddev 1.33 ns 1.33 ns 4
To upper case lstringw<15>_cv 3.44 % 3.44 % 4

View File

@ -1,878 +0,0 @@
2026-01-21T07:11:34+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 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 10
Concat std::string and number by std to std::string_median 205 ns 205 ns 10
Concat std::string and number by std to std::string_stddev 7.79 ns 7.79 ns 10
Concat std::string and number by std to std::string_cv 3.77 % 3.77 % 10
Concat std::string and number by StrExpr to std::string_mean 102 ns 102 ns 10
Concat std::string and number by StrExpr to std::string_median 101 ns 101 ns 10
Concat std::string and number by StrExpr to std::string_stddev 2.95 ns 2.95 ns 10
Concat std::string and number by StrExpr to std::string_cv 2.90 % 2.90 % 10
Concat stringa and number by StrExpr to simstr::stringa_mean 70.4 ns 70.4 ns 10
Concat stringa and number by StrExpr to simstr::stringa_median 69.3 ns 69.3 ns 10
Concat stringa and number by StrExpr to simstr::stringa_stddev 3.12 ns 3.12 ns 10
Concat stringa and number by StrExpr to simstr::stringa_cv 4.43 % 4.43 % 10
----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and hex number by std to std::string_mean 668 ns 668 ns 10
Concat std::string and hex number by std to std::string_median 665 ns 665 ns 10
Concat std::string and hex number by std to std::string_stddev 21.8 ns 21.8 ns 10
Concat std::string and hex number by std to std::string_cv 3.27 % 3.27 % 10
Concat std::string and hex number by StrExpr to std::string_mean 65.9 ns 65.9 ns 10
Concat std::string and hex number by StrExpr to std::string_median 65.3 ns 65.3 ns 10
Concat std::string and hex number by StrExpr to std::string_stddev 2.24 ns 2.24 ns 10
Concat std::string and hex number by StrExpr to std::string_cv 3.39 % 3.39 % 10
Concat stringa and hex number by StrExpr to simstr::stringa_mean 68.2 ns 68.2 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_median 67.9 ns 67.9 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_stddev 1.59 ns 1.59 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_cv 2.33 % 2.33 % 10
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 44.7 ns 44.7 ns 10
Concat std::string by std to std::string_median 43.5 ns 43.5 ns 10
Concat std::string by std to std::string_stddev 2.51 ns 2.51 ns 10
Concat std::string by std to std::string_cv 5.61 % 5.61 % 10
Concat std::string by StrExpr to std::string_mean 35.9 ns 35.9 ns 10
Concat std::string by StrExpr to std::string_median 35.8 ns 35.8 ns 10
Concat std::string by StrExpr to std::string_stddev 1.12 ns 1.12 ns 10
Concat std::string by StrExpr to std::string_cv 3.12 % 3.12 % 10
Concat stringa by StrExpr to stringa_mean 25.9 ns 25.9 ns 10
Concat stringa by StrExpr to stringa_median 25.7 ns 25.7 ns 10
Concat stringa by StrExpr to stringa_stddev 0.700 ns 0.700 ns 10
Concat stringa by StrExpr to stringa_cv 2.71 % 2.71 % 10
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 130 ns 130 ns 10
Find concat three std::string_median 128 ns 128 ns 10
Find concat three std::string_stddev 4.71 ns 4.71 ns 10
Find concat three std::string_cv 3.62 % 3.62 % 10
Find concat three strexpr_mean 39.8 ns 39.8 ns 10
Find concat three strexpr_median 39.1 ns 39.1 ns 10
Find concat three strexpr_stddev 2.02 ns 2.02 ns 10
Find concat three strexpr_cv 5.08 % 5.08 % 10
Find concat three simstr_mean 20.2 ns 20.2 ns 10
Find concat three simstr_median 20.2 ns 20.2 ns 10
Find concat three simstr_stddev 0.739 ns 0.739 ns 10
Find concat three simstr_cv 3.66 % 3.66 % 10
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 10.7 ns 10.7 ns 10
BuildTypeNameStr 0/0_median 10.6 ns 10.6 ns 10
BuildTypeNameStr 0/0_stddev 0.506 ns 0.506 ns 10
BuildTypeNameStr 0/0_cv 4.74 % 4.74 % 10
BuildTypeNameExp 0/0_mean 6.63 ns 6.63 ns 10
BuildTypeNameExp 0/0_median 6.61 ns 6.61 ns 10
BuildTypeNameExp 0/0_stddev 0.061 ns 0.061 ns 10
BuildTypeNameExp 0/0_cv 0.92 % 0.92 % 10
BuildTypeNameSim 0/0_mean 5.23 ns 5.23 ns 10
BuildTypeNameSim 0/0_median 5.16 ns 5.16 ns 10
BuildTypeNameSim 0/0_stddev 0.156 ns 0.156 ns 10
BuildTypeNameSim 0/0_cv 2.98 % 2.98 % 10
BuildTypeNameStr 10/10_mean 91.9 ns 91.9 ns 10
BuildTypeNameStr 10/10_median 91.8 ns 91.8 ns 10
BuildTypeNameStr 10/10_stddev 7.70 ns 7.70 ns 10
BuildTypeNameStr 10/10_cv 8.38 % 8.38 % 10
BuildTypeNameExp 10/10_mean 25.3 ns 25.3 ns 10
BuildTypeNameExp 10/10_median 24.6 ns 24.6 ns 10
BuildTypeNameExp 10/10_stddev 1.31 ns 1.31 ns 10
BuildTypeNameExp 10/10_cv 5.17 % 5.17 % 10
BuildTypeNameSim 10/10_mean 22.7 ns 22.7 ns 10
BuildTypeNameSim 10/10_median 22.5 ns 22.5 ns 10
BuildTypeNameSim 10/10_stddev 0.865 ns 0.865 ns 10
BuildTypeNameSim 10/10_cv 3.81 % 3.81 % 10
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 242 ns 242 ns 10
Concat with replace str_median 240 ns 240 ns 10
Concat with replace str_stddev 10.6 ns 10.6 ns 10
Concat with replace str_cv 4.39 % 4.39 % 10
Concat with replace exp_mean 135 ns 135 ns 10
Concat with replace exp_median 132 ns 132 ns 10
Concat with replace exp_stddev 8.05 ns 8.05 ns 10
Concat with replace exp_cv 5.95 % 5.95 % 10
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 1.12 ns 1.12 ns 10
std::string e;_median 1.12 ns 1.12 ns 10
std::string e;_stddev 0.032 ns 0.032 ns 10
std::string e;_cv 2.87 % 2.87 % 10
std::string_view e;_mean 0.737 ns 0.737 ns 10
std::string_view e;_median 0.735 ns 0.735 ns 10
std::string_view e;_stddev 0.012 ns 0.012 ns 10
std::string_view e;_cv 1.59 % 1.59 % 10
ssa e;_mean 0.182 ns 0.182 ns 10
ssa e;_median 0.182 ns 0.182 ns 10
ssa e;_stddev 0.002 ns 0.002 ns 10
ssa e;_cv 1.19 % 1.19 % 10
stringa e;_mean 0.751 ns 0.751 ns 10
stringa e;_median 0.735 ns 0.735 ns 10
stringa e;_stddev 0.030 ns 0.030 ns 10
stringa e;_cv 3.95 % 3.95 % 10
lstringa<20> e;_mean 1.12 ns 1.12 ns 10
lstringa<20> e;_median 1.12 ns 1.12 ns 10
lstringa<20> e;_stddev 0.023 ns 0.023 ns 10
lstringa<20> e;_cv 2.10 % 2.10 % 10
lstringa<40> e;_mean 1.11 ns 1.11 ns 10
lstringa<40> e;_median 1.10 ns 1.10 ns 10
lstringa<40> e;_stddev 0.011 ns 0.011 ns 10
lstringa<40> e;_cv 1.01 % 1.01 % 10
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 1.87 ns 1.87 ns 10
std::string e = "Test text";_median 1.83 ns 1.83 ns 10
std::string e = "Test text";_stddev 0.097 ns 0.097 ns 10
std::string e = "Test text";_cv 5.21 % 5.21 % 10
std::string_view e = "Test text";_mean 0.730 ns 0.730 ns 10
std::string_view e = "Test text";_median 0.729 ns 0.729 ns 10
std::string_view e = "Test text";_stddev 0.006 ns 0.006 ns 10
std::string_view e = "Test text";_cv 0.89 % 0.89 % 10
ssa e = "Test text";_mean 0.736 ns 0.736 ns 10
ssa e = "Test text";_median 0.733 ns 0.733 ns 10
ssa e = "Test text";_stddev 0.016 ns 0.016 ns 10
ssa e = "Test text";_cv 2.14 % 2.14 % 10
stringa e = "Test text";_mean 1.12 ns 1.12 ns 10
stringa e = "Test text";_median 1.11 ns 1.11 ns 10
stringa e = "Test text";_stddev 0.028 ns 0.028 ns 10
stringa e = "Test text";_cv 2.53 % 2.53 % 10
lstringa<20> e = "Test text";_mean 1.87 ns 1.87 ns 10
lstringa<20> e = "Test text";_median 1.85 ns 1.85 ns 10
lstringa<20> e = "Test text";_stddev 0.074 ns 0.074 ns 10
lstringa<20> e = "Test text";_cv 3.93 % 3.93 % 10
lstringa<40> e = "Test text";_mean 1.89 ns 1.89 ns 10
lstringa<40> e = "Test text";_median 1.89 ns 1.89 ns 10
lstringa<40> e = "Test text";_stddev 0.056 ns 0.056 ns 10
lstringa<40> e = "Test text";_cv 2.95 % 2.95 % 10
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 19.3 ns 19.3 ns 10
std::string e = "123456789012345678901234567890";_median 19.1 ns 19.1 ns 10
std::string e = "123456789012345678901234567890";_stddev 0.662 ns 0.662 ns 10
std::string e = "123456789012345678901234567890";_cv 3.44 % 3.44 % 10
std::string_view e = "123456789012345678901234567890";_mean 0.744 ns 0.744 ns 10
std::string_view e = "123456789012345678901234567890";_median 0.737 ns 0.737 ns 10
std::string_view e = "123456789012345678901234567890";_stddev 0.021 ns 0.021 ns 10
std::string_view e = "123456789012345678901234567890";_cv 2.80 % 2.80 % 10
ssa e = "123456789012345678901234567890";_mean 0.735 ns 0.735 ns 10
ssa e = "123456789012345678901234567890";_median 0.734 ns 0.734 ns 10
ssa e = "123456789012345678901234567890";_stddev 0.011 ns 0.011 ns 10
ssa e = "123456789012345678901234567890";_cv 1.50 % 1.50 % 10
stringa e = "123456789012345678901234567890";_mean 1.12 ns 1.12 ns 10
stringa e = "123456789012345678901234567890";_median 1.09 ns 1.09 ns 10
stringa e = "123456789012345678901234567890";_stddev 0.042 ns 0.042 ns 10
stringa e = "123456789012345678901234567890";_cv 3.73 % 3.73 % 10
lstringa<20> e = "123456789012345678901234567890";_mean 20.0 ns 20.0 ns 10
lstringa<20> e = "123456789012345678901234567890";_median 20.1 ns 20.1 ns 10
lstringa<20> e = "123456789012345678901234567890";_stddev 0.301 ns 0.301 ns 10
lstringa<20> e = "123456789012345678901234567890";_cv 1.50 % 1.50 % 10
lstringa<40> e = "123456789012345678901234567890";_mean 1.84 ns 1.84 ns 10
lstringa<40> e = "123456789012345678901234567890";_median 1.83 ns 1.83 ns 10
lstringa<40> e = "123456789012345678901234567890";_stddev 0.034 ns 0.034 ns 10
lstringa<40> e = "123456789012345678901234567890";_cv 1.83 % 1.83 % 10
----- 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 10
std::string e = "Test text"; auto c{e};_median 4.79 ns 4.79 ns 10
std::string e = "Test text"; auto c{e};_stddev 0.056 ns 0.056 ns 10
std::string e = "Test text"; auto c{e};_cv 1.16 % 1.16 % 10
std::string_view e = "Test text"; auto c{e};_mean 0.373 ns 0.373 ns 10
std::string_view e = "Test text"; auto c{e};_median 0.373 ns 0.373 ns 10
std::string_view e = "Test text"; auto c{e};_stddev 0.004 ns 0.004 ns 10
std::string_view e = "Test text"; auto c{e};_cv 1.21 % 1.21 % 10
ssa e = "Test text"; auto c{e};_mean 0.376 ns 0.376 ns 10
ssa e = "Test text"; auto c{e};_median 0.371 ns 0.371 ns 10
ssa e = "Test text"; auto c{e};_stddev 0.021 ns 0.021 ns 10
ssa e = "Test text"; auto c{e};_cv 5.50 % 5.50 % 10
stringa e = "Test text"; auto c{e};_mean 1.37 ns 1.37 ns 10
stringa e = "Test text"; auto c{e};_median 1.31 ns 1.31 ns 10
stringa e = "Test text"; auto c{e};_stddev 0.102 ns 0.102 ns 10
stringa e = "Test text"; auto c{e};_cv 7.45 % 7.45 % 10
lstringa<20> e = "Test text"; auto c{e};_mean 4.43 ns 4.43 ns 10
lstringa<20> e = "Test text"; auto c{e};_median 4.40 ns 4.40 ns 10
lstringa<20> e = "Test text"; auto c{e};_stddev 0.101 ns 0.101 ns 10
lstringa<20> e = "Test text"; auto c{e};_cv 2.27 % 2.27 % 10
lstringa<40> e = "Test text"; auto c{e};_mean 4.49 ns 4.49 ns 10
lstringa<40> e = "Test text"; auto c{e};_median 4.48 ns 4.48 ns 10
lstringa<40> e = "Test text"; auto c{e};_stddev 0.127 ns 0.127 ns 10
lstringa<40> e = "Test text"; auto c{e};_cv 2.84 % 2.84 % 10
----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890"; auto c{e};_mean 24.3 ns 24.3 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_median 24.1 ns 24.1 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.599 ns 0.599 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_cv 2.46 % 2.46 % 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.724 ns 0.724 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.724 ns 0.724 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.007 ns 0.007 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 0.91 % 0.91 % 10
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.752 ns 0.752 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.751 ns 0.751 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.024 ns 0.024 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_cv 3.21 % 3.21 % 10
stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.11 ns 1.11 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_median 1.11 ns 1.11 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.028 ns 0.028 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_cv 2.48 % 2.48 % 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 20.1 ns 20.1 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 20.0 ns 20.0 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.428 ns 0.428 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.13 % 2.13 % 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.52 ns 4.52 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.49 ns 4.49 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.115 ns 0.115 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 2.54 % 2.54 % 10
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find;_mean 7.33 ns 7.33 ns 10
std::string::find;_median 7.15 ns 7.15 ns 10
std::string::find;_stddev 0.514 ns 0.513 ns 10
std::string::find;_cv 7.00 % 7.00 % 10
std::string_view::find;_mean 6.78 ns 6.78 ns 10
std::string_view::find;_median 6.74 ns 6.74 ns 10
std::string_view::find;_stddev 0.241 ns 0.241 ns 10
std::string_view::find;_cv 3.56 % 3.56 % 10
ssa::find;_mean 6.32 ns 6.32 ns 10
ssa::find;_median 6.27 ns 6.27 ns 10
ssa::find;_stddev 0.136 ns 0.136 ns 10
ssa::find;_cv 2.16 % 2.16 % 10
stringa::find;_mean 6.77 ns 6.77 ns 10
stringa::find;_median 6.75 ns 6.75 ns 10
stringa::find;_stddev 0.152 ns 0.152 ns 10
stringa::find;_cv 2.25 % 2.25 % 10
lstringa<20>::find;_mean 6.33 ns 6.33 ns 10
lstringa<20>::find;_median 6.26 ns 6.26 ns 10
lstringa<20>::find;_stddev 0.205 ns 0.205 ns 10
lstringa<20>::find;_cv 3.24 % 3.24 % 10
lstringa<40>::find;_mean 6.43 ns 6.43 ns 10
lstringa<40>::find;_median 6.36 ns 6.36 ns 10
lstringa<40>::find;_stddev 0.307 ns 0.307 ns 10
lstringa<40>::find;_cv 4.77 % 4.77 % 10
------- 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.20 ns 5.20 ns 10
std::string copy{str_with_len_N};/15_median 5.18 ns 5.18 ns 10
std::string copy{str_with_len_N};/15_stddev 0.124 ns 0.124 ns 10
std::string copy{str_with_len_N};/15_cv 2.39 % 2.39 % 10
std::string copy{str_with_len_N};/16_mean 23.6 ns 23.6 ns 10
std::string copy{str_with_len_N};/16_median 23.7 ns 23.7 ns 10
std::string copy{str_with_len_N};/16_stddev 0.628 ns 0.628 ns 10
std::string copy{str_with_len_N};/16_cv 2.66 % 2.66 % 10
std::string copy{str_with_len_N};/23_mean 23.0 ns 23.0 ns 10
std::string copy{str_with_len_N};/23_median 23.0 ns 23.0 ns 10
std::string copy{str_with_len_N};/23_stddev 0.156 ns 0.156 ns 10
std::string copy{str_with_len_N};/23_cv 0.68 % 0.68 % 10
std::string copy{str_with_len_N};/24_mean 23.1 ns 23.1 ns 10
std::string copy{str_with_len_N};/24_median 23.1 ns 23.1 ns 10
std::string copy{str_with_len_N};/24_stddev 0.362 ns 0.362 ns 10
std::string copy{str_with_len_N};/24_cv 1.57 % 1.57 % 10
std::string copy{str_with_len_N};/32_mean 23.4 ns 23.4 ns 10
std::string copy{str_with_len_N};/32_median 23.3 ns 23.3 ns 10
std::string copy{str_with_len_N};/32_stddev 0.533 ns 0.533 ns 10
std::string copy{str_with_len_N};/32_cv 2.28 % 2.28 % 10
std::string copy{str_with_len_N};/64_mean 24.0 ns 24.0 ns 10
std::string copy{str_with_len_N};/64_median 23.9 ns 23.9 ns 10
std::string copy{str_with_len_N};/64_stddev 1.21 ns 1.21 ns 10
std::string copy{str_with_len_N};/64_cv 5.03 % 5.03 % 10
std::string copy{str_with_len_N};/128_mean 24.5 ns 24.5 ns 10
std::string copy{str_with_len_N};/128_median 24.4 ns 24.4 ns 10
std::string copy{str_with_len_N};/128_stddev 0.331 ns 0.331 ns 10
std::string copy{str_with_len_N};/128_cv 1.35 % 1.35 % 10
std::string copy{str_with_len_N};/256_mean 25.1 ns 25.1 ns 10
std::string copy{str_with_len_N};/256_median 24.8 ns 24.8 ns 10
std::string copy{str_with_len_N};/256_stddev 0.922 ns 0.922 ns 10
std::string copy{str_with_len_N};/256_cv 3.67 % 3.67 % 10
std::string copy{str_with_len_N};/512_mean 29.0 ns 29.0 ns 10
std::string copy{str_with_len_N};/512_median 29.0 ns 29.0 ns 10
std::string copy{str_with_len_N};/512_stddev 0.576 ns 0.576 ns 10
std::string copy{str_with_len_N};/512_cv 1.99 % 1.99 % 10
std::string copy{str_with_len_N};/1024_mean 44.3 ns 44.3 ns 10
std::string copy{str_with_len_N};/1024_median 44.1 ns 44.1 ns 10
std::string copy{str_with_len_N};/1024_stddev 0.821 ns 0.821 ns 10
std::string copy{str_with_len_N};/1024_cv 1.86 % 1.86 % 10
std::string copy{str_with_len_N};/2048_mean 130 ns 130 ns 10
std::string copy{str_with_len_N};/2048_median 131 ns 131 ns 10
std::string copy{str_with_len_N};/2048_stddev 8.66 ns 8.66 ns 10
std::string copy{str_with_len_N};/2048_cv 6.66 % 6.66 % 10
std::string copy{str_with_len_N};/4096_mean 157 ns 157 ns 10
std::string copy{str_with_len_N};/4096_median 158 ns 158 ns 10
std::string copy{str_with_len_N};/4096_stddev 10.6 ns 10.6 ns 10
std::string copy{str_with_len_N};/4096_cv 6.77 % 6.77 % 10
stringa copy{str_with_len_N};/15_mean 1.14 ns 1.14 ns 10
stringa copy{str_with_len_N};/15_median 1.13 ns 1.13 ns 10
stringa copy{str_with_len_N};/15_stddev 0.042 ns 0.042 ns 10
stringa copy{str_with_len_N};/15_cv 3.67 % 3.67 % 10
stringa copy{str_with_len_N};/16_mean 1.10 ns 1.10 ns 10
stringa copy{str_with_len_N};/16_median 1.10 ns 1.10 ns 10
stringa copy{str_with_len_N};/16_stddev 0.017 ns 0.017 ns 10
stringa copy{str_with_len_N};/16_cv 1.50 % 1.50 % 10
stringa copy{str_with_len_N};/23_mean 1.11 ns 1.11 ns 10
stringa copy{str_with_len_N};/23_median 1.11 ns 1.11 ns 10
stringa copy{str_with_len_N};/23_stddev 0.016 ns 0.016 ns 10
stringa copy{str_with_len_N};/23_cv 1.44 % 1.44 % 10
stringa copy{str_with_len_N};/24_mean 16.2 ns 16.2 ns 10
stringa copy{str_with_len_N};/24_median 16.2 ns 16.2 ns 10
stringa copy{str_with_len_N};/24_stddev 0.215 ns 0.215 ns 10
stringa copy{str_with_len_N};/24_cv 1.33 % 1.33 % 10
stringa copy{str_with_len_N};/32_mean 16.3 ns 16.3 ns 10
stringa copy{str_with_len_N};/32_median 16.2 ns 16.2 ns 10
stringa copy{str_with_len_N};/32_stddev 0.264 ns 0.264 ns 10
stringa copy{str_with_len_N};/32_cv 1.62 % 1.62 % 10
stringa copy{str_with_len_N};/64_mean 16.5 ns 16.5 ns 10
stringa copy{str_with_len_N};/64_median 16.5 ns 16.5 ns 10
stringa copy{str_with_len_N};/64_stddev 0.299 ns 0.299 ns 10
stringa copy{str_with_len_N};/64_cv 1.81 % 1.81 % 10
stringa copy{str_with_len_N};/128_mean 16.4 ns 16.4 ns 10
stringa copy{str_with_len_N};/128_median 16.5 ns 16.5 ns 10
stringa copy{str_with_len_N};/128_stddev 0.327 ns 0.327 ns 10
stringa copy{str_with_len_N};/128_cv 1.99 % 1.99 % 10
stringa copy{str_with_len_N};/256_mean 16.2 ns 16.2 ns 10
stringa copy{str_with_len_N};/256_median 16.1 ns 16.1 ns 10
stringa copy{str_with_len_N};/256_stddev 0.261 ns 0.261 ns 10
stringa copy{str_with_len_N};/256_cv 1.61 % 1.61 % 10
stringa copy{str_with_len_N};/512_mean 16.3 ns 16.3 ns 10
stringa copy{str_with_len_N};/512_median 16.2 ns 16.2 ns 10
stringa copy{str_with_len_N};/512_stddev 0.272 ns 0.272 ns 10
stringa copy{str_with_len_N};/512_cv 1.67 % 1.67 % 10
stringa copy{str_with_len_N};/1024_mean 16.3 ns 16.3 ns 10
stringa copy{str_with_len_N};/1024_median 16.1 ns 16.1 ns 10
stringa copy{str_with_len_N};/1024_stddev 0.357 ns 0.357 ns 10
stringa copy{str_with_len_N};/1024_cv 2.19 % 2.19 % 10
stringa copy{str_with_len_N};/2048_mean 16.4 ns 16.4 ns 10
stringa copy{str_with_len_N};/2048_median 16.2 ns 16.2 ns 10
stringa copy{str_with_len_N};/2048_stddev 0.371 ns 0.371 ns 10
stringa copy{str_with_len_N};/2048_cv 2.26 % 2.26 % 10
stringa copy{str_with_len_N};/4096_mean 16.5 ns 16.5 ns 10
stringa copy{str_with_len_N};/4096_median 16.4 ns 16.4 ns 10
stringa copy{str_with_len_N};/4096_stddev 0.427 ns 0.427 ns 10
stringa copy{str_with_len_N};/4096_cv 2.59 % 2.59 % 10
lstringa<16> copy{str_with_len_N};/15_mean 4.51 ns 4.51 ns 10
lstringa<16> copy{str_with_len_N};/15_median 4.49 ns 4.49 ns 10
lstringa<16> copy{str_with_len_N};/15_stddev 0.147 ns 0.147 ns 10
lstringa<16> copy{str_with_len_N};/15_cv 3.26 % 3.26 % 10
lstringa<16> copy{str_with_len_N};/16_mean 4.50 ns 4.50 ns 10
lstringa<16> copy{str_with_len_N};/16_median 4.46 ns 4.46 ns 10
lstringa<16> copy{str_with_len_N};/16_stddev 0.131 ns 0.131 ns 10
lstringa<16> copy{str_with_len_N};/16_cv 2.91 % 2.91 % 10
lstringa<16> copy{str_with_len_N};/23_mean 4.56 ns 4.56 ns 10
lstringa<16> copy{str_with_len_N};/23_median 4.57 ns 4.57 ns 10
lstringa<16> copy{str_with_len_N};/23_stddev 0.126 ns 0.126 ns 10
lstringa<16> copy{str_with_len_N};/23_cv 2.77 % 2.77 % 10
lstringa<16> copy{str_with_len_N};/24_mean 24.2 ns 24.2 ns 10
lstringa<16> copy{str_with_len_N};/24_median 24.0 ns 24.0 ns 10
lstringa<16> copy{str_with_len_N};/24_stddev 0.622 ns 0.622 ns 10
lstringa<16> copy{str_with_len_N};/24_cv 2.57 % 2.57 % 10
lstringa<16> copy{str_with_len_N};/32_mean 23.7 ns 23.7 ns 10
lstringa<16> copy{str_with_len_N};/32_median 23.6 ns 23.6 ns 10
lstringa<16> copy{str_with_len_N};/32_stddev 0.525 ns 0.525 ns 10
lstringa<16> copy{str_with_len_N};/32_cv 2.22 % 2.22 % 10
lstringa<16> copy{str_with_len_N};/64_mean 25.4 ns 25.4 ns 10
lstringa<16> copy{str_with_len_N};/64_median 25.2 ns 25.2 ns 10
lstringa<16> copy{str_with_len_N};/64_stddev 0.675 ns 0.675 ns 10
lstringa<16> copy{str_with_len_N};/64_cv 2.65 % 2.65 % 10
lstringa<16> copy{str_with_len_N};/128_mean 26.8 ns 26.8 ns 10
lstringa<16> copy{str_with_len_N};/128_median 26.6 ns 26.6 ns 10
lstringa<16> copy{str_with_len_N};/128_stddev 0.702 ns 0.702 ns 10
lstringa<16> copy{str_with_len_N};/128_cv 2.62 % 2.62 % 10
lstringa<16> copy{str_with_len_N};/256_mean 27.8 ns 27.8 ns 10
lstringa<16> copy{str_with_len_N};/256_median 27.7 ns 27.7 ns 10
lstringa<16> copy{str_with_len_N};/256_stddev 1.06 ns 1.06 ns 10
lstringa<16> copy{str_with_len_N};/256_cv 3.79 % 3.79 % 10
lstringa<16> copy{str_with_len_N};/512_mean 31.9 ns 31.9 ns 10
lstringa<16> copy{str_with_len_N};/512_median 31.2 ns 31.2 ns 10
lstringa<16> copy{str_with_len_N};/512_stddev 1.63 ns 1.63 ns 10
lstringa<16> copy{str_with_len_N};/512_cv 5.11 % 5.11 % 10
lstringa<16> copy{str_with_len_N};/1024_mean 96.9 ns 96.9 ns 10
lstringa<16> copy{str_with_len_N};/1024_median 97.0 ns 97.0 ns 10
lstringa<16> copy{str_with_len_N};/1024_stddev 12.0 ns 12.0 ns 10
lstringa<16> copy{str_with_len_N};/1024_cv 12.35 % 12.35 % 10
lstringa<16> copy{str_with_len_N};/2048_mean 117 ns 117 ns 10
lstringa<16> copy{str_with_len_N};/2048_median 118 ns 118 ns 10
lstringa<16> copy{str_with_len_N};/2048_stddev 9.38 ns 9.38 ns 10
lstringa<16> copy{str_with_len_N};/2048_cv 8.05 % 8.05 % 10
lstringa<16> copy{str_with_len_N};/4096_mean 130 ns 130 ns 10
lstringa<16> copy{str_with_len_N};/4096_median 129 ns 129 ns 10
lstringa<16> copy{str_with_len_N};/4096_stddev 7.81 ns 7.81 ns 10
lstringa<16> copy{str_with_len_N};/4096_cv 6.02 % 6.02 % 10
lstringa<512> copy{str_with_len_N};/15_mean 5.23 ns 5.23 ns 10
lstringa<512> copy{str_with_len_N};/15_median 5.21 ns 5.21 ns 10
lstringa<512> copy{str_with_len_N};/15_stddev 0.125 ns 0.125 ns 10
lstringa<512> copy{str_with_len_N};/15_cv 2.39 % 2.39 % 10
lstringa<512> copy{str_with_len_N};/16_mean 11.5 ns 11.5 ns 10
lstringa<512> copy{str_with_len_N};/16_median 11.5 ns 11.5 ns 10
lstringa<512> copy{str_with_len_N};/16_stddev 0.133 ns 0.133 ns 10
lstringa<512> copy{str_with_len_N};/16_cv 1.15 % 1.15 % 10
lstringa<512> copy{str_with_len_N};/23_mean 11.7 ns 11.7 ns 10
lstringa<512> copy{str_with_len_N};/23_median 11.6 ns 11.6 ns 10
lstringa<512> copy{str_with_len_N};/23_stddev 0.425 ns 0.425 ns 10
lstringa<512> copy{str_with_len_N};/23_cv 3.62 % 3.62 % 10
lstringa<512> copy{str_with_len_N};/24_mean 11.6 ns 11.6 ns 10
lstringa<512> copy{str_with_len_N};/24_median 11.7 ns 11.7 ns 10
lstringa<512> copy{str_with_len_N};/24_stddev 0.208 ns 0.208 ns 10
lstringa<512> copy{str_with_len_N};/24_cv 1.79 % 1.79 % 10
lstringa<512> copy{str_with_len_N};/32_mean 20.0 ns 20.0 ns 10
lstringa<512> copy{str_with_len_N};/32_median 19.9 ns 19.9 ns 10
lstringa<512> copy{str_with_len_N};/32_stddev 0.297 ns 0.297 ns 10
lstringa<512> copy{str_with_len_N};/32_cv 1.48 % 1.48 % 10
lstringa<512> copy{str_with_len_N};/64_mean 20.8 ns 20.8 ns 10
lstringa<512> copy{str_with_len_N};/64_median 20.7 ns 20.7 ns 10
lstringa<512> copy{str_with_len_N};/64_stddev 0.253 ns 0.253 ns 10
lstringa<512> copy{str_with_len_N};/64_cv 1.22 % 1.22 % 10
lstringa<512> copy{str_with_len_N};/128_mean 23.4 ns 23.4 ns 10
lstringa<512> copy{str_with_len_N};/128_median 23.1 ns 23.1 ns 10
lstringa<512> copy{str_with_len_N};/128_stddev 0.736 ns 0.736 ns 10
lstringa<512> copy{str_with_len_N};/128_cv 3.14 % 3.14 % 10
lstringa<512> copy{str_with_len_N};/256_mean 18.1 ns 18.1 ns 10
lstringa<512> copy{str_with_len_N};/256_median 18.2 ns 18.2 ns 10
lstringa<512> copy{str_with_len_N};/256_stddev 0.391 ns 0.391 ns 10
lstringa<512> copy{str_with_len_N};/256_cv 2.16 % 2.16 % 10
lstringa<512> copy{str_with_len_N};/512_mean 20.6 ns 20.6 ns 10
lstringa<512> copy{str_with_len_N};/512_median 20.6 ns 20.6 ns 10
lstringa<512> copy{str_with_len_N};/512_stddev 0.288 ns 0.288 ns 10
lstringa<512> copy{str_with_len_N};/512_cv 1.39 % 1.39 % 10
lstringa<512> copy{str_with_len_N};/1024_mean 96.9 ns 96.9 ns 10
lstringa<512> copy{str_with_len_N};/1024_median 95.5 ns 95.5 ns 10
lstringa<512> copy{str_with_len_N};/1024_stddev 11.7 ns 11.7 ns 10
lstringa<512> copy{str_with_len_N};/1024_cv 12.11 % 12.11 % 10
lstringa<512> copy{str_with_len_N};/2048_mean 118 ns 118 ns 10
lstringa<512> copy{str_with_len_N};/2048_median 121 ns 121 ns 10
lstringa<512> copy{str_with_len_N};/2048_stddev 13.4 ns 13.4 ns 10
lstringa<512> copy{str_with_len_N};/2048_cv 11.31 % 11.31 % 10
lstringa<512> copy{str_with_len_N};/4096_mean 134 ns 134 ns 10
lstringa<512> copy{str_with_len_N};/4096_median 133 ns 133 ns 10
lstringa<512> copy{str_with_len_N};/4096_stddev 11.5 ns 11.5 ns 10
lstringa<512> copy{str_with_len_N};/4096_cv 8.58 % 8.58 % 10
----- 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 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 27.4 ns 27.4 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.497 ns 0.497 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.81 % 1.81 % 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 12.5 ns 12.5 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 12.6 ns 12.6 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.308 ns 0.308 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.46 % 2.46 % 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 8.24 ns 8.24 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 8.16 ns 8.16 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.298 ns 0.298 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 3.62 % 3.62 % 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 7.94 ns 7.94 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 7.86 ns 7.86 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.327 ns 0.327 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 4.12 % 4.12 % 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 8.34 ns 8.34 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 8.14 ns 8.14 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.501 ns 0.501 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 6.01 % 6.01 % 10
----- 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.7 ns 23.7 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 23.6 ns 23.6 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.678 ns 0.678 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.86 % 2.86 % 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.81 ns 9.81 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.67 ns 9.67 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.410 ns 0.410 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 4.18 % 4.18 % 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 8.30 ns 8.30 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 8.31 ns 8.31 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.239 ns 0.239 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 2.88 % 2.88 % 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 7.86 ns 7.86 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 7.88 ns 7.88 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.104 ns 0.104 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.32 % 1.32 % 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 8.11 ns 8.11 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 8.11 ns 8.11 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.057 ns 0.057 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 0.71 % 0.71 % 10
----- 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.3 ns 29.3 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 29.0 ns 29.0 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.04 ns 1.04 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 3.54 % 3.54 % 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 15.1 ns 15.1 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 15.0 ns 15.0 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.585 ns 0.585 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 3.88 % 3.88 % 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 10.8 ns 10.8 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 10.7 ns 10.7 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.242 ns 0.242 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 2.25 % 2.25 % 10
----- 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 65.1 ns 65.1 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 64.8 ns 64.8 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 2.37 ns 2.37 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 3.64 % 3.64 % 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 24.4 ns 24.4 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 24.3 ns 24.3 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 1.03 ns 1.03 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 4.20 % 4.20 % 10
ssa s = "1234.567e10"; double res = *s.to_double()_mean 24.7 ns 24.7 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_median 24.2 ns 24.2 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.927 ns 0.927 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_cv 3.76 % 3.76 % 10
-- 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 1395 ns 1395 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_median 1401 ns 1401 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 46.8 ns 46.8 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 3.35 % 3.35 % 10
std::string str; ... str += "abbaabbaabbaabba";_mean 377 ns 377 ns 10
std::string str; ... str += "abbaabbaabbaabba";_median 381 ns 381 ns 10
std::string str; ... str += "abbaabbaabbaabba";_stddev 20.6 ns 20.6 ns 10
std::string str; ... str += "abbaabbaabbaabba";_cv 5.45 % 5.45 % 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 407 ns 407 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 401 ns 401 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 28.3 ns 28.3 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 6.96 % 6.96 % 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 267 ns 267 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 268 ns 268 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 13.6 ns 13.6 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 5.09 % 5.09 % 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 240 ns 240 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 232 ns 232 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 15.7 ns 15.7 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 6.55 % 6.55 % 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 142 ns 142 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 140 ns 140 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 6.01 ns 6.01 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 4.24 % 4.24 % 10
-- 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 1404 ns 1404 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1381 ns 1381 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 56.4 ns 56.4 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 4.02 % 4.02 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1265 ns 1265 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1258 ns 1258 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 41.9 ns 41.9 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 3.31 % 3.31 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 442 ns 442 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 445 ns 445 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 22.2 ns 22.2 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.03 % 5.03 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 376 ns 376 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 367 ns 367 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 19.4 ns 19.4 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.15 % 5.15 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 316 ns 316 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 309 ns 309 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 15.6 ns 15.6 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.93 % 4.93 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 247 ns 247 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 246 ns 246 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 5.64 ns 5.64 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.28 % 2.28 % 10
-- 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 75371 ns 75372 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 75158 ns 75158 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 1425 ns 1425 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 1.89 % 1.89 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 73091 ns 73091 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 72172 ns 72172 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1892 ns 1892 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.59 % 2.59 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 20644 ns 20645 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 20542 ns 20542 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 581 ns 581 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.81 % 2.81 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17277 ns 17278 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17153 ns 17154 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 267 ns 267 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.55 % 1.55 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17504 ns 17504 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17286 ns 17286 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 614 ns 614 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.51 % 3.51 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17482 ns 17482 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17354 ns 17354 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 463 ns 463 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.65 % 2.65 % 10
-- 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 1414 ns 1414 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_median 1404 ns 1404 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_stddev 37.7 ns 37.7 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_cv 2.66 % 2.66 % 10
std::string str; ... str += str_var1 + str_var2;_mean 1409 ns 1409 ns 10
std::string str; ... str += str_var1 + str_var2;_median 1404 ns 1404 ns 10
std::string str; ... str += str_var1 + str_var2;_stddev 33.7 ns 33.7 ns 10
std::string str; ... str += str_var1 + str_var2;_cv 2.39 % 2.39 % 10
lstringa<16> str; ... str += str_var1 + str_var2;_mean 544 ns 544 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_median 536 ns 536 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 37.1 ns 37.1 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_cv 6.82 % 6.82 % 10
lstringa<128> str; ... str += str_var1 + str_var2;_mean 433 ns 433 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_median 427 ns 427 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 14.5 ns 14.5 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_cv 3.34 % 3.34 % 10
lstringa<512> str; ... str += str_var1 + str_var2;_mean 417 ns 417 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_median 403 ns 403 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 34.3 ns 34.3 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_cv 8.23 % 8.23 % 10
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 316 ns 316 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_median 313 ns 313 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 6.83 ns 6.83 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 2.16 % 2.16 % 10
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 2998 ns 2998 ns 10
std::stringstream str; str << "test = " << k << " times";_median 2967 ns 2967 ns 10
std::stringstream str; str << "test = " << k << " times";_stddev 81.6 ns 81.6 ns 10
std::stringstream str; str << "test = " << k << " times";_cv 2.72 % 2.72 % 10
std::string str = "test = " + std::to_string(k) + " times";_mean 456 ns 456 ns 10
std::string str = "test = " + std::to_string(k) + " times";_median 454 ns 454 ns 10
std::string str = "test = " + std::to_string(k) + " times";_stddev 19.8 ns 19.8 ns 10
std::string str = "test = " + std::to_string(k) + " times";_cv 4.34 % 4.34 % 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1527 ns 1527 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1514 ns 1514 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 90.1 ns 90.1 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 5.90 % 5.90 % 10
std::string str = std::format("test = {} times", k);_mean 1266 ns 1266 ns 10
std::string str = std::format("test = {} times", k);_median 1265 ns 1265 ns 10
std::string str = std::format("test = {} times", k);_stddev 42.0 ns 42.0 ns 10
std::string str = std::format("test = {} times", k);_cv 3.32 % 3.32 % 10
lstringa<8> str; str.format("test = {} times", k);_mean 1633 ns 1633 ns 10
lstringa<8> str; str.format("test = {} times", k);_median 1607 ns 1607 ns 10
lstringa<8> str; str.format("test = {} times", k);_stddev 70.5 ns 70.5 ns 10
lstringa<8> str; str.format("test = {} times", k);_cv 4.31 % 4.31 % 10
lstringa<32> str; str.format("test = {} times", k);_mean 1117 ns 1117 ns 10
lstringa<32> str; str.format("test = {} times", k);_median 1107 ns 1107 ns 10
lstringa<32> str; str.format("test = {} times", k);_stddev 44.8 ns 44.8 ns 10
lstringa<32> str; str.format("test = {} times", k);_cv 4.01 % 4.01 % 10
lstringa<8> str = "test = " + k + " times";_mean 313 ns 313 ns 10
lstringa<8> str = "test = " + k + " times";_median 307 ns 307 ns 10
lstringa<8> str = "test = " + k + " times";_stddev 16.3 ns 16.3 ns 10
lstringa<8> str = "test = " + k + " times";_cv 5.19 % 5.19 % 10
lstringa<32> str = "test = " + k + " times";_mean 153 ns 153 ns 10
lstringa<32> str = "test = " + k + " times";_median 153 ns 153 ns 10
lstringa<32> str = "test = " + k + " times";_stddev 5.19 ns 5.19 ns 10
lstringa<32> str = "test = " + k + " times";_cv 3.40 % 3.40 % 10
stringa str = "test = " + k + " times";_mean 162 ns 162 ns 10
stringa str = "test = " + k + " times";_median 160 ns 160 ns 10
stringa str = "test = " + k + " times";_stddev 5.01 ns 5.01 ns 10
stringa str = "test = " + k + " times";_cv 3.10 % 3.10 % 10
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 273 ns 273 ns 10
std::string::find + substr + std::strtol_median 270 ns 270 ns 10
std::string::find + substr + std::strtol_stddev 9.80 ns 9.80 ns 10
std::string::find + substr + std::strtol_cv 3.59 % 3.59 % 10
ssa::splitter + ssa::as_int_mean 135 ns 135 ns 10
ssa::splitter + ssa::as_int_median 134 ns 134 ns 10
ssa::splitter + ssa::as_int_stddev 3.01 ns 3.01 ns 10
ssa::splitter + ssa::as_int_cv 2.23 % 2.23 % 10
ssa::splitf + functor_mean 131 ns 131 ns 10
ssa::splitf + functor_median 131 ns 131 ns 10
ssa::splitf + functor_stddev 2.28 ns 2.28 ns 10
ssa::splitf + functor_cv 1.74 % 1.74 % 10
-- 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 852 ns 852 ns 10
Naive (and wrong) replace symbols with std::string find + replace_median 850 ns 850 ns 10
Naive (and wrong) replace symbols with std::string find + replace_stddev 20.9 ns 20.9 ns 10
Naive (and wrong) replace symbols with std::string find + replace_cv 2.45 % 2.45 % 10
replace symbols with std::string find_first_of + replace_mean 2378 ns 2378 ns 10
replace symbols with std::string find_first_of + replace_median 2379 ns 2379 ns 10
replace symbols with std::string find_first_of + replace_stddev 38.1 ns 38.1 ns 10
replace symbols with std::string find_first_of + replace_cv 1.60 % 1.60 % 10
replace symbols with std::string_view find_first_of + copy_mean 1037 ns 1037 ns 10
replace symbols with std::string_view find_first_of + copy_median 1021 ns 1021 ns 10
replace symbols with std::string_view find_first_of + copy_stddev 35.1 ns 35.1 ns 10
replace symbols with std::string_view find_first_of + copy_cv 3.38 % 3.38 % 10
replace runtime symbols with string expressions and without remembering all search results_mean 1465 ns 1465 ns 10
replace runtime symbols with string expressions and without remembering all search results_median 1452 ns 1452 ns 10
replace runtime symbols with string expressions and without remembering all search results_stddev 43.1 ns 43.1 ns 10
replace runtime symbols with string expressions and without remembering all search results_cv 2.95 % 2.95 % 10
replace runtime symbols with simstr and memorization of all search results_mean 1035 ns 1035 ns 10
replace runtime symbols with simstr and memorization of all search results_median 1039 ns 1039 ns 10
replace runtime symbols with simstr and memorization of all search results_stddev 13.7 ns 13.7 ns 10
replace runtime symbols with simstr and memorization of all search results_cv 1.32 % 1.32 % 10
replace const symbols with string expressions and without remembering all search results_mean 1231 ns 1231 ns 10
replace const symbols with string expressions and without remembering all search results_median 1217 ns 1217 ns 10
replace const symbols with string expressions and without remembering all search results_stddev 51.2 ns 51.2 ns 10
replace const symbols with string expressions and without remembering all search results_cv 4.16 % 4.16 % 10
replace const symbols with string expressions and memorization of all search results_mean 919 ns 919 ns 10
replace const symbols with string expressions and memorization of all search results_median 918 ns 918 ns 10
replace const symbols with string expressions and memorization of all search results_stddev 54.4 ns 54.5 ns 10
replace const symbols with string expressions and memorization of all search results_cv 5.93 % 5.93 % 10
-- 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 159 ns 159 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_median 158 ns 158 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 4.68 ns 4.68 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.94 % 2.94 % 10
Short replace symbols with std::string find_first_of + replace_mean 319 ns 319 ns 10
Short replace symbols with std::string find_first_of + replace_median 318 ns 318 ns 10
Short replace symbols with std::string find_first_of + replace_stddev 6.49 ns 6.49 ns 10
Short replace symbols with std::string find_first_of + replace_cv 2.03 % 2.03 % 10
Short replace symbols with std::string_view find_first_of + copy_mean 166 ns 166 ns 10
Short replace symbols with std::string_view find_first_of + copy_median 165 ns 165 ns 10
Short replace symbols with std::string_view find_first_of + copy_stddev 6.26 ns 6.26 ns 10
Short replace symbols with std::string_view find_first_of + copy_cv 3.77 % 3.77 % 10
Short replace runtime symbols with string expressions and without remembering all search results_mean 196 ns 196 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_median 194 ns 194 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_stddev 6.79 ns 6.79 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_cv 3.46 % 3.46 % 10
Short replace runtime symbols with simstr and memorization of all search results_mean 211 ns 211 ns 10
Short replace runtime symbols with simstr and memorization of all search results_median 211 ns 211 ns 10
Short replace runtime symbols with simstr and memorization of all search results_stddev 8.49 ns 8.49 ns 10
Short replace runtime symbols with simstr and memorization of all search results_cv 4.03 % 4.03 % 10
Short replace const symbols with string expressions and without remembering all search results_mean 153 ns 153 ns 10
Short replace const symbols with string expressions and without remembering all search results_median 151 ns 151 ns 10
Short replace const symbols with string expressions and without remembering all search results_stddev 4.63 ns 4.63 ns 10
Short replace const symbols with string expressions and without remembering all search results_cv 3.04 % 3.04 % 10
Short replace const symbols with string expressions and memorization of all search results_mean 146 ns 146 ns 10
Short replace const symbols with string expressions and memorization of all search results_median 144 ns 144 ns 10
Short replace const symbols with string expressions and memorization of all search results_stddev 4.77 ns 4.77 ns 10
Short replace const symbols with string expressions and memorization of all search results_cv 3.26 % 3.26 % 10
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 172 ns 172 ns 10
replace bb to ---- in std::string|64_median 170 ns 170 ns 10
replace bb to ---- in std::string|64_stddev 9.48 ns 9.48 ns 10
replace bb to ---- in std::string|64_cv 5.52 % 5.52 % 10
replace bb to ---- in std::string|256_mean 510 ns 510 ns 10
replace bb to ---- in std::string|256_median 509 ns 509 ns 10
replace bb to ---- in std::string|256_stddev 18.2 ns 18.2 ns 10
replace bb to ---- in std::string|256_cv 3.57 % 3.57 % 10
replace bb to ---- in std::string|512_mean 989 ns 989 ns 10
replace bb to ---- in std::string|512_median 975 ns 975 ns 10
replace bb to ---- in std::string|512_stddev 34.2 ns 34.2 ns 10
replace bb to ---- in std::string|512_cv 3.46 % 3.46 % 10
replace bb to ---- in std::string|1024_mean 2308 ns 2308 ns 10
replace bb to ---- in std::string|1024_median 2290 ns 2290 ns 10
replace bb to ---- in std::string|1024_stddev 157 ns 157 ns 10
replace bb to ---- in std::string|1024_cv 6.79 % 6.79 % 10
replace bb to ---- in std::string|2048_mean 5824 ns 5824 ns 10
replace bb to ---- in std::string|2048_median 5566 ns 5566 ns 10
replace bb to ---- in std::string|2048_stddev 463 ns 463 ns 10
replace bb to ---- in std::string|2048_cv 7.94 % 7.94 % 10
replace bb to ---- in lstringa<8>|64_mean 161 ns 161 ns 10
replace bb to ---- in lstringa<8>|64_median 162 ns 162 ns 10
replace bb to ---- in lstringa<8>|64_stddev 7.73 ns 7.73 ns 10
replace bb to ---- in lstringa<8>|64_cv 4.78 % 4.78 % 10
replace bb to ---- in lstringa<8>|256_mean 462 ns 462 ns 10
replace bb to ---- in lstringa<8>|256_median 461 ns 461 ns 10
replace bb to ---- in lstringa<8>|256_stddev 12.7 ns 12.7 ns 10
replace bb to ---- in lstringa<8>|256_cv 2.75 % 2.75 % 10
replace bb to ---- in lstringa<8>|512_mean 882 ns 882 ns 10
replace bb to ---- in lstringa<8>|512_median 876 ns 876 ns 10
replace bb to ---- in lstringa<8>|512_stddev 33.2 ns 33.2 ns 10
replace bb to ---- in lstringa<8>|512_cv 3.77 % 3.77 % 10
replace bb to ---- in lstringa<8>|1024_mean 1827 ns 1827 ns 10
replace bb to ---- in lstringa<8>|1024_median 1824 ns 1824 ns 10
replace bb to ---- in lstringa<8>|1024_stddev 87.4 ns 87.4 ns 10
replace bb to ---- in lstringa<8>|1024_cv 4.78 % 4.78 % 10
replace bb to ---- in lstringa<8>|2048_mean 3363 ns 3363 ns 10
replace bb to ---- in lstringa<8>|2048_median 3353 ns 3353 ns 10
replace bb to ---- in lstringa<8>|2048_stddev 123 ns 123 ns 10
replace bb to ---- in lstringa<8>|2048_cv 3.65 % 3.65 % 10
replace bb to ---- by init stringa|64_mean 104 ns 104 ns 10
replace bb to ---- by init stringa|64_median 103 ns 103 ns 10
replace bb to ---- by init stringa|64_stddev 3.90 ns 3.90 ns 10
replace bb to ---- by init stringa|64_cv 3.75 % 3.75 % 10
replace bb to ---- by init stringa|256_mean 299 ns 299 ns 10
replace bb to ---- by init stringa|256_median 299 ns 299 ns 10
replace bb to ---- by init stringa|256_stddev 10.9 ns 10.9 ns 10
replace bb to ---- by init stringa|256_cv 3.65 % 3.65 % 10
replace bb to ---- by init stringa|512_mean 733 ns 733 ns 10
replace bb to ---- by init stringa|512_median 732 ns 732 ns 10
replace bb to ---- by init stringa|512_stddev 19.5 ns 19.5 ns 10
replace bb to ---- by init stringa|512_cv 2.66 % 2.66 % 10
replace bb to ---- by init stringa|1024_mean 1625 ns 1625 ns 10
replace bb to ---- by init stringa|1024_median 1616 ns 1616 ns 10
replace bb to ---- by init stringa|1024_stddev 31.3 ns 31.3 ns 10
replace bb to ---- by init stringa|1024_cv 1.92 % 1.92 % 10
replace bb to ---- by init stringa|2048_mean 3339 ns 3339 ns 10
replace bb to ---- by init stringa|2048_median 3303 ns 3304 ns 10
replace bb to ---- by init stringa|2048_stddev 111 ns 111 ns 10
replace bb to ---- by init stringa|2048_cv 3.33 % 3.33 % 10
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 115 ns 115 ns 10
replace bb to -- in std::string|64_median 114 ns 114 ns 10
replace bb to -- in std::string|64_stddev 3.33 ns 3.33 ns 10
replace bb to -- in std::string|64_cv 2.88 % 2.88 % 10
replace bb to -- in std::string|256_mean 367 ns 367 ns 10
replace bb to -- in std::string|256_median 361 ns 361 ns 10
replace bb to -- in std::string|256_stddev 14.7 ns 14.7 ns 10
replace bb to -- in std::string|256_cv 4.01 % 4.01 % 10
replace bb to -- in std::string|512_mean 733 ns 733 ns 10
replace bb to -- in std::string|512_median 728 ns 728 ns 10
replace bb to -- in std::string|512_stddev 15.0 ns 15.0 ns 10
replace bb to -- in std::string|512_cv 2.04 % 2.04 % 10
replace bb to -- in std::string|1024_mean 1409 ns 1409 ns 10
replace bb to -- in std::string|1024_median 1378 ns 1378 ns 10
replace bb to -- in std::string|1024_stddev 79.1 ns 79.1 ns 10
replace bb to -- in std::string|1024_cv 5.61 % 5.61 % 10
replace bb to -- in std::string|2048_mean 2902 ns 2902 ns 10
replace bb to -- in std::string|2048_median 2875 ns 2875 ns 10
replace bb to -- in std::string|2048_stddev 125 ns 125 ns 10
replace bb to -- in std::string|2048_cv 4.32 % 4.32 % 10
replace bb to -- in lstringa<8>|64_mean 103 ns 103 ns 10
replace bb to -- in lstringa<8>|64_median 105 ns 105 ns 10
replace bb to -- in lstringa<8>|64_stddev 4.91 ns 4.91 ns 10
replace bb to -- in lstringa<8>|64_cv 4.76 % 4.76 % 10
replace bb to -- in lstringa<8>|256_mean 299 ns 299 ns 10
replace bb to -- in lstringa<8>|256_median 297 ns 297 ns 10
replace bb to -- in lstringa<8>|256_stddev 9.27 ns 9.27 ns 10
replace bb to -- in lstringa<8>|256_cv 3.10 % 3.10 % 10
replace bb to -- in lstringa<8>|512_mean 548 ns 548 ns 10
replace bb to -- in lstringa<8>|512_median 540 ns 540 ns 10
replace bb to -- in lstringa<8>|512_stddev 16.4 ns 16.4 ns 10
replace bb to -- in lstringa<8>|512_cv 3.00 % 3.00 % 10
replace bb to -- in lstringa<8>|1024_mean 1133 ns 1133 ns 10
replace bb to -- in lstringa<8>|1024_median 1117 ns 1117 ns 10
replace bb to -- in lstringa<8>|1024_stddev 48.3 ns 48.3 ns 10
replace bb to -- in lstringa<8>|1024_cv 4.26 % 4.26 % 10
replace bb to -- in lstringa<8>|2048_mean 2150 ns 2150 ns 10
replace bb to -- in lstringa<8>|2048_median 2140 ns 2140 ns 10
replace bb to -- in lstringa<8>|2048_stddev 62.9 ns 62.9 ns 10
replace bb to -- in lstringa<8>|2048_cv 2.93 % 2.93 % 10
replace bb to -- by init stringa|64_mean 93.9 ns 93.9 ns 10
replace bb to -- by init stringa|64_median 93.1 ns 93.1 ns 10
replace bb to -- by init stringa|64_stddev 2.83 ns 2.83 ns 10
replace bb to -- by init stringa|64_cv 3.01 % 3.01 % 10
replace bb to -- by init stringa|256_mean 275 ns 275 ns 10
replace bb to -- by init stringa|256_median 278 ns 278 ns 10
replace bb to -- by init stringa|256_stddev 5.58 ns 5.58 ns 10
replace bb to -- by init stringa|256_cv 2.03 % 2.03 % 10
replace bb to -- by init stringa|512_mean 498 ns 498 ns 10
replace bb to -- by init stringa|512_median 496 ns 496 ns 10
replace bb to -- by init stringa|512_stddev 9.03 ns 9.03 ns 10
replace bb to -- by init stringa|512_cv 1.81 % 1.81 % 10
replace bb to -- by init stringa|1024_mean 1033 ns 1033 ns 10
replace bb to -- by init stringa|1024_median 1031 ns 1031 ns 10
replace bb to -- by init stringa|1024_stddev 17.6 ns 17.6 ns 10
replace bb to -- by init stringa|1024_cv 1.70 % 1.70 % 10
replace bb to -- by init stringa|2048_mean 1981 ns 1981 ns 10
replace bb to -- by init stringa|2048_median 1976 ns 1976 ns 10
replace bb to -- by init stringa|2048_stddev 41.8 ns 41.8 ns 10
replace bb to -- by init stringa|2048_cv 2.11 % 2.11 % 10
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3750693 ns 3750707 ns 10
hashStrMapA<size_t> emplace & find stringa;_median 3737012 ns 3737025 ns 10
hashStrMapA<size_t> emplace & find stringa;_stddev 75686 ns 75686 ns 10
hashStrMapA<size_t> emplace & find stringa;_cv 2.02 % 2.02 % 10
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3625926 ns 3625926 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3622724 ns 3622735 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 84320 ns 84319 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 2.33 % 2.33 % 10
hashStrMapA<size_t> emplace & find ssa;_mean 3687972 ns 3687966 ns 10
hashStrMapA<size_t> emplace & find ssa;_median 3673688 ns 3673702 ns 10
hashStrMapA<size_t> emplace & find ssa;_stddev 47692 ns 47693 ns 10
hashStrMapA<size_t> emplace & find ssa;_cv 1.29 % 1.29 % 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 3937773 ns 3937779 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 3921638 ns 3921649 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 90680 ns 90669 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 2.30 % 2.30 % 10
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 966 ns 966 ns 10
Build func full name std::string;_median 965 ns 965 ns 10
Build func full name std::string;_stddev 18.9 ns 18.9 ns 10
Build func full name std::string;_cv 1.96 % 1.96 % 10
Build func full name std::string 1;_mean 1010 ns 1010 ns 10
Build func full name std::string 1;_median 1001 ns 1001 ns 10
Build func full name std::string 1;_stddev 28.9 ns 28.9 ns 10
Build func full name std::string 1;_cv 2.86 % 2.86 % 10
Build func full name std::stream;_mean 2613 ns 2613 ns 10
Build func full name std::stream;_median 2577 ns 2578 ns 10
Build func full name std::stream;_stddev 69.2 ns 69.2 ns 10
Build func full name std::stream;_cv 2.65 % 2.65 % 10
Build func full name stringa;_mean 465 ns 465 ns 10
Build func full name stringa;_median 460 ns 460 ns 10
Build func full name stringa;_stddev 16.9 ns 16.9 ns 10
Build func full name stringa;_cv 3.64 % 3.64 % 10
Build func full name stringa 1;_mean 682 ns 682 ns 10
Build func full name stringa 1;_median 677 ns 677 ns 10
Build func full name stringa 1;_stddev 17.3 ns 17.3 ns 10
Build func full name stringa 1;_cv 2.54 % 2.54 % 10

View File

@ -0,0 +1,989 @@
Benchmarks of simstr, version 1.8.1
Sources: https://github.com/orefkov/simstr
Results: https://orefkov.github.io/simstr/results.html
Compiler GNU 15.2.0
2026-03-22T13:04:50+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.06, 0.09, 0.08
***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 162 ns 162 ns 4
Concat email std::format_stddev 4.85 ns 4.85 ns 4
Concat email std::format_cv 3.03 % 3.03 % 4
Concat email std::stringstream_mean 321 ns 321 ns 4
Concat email std::stringstream_median 322 ns 322 ns 4
Concat email std::stringstream_stddev 3.32 ns 3.32 ns 4
Concat email std::stringstream_cv 1.04 % 1.03 % 4
Concat email stringzilla append_mean 108 ns 108 ns 4
Concat email stringzilla append_median 108 ns 108 ns 4
Concat email stringzilla append_stddev 3.84 ns 3.85 ns 4
Concat email stringzilla append_cv 3.57 % 3.57 % 4
Concat email stringzilla concat_mean 42.8 ns 42.8 ns 4
Concat email stringzilla concat_median 42.0 ns 42.0 ns 4
Concat email stringzilla concat_stddev 1.96 ns 1.96 ns 4
Concat email stringzilla concat_cv 4.57 % 4.57 % 4
Concat email std::string append_mean 79.2 ns 79.2 ns 4
Concat email std::string append_median 79.1 ns 79.1 ns 4
Concat email std::string append_stddev 2.03 ns 2.03 ns 4
Concat email std::string append_cv 2.57 % 2.57 % 4
Concat email std::string by strexpr_mean 34.4 ns 34.4 ns 4
Concat email std::string by strexpr_median 34.7 ns 34.7 ns 4
Concat email std::string by strexpr_stddev 0.818 ns 0.818 ns 4
Concat email std::string by strexpr_cv 2.38 % 2.38 % 4
Concat email stringa_mean 40.7 ns 40.7 ns 4
Concat email stringa_median 40.5 ns 40.5 ns 4
Concat email stringa_stddev 0.971 ns 0.971 ns 4
Concat email stringa_cv 2.38 % 2.38 % 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 214 ns 214 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 4.91 ns 4.91 ns 4
Concat std::string and number by std to std::string_cv 2.30 % 2.30 % 4
Concat std::string and number by StrExpr to std::string_mean 102 ns 102 ns 4
Concat std::string and number by StrExpr to std::string_median 101 ns 101 ns 4
Concat std::string and number by StrExpr to std::string_stddev 2.74 ns 2.74 ns 4
Concat std::string and number by StrExpr to std::string_cv 2.69 % 2.69 % 4
Concat stringa and number by StrExpr to simstr::stringa_mean 72.3 ns 72.3 ns 4
Concat stringa and number by StrExpr to simstr::stringa_median 72.4 ns 72.4 ns 4
Concat stringa and number by StrExpr to simstr::stringa_stddev 1.59 ns 1.59 ns 4
Concat stringa and number by StrExpr to simstr::stringa_cv 2.21 % 2.21 % 4
Concat stringa and number by e_concat to simstr::stringa_mean 77.7 ns 77.7 ns 4
Concat stringa and number by e_concat to simstr::stringa_median 77.5 ns 77.5 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.52 % 3.52 % 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 728 ns 728 ns 4
Concat std::string and format hex number and literal to std::string_median 732 ns 732 ns 4
Concat std::string and format hex number and literal to std::string_stddev 19.6 ns 19.6 ns 4
Concat std::string and format hex number and literal to std::string_cv 2.68 % 2.68 % 4
std::format std::string and hex number by literal to std::string_mean 893 ns 893 ns 4
std::format std::string and hex number by literal to std::string_median 890 ns 890 ns 4
std::format std::string and hex number by literal to std::string_stddev 22.3 ns 22.3 ns 4
std::format std::string and hex number by literal to std::string_cv 2.49 % 2.49 % 4
Concat std::string and std::to_chars and string to std::string_mean 199 ns 199 ns 4
Concat std::string and std::to_chars and string to std::string_median 199 ns 199 ns 4
Concat std::string and std::to_chars and string to std::string_stddev 1.39 ns 1.39 ns 4
Concat std::string and std::to_chars and string to std::string_cv 0.70 % 0.70 % 4
Concat std::string and hex number and literal by StrExpr to std::string_mean 125 ns 125 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_median 126 ns 126 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_stddev 1.84 ns 1.84 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_cv 1.47 % 1.47 % 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 122 ns 122 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 122 ns 122 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 1.10 ns 1.10 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 0.90 % 0.90 % 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 125 ns 125 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_median 125 ns 125 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.73 % 1.73 % 4
Subst stringa and hex number by e_subst literal to simstr::stringa_mean 172 ns 172 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_median 171 ns 171 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 4.63 ns 4.63 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_cv 2.69 % 2.69 % 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 280 ns 280 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 279 ns 279 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 5.80 ns 5.80 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 2.07 % 2.07 % 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 261 ns 261 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 261 ns 261 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 4.51 ns 4.51 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 1.73 % 1.73 % 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 315 ns 315 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 316 ns 316 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 3.45 ns 3.45 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 1.09 % 1.09 % 4
e_vsubst(pattern, i / 0x8a010_fmt)_mean 593 ns 593 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_median 587 ns 587 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_stddev 13.1 ns 13.1 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_cv 2.21 % 2.21 % 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 629 ns 629 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 631 ns 631 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 19.2 ns 19.2 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 3.06 % 3.06 % 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 788 ns 788 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 794 ns 794 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 12.1 ns 12.1 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 1.54 % 1.54 % 4
std::format("abcdefghihklmopqr {:#010o} end", i)_mean 1171 ns 1171 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_median 1170 ns 1170 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 4.63 ns 4.63 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_cv 0.40 % 0.40 % 4
std::vformat(pattern, std::make_format_args(i))_mean 1176 ns 1176 ns 4
std::vformat(pattern, std::make_format_args(i))_median 1174 ns 1174 ns 4
std::vformat(pattern, std::make_format_args(i))_stddev 12.9 ns 12.9 ns 4
std::vformat(pattern, std::make_format_args(i))_cv 1.09 % 1.09 % 4
std::format with std::formatted_size_mean 2267 ns 2267 ns 4
std::format with std::formatted_size_median 2276 ns 2276 ns 4
std::format with std::formatted_size_stddev 38.4 ns 38.4 ns 4
std::format with std::formatted_size_cv 1.69 % 1.69 % 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 2021 ns 2021 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 2023 ns 2023 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 41.5 ns 41.5 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 2.05 % 2.05 % 4
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 47.9 ns 47.9 ns 4
Concat std::string by std to std::string_median 47.9 ns 47.9 ns 4
Concat std::string by std to std::string_stddev 0.383 ns 0.383 ns 4
Concat std::string by std to std::string_cv 0.80 % 0.80 % 4
Concat std::string by StrExpr to std::string_mean 35.3 ns 35.3 ns 4
Concat std::string by StrExpr to std::string_median 35.3 ns 35.3 ns 4
Concat std::string by StrExpr to std::string_stddev 0.618 ns 0.618 ns 4
Concat std::string by StrExpr to std::string_cv 1.75 % 1.75 % 4
Concat stringa by StrExpr to stringa_mean 27.4 ns 27.4 ns 4
Concat stringa by StrExpr to stringa_median 27.4 ns 27.4 ns 4
Concat stringa by StrExpr to stringa_stddev 0.154 ns 0.153 ns 4
Concat stringa by StrExpr to stringa_cv 0.56 % 0.56 % 4
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 119 ns 119 ns 4
Find concat three std::string_median 118 ns 118 ns 4
Find concat three std::string_stddev 1.87 ns 1.87 ns 4
Find concat three std::string_cv 1.57 % 1.57 % 4
Find concat three strexpr_mean 38.2 ns 38.2 ns 4
Find concat three strexpr_median 38.2 ns 38.2 ns 4
Find concat three strexpr_stddev 0.339 ns 0.339 ns 4
Find concat three strexpr_cv 0.89 % 0.89 % 4
Find concat three simstr_mean 15.6 ns 15.6 ns 4
Find concat three simstr_median 15.6 ns 15.6 ns 4
Find concat three simstr_stddev 0.214 ns 0.214 ns 4
Find concat three simstr_cv 1.37 % 1.37 % 4
Find concat three stringzilla string_mean 125 ns 125 ns 4
Find concat three stringzilla string_median 125 ns 125 ns 4
Find concat three stringzilla string_stddev 1.18 ns 1.18 ns 4
Find concat three stringzilla string_cv 0.94 % 0.94 % 4
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 8.65 ns 8.65 ns 4
BuildTypeNameStr 0/0_median 8.66 ns 8.66 ns 4
BuildTypeNameStr 0/0_stddev 0.131 ns 0.131 ns 4
BuildTypeNameStr 0/0_cv 1.51 % 1.51 % 4
BuildTypeNameExp 0/0_mean 6.99 ns 6.99 ns 4
BuildTypeNameExp 0/0_median 7.01 ns 7.01 ns 4
BuildTypeNameExp 0/0_stddev 0.134 ns 0.134 ns 4
BuildTypeNameExp 0/0_cv 1.92 % 1.92 % 4
BuildTypeNameSim 0/0_mean 4.97 ns 4.97 ns 4
BuildTypeNameSim 0/0_median 4.98 ns 4.98 ns 4
BuildTypeNameSim 0/0_stddev 0.065 ns 0.065 ns 4
BuildTypeNameSim 0/0_cv 1.31 % 1.31 % 4
BuildTypeNameStr 10/10_mean 76.6 ns 76.6 ns 4
BuildTypeNameStr 10/10_median 76.1 ns 76.1 ns 4
BuildTypeNameStr 10/10_stddev 1.27 ns 1.27 ns 4
BuildTypeNameStr 10/10_cv 1.65 % 1.65 % 4
BuildTypeNameExp 10/10_mean 27.9 ns 27.9 ns 4
BuildTypeNameExp 10/10_median 27.9 ns 27.9 ns 4
BuildTypeNameExp 10/10_stddev 0.740 ns 0.740 ns 4
BuildTypeNameExp 10/10_cv 2.66 % 2.66 % 4
BuildTypeNameSim 10/10_mean 22.6 ns 22.6 ns 4
BuildTypeNameSim 10/10_median 22.3 ns 22.3 ns 4
BuildTypeNameSim 10/10_stddev 0.683 ns 0.683 ns 4
BuildTypeNameSim 10/10_cv 3.02 % 3.02 % 4
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 236 ns 236 ns 4
Concat with replace str_median 236 ns 236 ns 4
Concat with replace str_stddev 4.01 ns 4.01 ns 4
Concat with replace str_cv 1.70 % 1.70 % 4
Concat with replace exp_mean 135 ns 135 ns 4
Concat with replace exp_median 134 ns 134 ns 4
Concat with replace exp_stddev 3.94 ns 3.94 ns 4
Concat with replace exp_cv 2.92 % 2.92 % 4
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 1.13 ns 1.13 ns 4
std::string e;_median 1.13 ns 1.13 ns 4
std::string e;_stddev 0.012 ns 0.012 ns 4
std::string e;_cv 1.09 % 1.09 % 4
std::string_view e;_mean 0.754 ns 0.754 ns 4
std::string_view e;_median 0.751 ns 0.751 ns 4
std::string_view e;_stddev 0.013 ns 0.013 ns 4
std::string_view e;_cv 1.68 % 1.68 % 4
ssa e;_mean 0.187 ns 0.187 ns 4
ssa e;_median 0.186 ns 0.186 ns 4
ssa e;_stddev 0.002 ns 0.002 ns 4
ssa e;_cv 1.20 % 1.20 % 4
stringa e;_mean 0.753 ns 0.753 ns 4
stringa e;_median 0.757 ns 0.757 ns 4
stringa e;_stddev 0.011 ns 0.011 ns 4
stringa e;_cv 1.52 % 1.52 % 4
lstringa<20> e;_mean 1.14 ns 1.14 ns 4
lstringa<20> e;_median 1.15 ns 1.15 ns 4
lstringa<20> e;_stddev 0.016 ns 0.016 ns 4
lstringa<20> e;_cv 1.44 % 1.44 % 4
lstringa<40> e;_mean 1.15 ns 1.15 ns 4
lstringa<40> e;_median 1.15 ns 1.15 ns 4
lstringa<40> e;_stddev 0.016 ns 0.016 ns 4
lstringa<40> e;_cv 1.39 % 1.39 % 4
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 1.89 ns 1.89 ns 4
std::string e = "Test text";_median 1.89 ns 1.89 ns 4
std::string e = "Test text";_stddev 0.034 ns 0.034 ns 4
std::string e = "Test text";_cv 1.80 % 1.80 % 4
std::string_view e = "Test text";_mean 0.754 ns 0.754 ns 4
std::string_view e = "Test text";_median 0.753 ns 0.753 ns 4
std::string_view e = "Test text";_stddev 0.007 ns 0.007 ns 4
std::string_view e = "Test text";_cv 0.97 % 0.97 % 4
ssa e = "Test text";_mean 0.757 ns 0.757 ns 4
ssa e = "Test text";_median 0.761 ns 0.761 ns 4
ssa e = "Test text";_stddev 0.011 ns 0.011 ns 4
ssa e = "Test text";_cv 1.44 % 1.44 % 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.014 ns 0.014 ns 4
stringa e = "Test text";_cv 1.26 % 1.26 % 4
lstringa<20> e = "Test text";_mean 1.92 ns 1.92 ns 4
lstringa<20> e = "Test text";_median 1.89 ns 1.89 ns 4
lstringa<20> e = "Test text";_stddev 0.080 ns 0.080 ns 4
lstringa<20> e = "Test text";_cv 4.18 % 4.18 % 4
lstringa<40> e = "Test text";_mean 1.90 ns 1.90 ns 4
lstringa<40> e = "Test text";_median 1.90 ns 1.90 ns 4
lstringa<40> e = "Test text";_stddev 0.021 ns 0.021 ns 4
lstringa<40> e = "Test text";_cv 1.08 % 1.08 % 4
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 19.7 ns 19.7 ns 4
std::string e = "123456789012345678901234567890";_median 19.8 ns 19.8 ns 4
std::string e = "123456789012345678901234567890";_stddev 0.335 ns 0.335 ns 4
std::string e = "123456789012345678901234567890";_cv 1.70 % 1.70 % 4
std::string_view e = "123456789012345678901234567890";_mean 0.751 ns 0.751 ns 4
std::string_view e = "123456789012345678901234567890";_median 0.752 ns 0.752 ns 4
std::string_view e = "123456789012345678901234567890";_stddev 0.009 ns 0.009 ns 4
std::string_view e = "123456789012345678901234567890";_cv 1.19 % 1.19 % 4
ssa e = "123456789012345678901234567890";_mean 0.761 ns 0.761 ns 4
ssa e = "123456789012345678901234567890";_median 0.764 ns 0.764 ns 4
ssa e = "123456789012345678901234567890";_stddev 0.014 ns 0.014 ns 4
ssa e = "123456789012345678901234567890";_cv 1.89 % 1.89 % 4
stringa e = "123456789012345678901234567890";_mean 1.13 ns 1.13 ns 4
stringa e = "123456789012345678901234567890";_median 1.14 ns 1.14 ns 4
stringa e = "123456789012345678901234567890";_stddev 0.015 ns 0.015 ns 4
stringa e = "123456789012345678901234567890";_cv 1.34 % 1.34 % 4
lstringa<20> e = "123456789012345678901234567890";_mean 18.3 ns 18.3 ns 4
lstringa<20> e = "123456789012345678901234567890";_median 18.3 ns 18.3 ns 4
lstringa<20> e = "123456789012345678901234567890";_stddev 0.389 ns 0.389 ns 4
lstringa<20> e = "123456789012345678901234567890";_cv 2.12 % 2.12 % 4
lstringa<40> e = "123456789012345678901234567890";_mean 1.91 ns 1.91 ns 4
lstringa<40> e = "123456789012345678901234567890";_median 1.91 ns 1.91 ns 4
lstringa<40> e = "123456789012345678901234567890";_stddev 0.011 ns 0.011 ns 4
lstringa<40> e = "123456789012345678901234567890";_cv 0.60 % 0.60 % 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.03 ns 5.03 ns 4
std::string e = "Test text"; auto c{e};_median 5.05 ns 5.05 ns 4
std::string e = "Test text"; auto c{e};_stddev 0.100 ns 0.100 ns 4
std::string e = "Test text"; auto c{e};_cv 1.98 % 1.98 % 4
std::string_view e = "Test text"; auto c{e};_mean 0.388 ns 0.388 ns 4
std::string_view e = "Test text"; auto c{e};_median 0.389 ns 0.389 ns 4
std::string_view e = "Test text"; auto c{e};_stddev 0.003 ns 0.003 ns 4
std::string_view e = "Test text"; auto c{e};_cv 0.81 % 0.81 % 4
ssa e = "Test text"; auto c{e};_mean 0.388 ns 0.388 ns 4
ssa e = "Test text"; auto c{e};_median 0.391 ns 0.391 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.21 % 2.21 % 4
stringa e = "Test text"; auto c{e};_mean 1.13 ns 1.13 ns 4
stringa e = "Test text"; auto c{e};_median 1.13 ns 1.13 ns 4
stringa e = "Test text"; auto c{e};_stddev 0.017 ns 0.017 ns 4
stringa e = "Test text"; auto c{e};_cv 1.53 % 1.53 % 4
lstringa<20> e = "Test text"; auto c{e};_mean 1.15 ns 1.15 ns 4
lstringa<20> e = "Test text"; auto c{e};_median 1.15 ns 1.15 ns 4
lstringa<20> e = "Test text"; auto c{e};_stddev 0.018 ns 0.018 ns 4
lstringa<20> e = "Test text"; auto c{e};_cv 1.60 % 1.60 % 4
lstringa<40> e = "Test text"; auto c{e};_mean 1.15 ns 1.15 ns 4
lstringa<40> e = "Test text"; auto c{e};_median 1.15 ns 1.15 ns 4
lstringa<40> e = "Test text"; auto c{e};_stddev 0.016 ns 0.016 ns 4
lstringa<40> e = "Test text"; auto c{e};_cv 1.38 % 1.38 % 4
----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890"; auto c{e};_mean 23.2 ns 23.2 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_median 23.4 ns 23.4 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 0.477 ns 0.477 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_cv 2.06 % 2.06 % 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.759 ns 0.759 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.760 ns 0.760 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.004 ns 0.004 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 0.54 % 0.54 % 4
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.758 ns 0.758 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.754 ns 0.754 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.017 ns 0.017 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.19 % 2.19 % 4
stringa e = "123456789012345678901234567890"; auto c{e};_mean 6.85 ns 6.85 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_median 6.85 ns 6.85 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.024 ns 0.024 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_cv 0.36 % 0.36 % 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 17.7 ns 17.7 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 17.6 ns 17.6 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.244 ns 0.244 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 1.38 % 1.38 % 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.18 ns 4.18 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.16 ns 4.16 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.90 % 2.90 % 4
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
sz::string::find;_mean 87.9 ns 87.9 ns 4
sz::string::find;_median 87.9 ns 87.9 ns 4
sz::string::find;_stddev 1.17 ns 1.17 ns 4
sz::string::find;_cv 1.33 % 1.33 % 4
std::string::find;_mean 6.95 ns 6.95 ns 4
std::string::find;_median 6.95 ns 6.95 ns 4
std::string::find;_stddev 0.069 ns 0.069 ns 4
std::string::find;_cv 0.99 % 0.99 % 4
std::string_view::find;_mean 7.39 ns 7.39 ns 4
std::string_view::find;_median 7.40 ns 7.40 ns 4
std::string_view::find;_stddev 0.118 ns 0.118 ns 4
std::string_view::find;_cv 1.59 % 1.59 % 4
ssa::find;_mean 6.87 ns 6.87 ns 4
ssa::find;_median 6.88 ns 6.88 ns 4
ssa::find;_stddev 0.131 ns 0.131 ns 4
ssa::find;_cv 1.90 % 1.90 % 4
stringa::find;_mean 7.21 ns 7.21 ns 4
stringa::find;_median 7.18 ns 7.18 ns 4
stringa::find;_stddev 0.196 ns 0.196 ns 4
stringa::find;_cv 2.72 % 2.72 % 4
lstringa<20>::find;_mean 6.52 ns 6.52 ns 4
lstringa<20>::find;_median 6.56 ns 6.56 ns 4
lstringa<20>::find;_stddev 0.116 ns 0.116 ns 4
lstringa<20>::find;_cv 1.78 % 1.78 % 4
lstringa<40>::find;_mean 6.49 ns 6.49 ns 4
lstringa<40>::find;_median 6.48 ns 6.48 ns 4
lstringa<40>::find;_stddev 0.150 ns 0.150 ns 4
lstringa<40>::find;_cv 2.31 % 2.31 % 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.01 ns 5.01 ns 4
std::string copy{str_with_len_N};/15_median 5.01 ns 5.02 ns 4
std::string copy{str_with_len_N};/15_stddev 0.085 ns 0.085 ns 4
std::string copy{str_with_len_N};/15_cv 1.70 % 1.70 % 4
std::string copy{str_with_len_N};/16_mean 29.4 ns 29.4 ns 4
std::string copy{str_with_len_N};/16_median 29.6 ns 29.6 ns 4
std::string copy{str_with_len_N};/16_stddev 1.16 ns 1.16 ns 4
std::string copy{str_with_len_N};/16_cv 3.93 % 3.93 % 4
std::string copy{str_with_len_N};/23_mean 28.9 ns 28.9 ns 4
std::string copy{str_with_len_N};/23_median 28.8 ns 28.8 ns 4
std::string copy{str_with_len_N};/23_stddev 0.401 ns 0.401 ns 4
std::string copy{str_with_len_N};/23_cv 1.39 % 1.39 % 4
std::string copy{str_with_len_N};/24_mean 22.3 ns 22.3 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.245 ns 0.245 ns 4
std::string copy{str_with_len_N};/24_cv 1.10 % 1.10 % 4
std::string copy{str_with_len_N};/32_mean 21.5 ns 21.5 ns 4
std::string copy{str_with_len_N};/32_median 21.5 ns 21.5 ns 4
std::string copy{str_with_len_N};/32_stddev 0.170 ns 0.170 ns 4
std::string copy{str_with_len_N};/32_cv 0.79 % 0.79 % 4
std::string copy{str_with_len_N};/64_mean 24.6 ns 24.6 ns 4
std::string copy{str_with_len_N};/64_median 24.6 ns 24.6 ns 4
std::string copy{str_with_len_N};/64_stddev 0.699 ns 0.699 ns 4
std::string copy{str_with_len_N};/64_cv 2.85 % 2.85 % 4
std::string copy{str_with_len_N};/128_mean 24.2 ns 24.2 ns 4
std::string copy{str_with_len_N};/128_median 24.4 ns 24.4 ns 4
std::string copy{str_with_len_N};/128_stddev 0.806 ns 0.806 ns 4
std::string copy{str_with_len_N};/128_cv 3.33 % 3.33 % 4
std::string copy{str_with_len_N};/256_mean 25.7 ns 25.7 ns 4
std::string copy{str_with_len_N};/256_median 25.8 ns 25.8 ns 4
std::string copy{str_with_len_N};/256_stddev 0.425 ns 0.425 ns 4
std::string copy{str_with_len_N};/256_cv 1.65 % 1.65 % 4
std::string copy{str_with_len_N};/512_mean 28.5 ns 28.5 ns 4
std::string copy{str_with_len_N};/512_median 28.4 ns 28.4 ns 4
std::string copy{str_with_len_N};/512_stddev 0.749 ns 0.749 ns 4
std::string copy{str_with_len_N};/512_cv 2.63 % 2.63 % 4
std::string copy{str_with_len_N};/1024_mean 33.4 ns 33.4 ns 4
std::string copy{str_with_len_N};/1024_median 33.5 ns 33.5 ns 4
std::string copy{str_with_len_N};/1024_stddev 0.562 ns 0.562 ns 4
std::string copy{str_with_len_N};/1024_cv 1.68 % 1.68 % 4
std::string copy{str_with_len_N};/2048_mean 122 ns 122 ns 4
std::string copy{str_with_len_N};/2048_median 122 ns 122 ns 4
std::string copy{str_with_len_N};/2048_stddev 2.42 ns 2.42 ns 4
std::string copy{str_with_len_N};/2048_cv 1.99 % 1.99 % 4
std::string copy{str_with_len_N};/4096_mean 157 ns 157 ns 4
std::string copy{str_with_len_N};/4096_median 157 ns 157 ns 4
std::string copy{str_with_len_N};/4096_stddev 7.01 ns 7.01 ns 4
std::string copy{str_with_len_N};/4096_cv 4.47 % 4.47 % 4
stringa copy{str_with_len_N};/15_mean 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/15_median 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/15_stddev 0.015 ns 0.015 ns 4
stringa copy{str_with_len_N};/15_cv 1.32 % 1.32 % 4
stringa copy{str_with_len_N};/16_mean 1.15 ns 1.15 ns 4
stringa copy{str_with_len_N};/16_median 1.16 ns 1.16 ns 4
stringa copy{str_with_len_N};/16_stddev 0.020 ns 0.020 ns 4
stringa copy{str_with_len_N};/16_cv 1.73 % 1.73 % 4
stringa copy{str_with_len_N};/23_mean 1.13 ns 1.13 ns 4
stringa copy{str_with_len_N};/23_median 1.13 ns 1.13 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.93 % 1.93 % 4
stringa copy{str_with_len_N};/24_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/24_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/24_stddev 0.124 ns 0.124 ns 4
stringa copy{str_with_len_N};/24_cv 0.76 % 0.76 % 4
stringa copy{str_with_len_N};/32_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/32_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/32_stddev 0.140 ns 0.140 ns 4
stringa copy{str_with_len_N};/32_cv 0.85 % 0.85 % 4
stringa copy{str_with_len_N};/64_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/64_median 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/64_stddev 0.159 ns 0.159 ns 4
stringa copy{str_with_len_N};/64_cv 0.97 % 0.97 % 4
stringa copy{str_with_len_N};/128_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/128_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/128_stddev 0.099 ns 0.099 ns 4
stringa copy{str_with_len_N};/128_cv 0.60 % 0.60 % 4
stringa copy{str_with_len_N};/256_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/256_median 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/256_stddev 0.095 ns 0.095 ns 4
stringa copy{str_with_len_N};/256_cv 0.58 % 0.58 % 4
stringa copy{str_with_len_N};/512_mean 16.3 ns 16.3 ns 4
stringa copy{str_with_len_N};/512_median 16.3 ns 16.3 ns 4
stringa copy{str_with_len_N};/512_stddev 0.048 ns 0.048 ns 4
stringa copy{str_with_len_N};/512_cv 0.29 % 0.29 % 4
stringa copy{str_with_len_N};/1024_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/1024_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/1024_stddev 0.066 ns 0.066 ns 4
stringa copy{str_with_len_N};/1024_cv 0.40 % 0.40 % 4
stringa copy{str_with_len_N};/2048_mean 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/2048_median 16.4 ns 16.4 ns 4
stringa copy{str_with_len_N};/2048_stddev 0.039 ns 0.039 ns 4
stringa copy{str_with_len_N};/2048_cv 0.24 % 0.24 % 4
stringa copy{str_with_len_N};/4096_mean 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/4096_median 16.5 ns 16.5 ns 4
stringa copy{str_with_len_N};/4096_stddev 0.072 ns 0.072 ns 4
stringa copy{str_with_len_N};/4096_cv 0.43 % 0.43 % 4
lstringa<16> copy{str_with_len_N};/15_mean 1.15 ns 1.15 ns 4
lstringa<16> copy{str_with_len_N};/15_median 1.16 ns 1.16 ns 4
lstringa<16> copy{str_with_len_N};/15_stddev 0.021 ns 0.021 ns 4
lstringa<16> copy{str_with_len_N};/15_cv 1.83 % 1.83 % 4
lstringa<16> copy{str_with_len_N};/16_mean 4.89 ns 4.89 ns 4
lstringa<16> copy{str_with_len_N};/16_median 4.91 ns 4.91 ns 4
lstringa<16> copy{str_with_len_N};/16_stddev 0.063 ns 0.063 ns 4
lstringa<16> copy{str_with_len_N};/16_cv 1.29 % 1.29 % 4
lstringa<16> copy{str_with_len_N};/23_mean 4.91 ns 4.91 ns 4
lstringa<16> copy{str_with_len_N};/23_median 4.89 ns 4.89 ns 4
lstringa<16> copy{str_with_len_N};/23_stddev 0.079 ns 0.079 ns 4
lstringa<16> copy{str_with_len_N};/23_cv 1.60 % 1.60 % 4
lstringa<16> copy{str_with_len_N};/24_mean 22.4 ns 22.4 ns 4
lstringa<16> copy{str_with_len_N};/24_median 22.1 ns 22.1 ns 4
lstringa<16> copy{str_with_len_N};/24_stddev 0.925 ns 0.925 ns 4
lstringa<16> copy{str_with_len_N};/24_cv 4.12 % 4.12 % 4
lstringa<16> copy{str_with_len_N};/32_mean 22.5 ns 22.5 ns 4
lstringa<16> copy{str_with_len_N};/32_median 22.4 ns 22.4 ns 4
lstringa<16> copy{str_with_len_N};/32_stddev 0.344 ns 0.344 ns 4
lstringa<16> copy{str_with_len_N};/32_cv 1.53 % 1.53 % 4
lstringa<16> copy{str_with_len_N};/64_mean 24.3 ns 24.3 ns 4
lstringa<16> copy{str_with_len_N};/64_median 24.2 ns 24.2 ns 4
lstringa<16> copy{str_with_len_N};/64_stddev 0.482 ns 0.482 ns 4
lstringa<16> copy{str_with_len_N};/64_cv 1.99 % 1.99 % 4
lstringa<16> copy{str_with_len_N};/128_mean 33.8 ns 33.9 ns 4
lstringa<16> copy{str_with_len_N};/128_median 33.9 ns 33.9 ns 4
lstringa<16> copy{str_with_len_N};/128_stddev 0.822 ns 0.822 ns 4
lstringa<16> copy{str_with_len_N};/128_cv 2.43 % 2.43 % 4
lstringa<16> copy{str_with_len_N};/256_mean 25.9 ns 25.9 ns 4
lstringa<16> copy{str_with_len_N};/256_median 25.9 ns 25.9 ns 4
lstringa<16> copy{str_with_len_N};/256_stddev 0.442 ns 0.442 ns 4
lstringa<16> copy{str_with_len_N};/256_cv 1.71 % 1.71 % 4
lstringa<16> copy{str_with_len_N};/512_mean 34.8 ns 34.8 ns 4
lstringa<16> copy{str_with_len_N};/512_median 34.9 ns 34.9 ns 4
lstringa<16> copy{str_with_len_N};/512_stddev 0.270 ns 0.270 ns 4
lstringa<16> copy{str_with_len_N};/512_cv 0.78 % 0.78 % 4
lstringa<16> copy{str_with_len_N};/1024_mean 99.7 ns 99.7 ns 4
lstringa<16> copy{str_with_len_N};/1024_median 99.2 ns 99.2 ns 4
lstringa<16> copy{str_with_len_N};/1024_stddev 2.75 ns 2.75 ns 4
lstringa<16> copy{str_with_len_N};/1024_cv 2.75 % 2.76 % 4
lstringa<16> copy{str_with_len_N};/2048_mean 110 ns 110 ns 4
lstringa<16> copy{str_with_len_N};/2048_median 111 ns 111 ns 4
lstringa<16> copy{str_with_len_N};/2048_stddev 3.07 ns 3.07 ns 4
lstringa<16> copy{str_with_len_N};/2048_cv 2.78 % 2.78 % 4
lstringa<16> copy{str_with_len_N};/4096_mean 129 ns 129 ns 4
lstringa<16> copy{str_with_len_N};/4096_median 130 ns 130 ns 4
lstringa<16> copy{str_with_len_N};/4096_stddev 2.98 ns 2.98 ns 4
lstringa<16> copy{str_with_len_N};/4096_cv 2.32 % 2.32 % 4
lstringa<512> copy{str_with_len_N};/15_mean 1.15 ns 1.15 ns 4
lstringa<512> copy{str_with_len_N};/15_median 1.15 ns 1.15 ns 4
lstringa<512> copy{str_with_len_N};/15_stddev 0.018 ns 0.018 ns 4
lstringa<512> copy{str_with_len_N};/15_cv 1.55 % 1.55 % 4
lstringa<512> copy{str_with_len_N};/16_mean 4.22 ns 4.22 ns 4
lstringa<512> copy{str_with_len_N};/16_median 4.20 ns 4.20 ns 4
lstringa<512> copy{str_with_len_N};/16_stddev 0.108 ns 0.108 ns 4
lstringa<512> copy{str_with_len_N};/16_cv 2.57 % 2.57 % 4
lstringa<512> copy{str_with_len_N};/23_mean 4.24 ns 4.24 ns 4
lstringa<512> copy{str_with_len_N};/23_median 4.23 ns 4.23 ns 4
lstringa<512> copy{str_with_len_N};/23_stddev 0.108 ns 0.108 ns 4
lstringa<512> copy{str_with_len_N};/23_cv 2.55 % 2.55 % 4
lstringa<512> copy{str_with_len_N};/24_mean 4.26 ns 4.26 ns 4
lstringa<512> copy{str_with_len_N};/24_median 4.24 ns 4.24 ns 4
lstringa<512> copy{str_with_len_N};/24_stddev 0.075 ns 0.075 ns 4
lstringa<512> copy{str_with_len_N};/24_cv 1.77 % 1.77 % 4
lstringa<512> copy{str_with_len_N};/32_mean 4.20 ns 4.20 ns 4
lstringa<512> copy{str_with_len_N};/32_median 4.17 ns 4.17 ns 4
lstringa<512> copy{str_with_len_N};/32_stddev 0.082 ns 0.082 ns 4
lstringa<512> copy{str_with_len_N};/32_cv 1.95 % 1.95 % 4
lstringa<512> copy{str_with_len_N};/64_mean 5.67 ns 5.67 ns 4
lstringa<512> copy{str_with_len_N};/64_median 5.67 ns 5.67 ns 4
lstringa<512> copy{str_with_len_N};/64_stddev 0.074 ns 0.074 ns 4
lstringa<512> copy{str_with_len_N};/64_cv 1.31 % 1.31 % 4
lstringa<512> copy{str_with_len_N};/128_mean 6.29 ns 6.29 ns 4
lstringa<512> copy{str_with_len_N};/128_median 6.30 ns 6.30 ns 4
lstringa<512> copy{str_with_len_N};/128_stddev 0.125 ns 0.125 ns 4
lstringa<512> copy{str_with_len_N};/128_cv 1.98 % 1.98 % 4
lstringa<512> copy{str_with_len_N};/256_mean 7.98 ns 7.98 ns 4
lstringa<512> copy{str_with_len_N};/256_median 7.98 ns 7.98 ns 4
lstringa<512> copy{str_with_len_N};/256_stddev 0.053 ns 0.053 ns 4
lstringa<512> copy{str_with_len_N};/256_cv 0.66 % 0.66 % 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.2 ns 10.2 ns 4
lstringa<512> copy{str_with_len_N};/512_stddev 0.100 ns 0.100 ns 4
lstringa<512> copy{str_with_len_N};/512_cv 0.98 % 0.98 % 4
lstringa<512> copy{str_with_len_N};/1024_mean 96.5 ns 96.5 ns 4
lstringa<512> copy{str_with_len_N};/1024_median 95.5 ns 95.5 ns 4
lstringa<512> copy{str_with_len_N};/1024_stddev 3.21 ns 3.21 ns 4
lstringa<512> copy{str_with_len_N};/1024_cv 3.32 % 3.32 % 4
lstringa<512> copy{str_with_len_N};/2048_mean 103 ns 103 ns 4
lstringa<512> copy{str_with_len_N};/2048_median 103 ns 103 ns 4
lstringa<512> copy{str_with_len_N};/2048_stddev 2.63 ns 2.63 ns 4
lstringa<512> copy{str_with_len_N};/2048_cv 2.55 % 2.55 % 4
lstringa<512> copy{str_with_len_N};/4096_mean 126 ns 126 ns 4
lstringa<512> copy{str_with_len_N};/4096_median 126 ns 126 ns 4
lstringa<512> copy{str_with_len_N};/4096_stddev 5.68 ns 5.68 ns 4
lstringa<512> copy{str_with_len_N};/4096_cv 4.51 % 4.51 % 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.9 ns 27.9 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 27.9 ns 27.9 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.402 ns 0.402 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.44 % 1.44 % 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 12.5 ns 12.5 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 12.3 ns 12.3 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.396 ns 0.396 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 3.17 % 3.17 % 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 16.8 ns 16.8 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 16.8 ns 16.8 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.196 ns 0.196 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.16 % 1.16 % 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 7.54 ns 7.54 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 7.55 ns 7.55 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.041 ns 0.041 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 0.55 % 0.55 % 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 8.43 ns 8.43 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 8.42 ns 8.42 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.141 ns 0.141 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.68 % 1.68 % 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.9 ns 23.9 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 23.9 ns 23.9 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.614 ns 0.614 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.58 % 2.58 % 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.15 ns 9.15 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.19 ns 9.19 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.181 ns 0.181 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.98 % 1.98 % 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 16.2 ns 16.2 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 16.3 ns 16.3 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.118 ns 0.118 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 0.73 % 0.73 % 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 6.48 ns 6.48 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 6.45 ns 6.45 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.151 ns 0.151 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 2.32 % 2.32 % 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 6.42 ns 6.42 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 6.43 ns 6.43 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.128 ns 0.128 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.99 % 1.99 % 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.1 ns 29.1 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 29.1 ns 29.1 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.141 ns 0.141 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 0.49 % 0.49 % 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 23.8 ns 23.8 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 23.7 ns 23.7 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.203 ns 0.203 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 0.85 % 0.85 % 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 11.0 ns 11.0 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 11.1 ns 11.1 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.156 ns 0.156 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 1.41 % 1.41 % 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 66.3 ns 66.3 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 66.2 ns 66.2 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 0.163 ns 0.163 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 0.25 % 0.25 % 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 24.4 ns 24.4 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 24.2 ns 24.2 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.303 ns 0.303 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.24 % 1.24 % 4
ssa s = "1234.567e10"; double res = *s.to_double()_mean 24.5 ns 24.5 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_median 24.5 ns 24.5 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.380 ns 0.380 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_cv 1.55 % 1.55 % 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 1411 ns 1411 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_median 1412 ns 1412 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 35.0 ns 35.0 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 2.48 % 2.48 % 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 9.10 ns 9.10 ns 4
std::string str; ... str += "abbaabbaabbaabba";_cv 2.40 % 2.40 % 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 364 ns 364 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 365 ns 365 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 7.15 ns 7.14 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 1.96 % 1.96 % 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 271 ns 271 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 274 ns 274 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 11.8 ns 11.8 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 4.35 % 4.35 % 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 229 ns 229 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 233 ns 233 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 8.90 ns 8.90 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 3.89 % 3.89 % 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 144 ns 144 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 144 ns 144 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 1.68 ns 1.68 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.17 % 1.17 % 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 1391 ns 1391 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 1393 ns 1393 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 6.61 ns 6.60 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 0.48 % 0.47 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1161 ns 1161 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1163 ns 1163 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 17.5 ns 17.5 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 1.51 % 1.51 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 443 ns 443 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 443 ns 443 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 6.52 ns 6.52 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.47 % 1.47 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 368 ns 368 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 369 ns 369 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 12.5 ns 12.5 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.41 % 3.41 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 348 ns 348 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 354 ns 354 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 17.3 ns 17.3 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.98 % 4.98 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 214 ns 214 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 215 ns 215 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 3.03 ns 3.03 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.41 % 1.41 % 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 75407 ns 75407 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 76071 ns 76071 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 1624 ns 1624 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 2.15 % 2.15 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 67303 ns 67303 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 67374 ns 67374 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 747 ns 747 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.11 % 1.11 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 20392 ns 20392 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 20416 ns 20416 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 93.8 ns 93.8 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 0.46 % 0.46 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17950 ns 17950 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 18065 ns 18065 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 352 ns 352 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.96 % 1.96 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17908 ns 17908 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17973 ns 17972 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 436 ns 436 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.44 % 2.44 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17735 ns 17735 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17771 ns 17771 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 347 ns 347 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.95 % 1.95 % 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 1397 ns 1397 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_median 1392 ns 1392 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_stddev 41.3 ns 41.3 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_cv 2.95 % 2.95 % 4
std::string str; ... str += str_var1 + str_var2;_mean 1344 ns 1344 ns 4
std::string str; ... str += str_var1 + str_var2;_median 1332 ns 1332 ns 4
std::string str; ... str += str_var1 + str_var2;_stddev 64.6 ns 64.6 ns 4
std::string str; ... str += str_var1 + str_var2;_cv 4.81 % 4.81 % 4
lstringa<16> str; ... str += str_var1 + str_var2;_mean 547 ns 547 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_median 551 ns 551 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 9.05 ns 9.05 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_cv 1.65 % 1.65 % 4
lstringa<128> str; ... str += str_var1 + str_var2;_mean 454 ns 454 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_median 457 ns 457 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 12.0 ns 12.0 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_cv 2.64 % 2.64 % 4
lstringa<512> str; ... str += str_var1 + str_var2;_mean 422 ns 422 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_median 426 ns 426 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 25.1 ns 25.1 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_cv 5.95 % 5.95 % 4
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 310 ns 310 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_median 311 ns 311 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 6.36 ns 6.36 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 2.05 % 2.05 % 4
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 3033 ns 3033 ns 4
std::stringstream str; str << "test = " << k << " times";_median 3046 ns 3046 ns 4
std::stringstream str; str << "test = " << k << " times";_stddev 70.7 ns 70.7 ns 4
std::stringstream str; str << "test = " << k << " times";_cv 2.33 % 2.33 % 4
std::string str = "test = " + std::to_string(k) + " times";_mean 427 ns 427 ns 4
std::string str = "test = " + std::to_string(k) + " times";_median 426 ns 426 ns 4
std::string str = "test = " + std::to_string(k) + " times";_stddev 5.62 ns 5.61 ns 4
std::string str = "test = " + std::to_string(k) + " times";_cv 1.32 % 1.32 % 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 1487 ns 1487 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 1478 ns 1478 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 26.4 ns 26.4 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.78 % 1.78 % 4
std::string str = std::format("test = {} times", k);_mean 1206 ns 1206 ns 4
std::string str = std::format("test = {} times", k);_median 1196 ns 1196 ns 4
std::string str = std::format("test = {} times", k);_stddev 34.6 ns 34.6 ns 4
std::string str = std::format("test = {} times", k);_cv 2.87 % 2.87 % 4
lstringa<8> str; str.format("test = {} times", k);_mean 1559 ns 1559 ns 4
lstringa<8> str; str.format("test = {} times", k);_median 1553 ns 1553 ns 4
lstringa<8> str; str.format("test = {} times", k);_stddev 41.0 ns 41.0 ns 4
lstringa<8> str; str.format("test = {} times", k);_cv 2.63 % 2.63 % 4
lstringa<32> str; str.format("test = {} times", k);_mean 1054 ns 1054 ns 4
lstringa<32> str; str.format("test = {} times", k);_median 1047 ns 1047 ns 4
lstringa<32> str; str.format("test = {} times", k);_stddev 16.7 ns 16.7 ns 4
lstringa<32> str; str.format("test = {} times", k);_cv 1.58 % 1.58 % 4
lstringa<8> str = "test = " + k + " times";_mean 290 ns 290 ns 4
lstringa<8> str = "test = " + k + " times";_median 289 ns 289 ns 4
lstringa<8> str = "test = " + k + " times";_stddev 3.95 ns 3.95 ns 4
lstringa<8> str = "test = " + k + " times";_cv 1.36 % 1.36 % 4
lstringa<32> str = "test = " + k + " times";_mean 136 ns 136 ns 4
lstringa<32> str = "test = " + k + " times";_median 136 ns 136 ns 4
lstringa<32> str = "test = " + k + " times";_stddev 2.69 ns 2.69 ns 4
lstringa<32> str = "test = " + k + " times";_cv 1.98 % 1.98 % 4
stringa str = "test = " + k + " times";_mean 137 ns 137 ns 4
stringa str = "test = " + k + " times";_median 138 ns 138 ns 4
stringa str = "test = " + k + " times";_stddev 2.86 ns 2.86 ns 4
stringa str = "test = " + k + " times";_cv 2.09 % 2.09 % 4
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 275 ns 275 ns 4
std::string::find + substr + std::strtol_median 276 ns 276 ns 4
std::string::find + substr + std::strtol_stddev 7.55 ns 7.55 ns 4
std::string::find + substr + std::strtol_cv 2.74 % 2.74 % 4
ssa::splitter + ssa::as_int_mean 192 ns 192 ns 4
ssa::splitter + ssa::as_int_median 192 ns 192 ns 4
ssa::splitter + ssa::as_int_stddev 3.46 ns 3.46 ns 4
ssa::splitter + ssa::as_int_cv 1.80 % 1.80 % 4
ssa::splitf + functor_mean 196 ns 196 ns 4
ssa::splitf + functor_median 196 ns 196 ns 4
ssa::splitf + functor_stddev 0.580 ns 0.580 ns 4
ssa::splitf + functor_cv 0.30 % 0.30 % 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 822 ns 822 ns 4
Naive (and wrong) replace symbols with std::string find + replace_median 821 ns 821 ns 4
Naive (and wrong) replace symbols with std::string find + replace_stddev 19.8 ns 19.8 ns 4
Naive (and wrong) replace symbols with std::string find + replace_cv 2.41 % 2.41 % 4
replace symbols with std::string find_first_of + replace_mean 2428 ns 2428 ns 4
replace symbols with std::string find_first_of + replace_median 2424 ns 2424 ns 4
replace symbols with std::string find_first_of + replace_stddev 88.6 ns 88.6 ns 4
replace symbols with std::string find_first_of + replace_cv 3.65 % 3.65 % 4
replace symbols with std::string_view find_first_of + copy_mean 1065 ns 1065 ns 4
replace symbols with std::string_view find_first_of + copy_median 1062 ns 1062 ns 4
replace symbols with std::string_view find_first_of + copy_stddev 18.7 ns 18.7 ns 4
replace symbols with std::string_view find_first_of + copy_cv 1.76 % 1.76 % 4
replace runtime symbols with string expressions and without remembering all search results_mean 1372 ns 1372 ns 4
replace runtime symbols with string expressions and without remembering all search results_median 1363 ns 1363 ns 4
replace runtime symbols with string expressions and without remembering all search results_stddev 28.6 ns 28.6 ns 4
replace runtime symbols with string expressions and without remembering all search results_cv 2.09 % 2.09 % 4
replace runtime symbols with simstr and memorization of all search results_mean 1016 ns 1016 ns 4
replace runtime symbols with simstr and memorization of all search results_median 1011 ns 1011 ns 4
replace runtime symbols with simstr and memorization of all search results_stddev 19.6 ns 19.6 ns 4
replace runtime symbols with simstr and memorization of all search results_cv 1.93 % 1.93 % 4
replace const symbols with string expressions and without remembering all search results_mean 1045 ns 1045 ns 4
replace const symbols with string expressions and without remembering all search results_median 1039 ns 1039 ns 4
replace const symbols with string expressions and without remembering all search results_stddev 35.5 ns 35.5 ns 4
replace const symbols with string expressions and without remembering all search results_cv 3.40 % 3.40 % 4
replace const symbols with string expressions and memorization of all search results_mean 837 ns 837 ns 4
replace const symbols with string expressions and memorization of all search results_median 842 ns 842 ns 4
replace const symbols with string expressions and memorization of all search results_stddev 17.2 ns 17.2 ns 4
replace const symbols with string expressions and memorization of all search results_cv 2.06 % 2.06 % 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 161 ns 161 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_median 161 ns 161 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 2.20 ns 2.20 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_cv 1.36 % 1.36 % 4
Short replace symbols with std::string find_first_of + replace_mean 329 ns 329 ns 4
Short replace symbols with std::string find_first_of + replace_median 329 ns 329 ns 4
Short replace symbols with std::string find_first_of + replace_stddev 8.06 ns 8.06 ns 4
Short replace symbols with std::string find_first_of + replace_cv 2.45 % 2.45 % 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 153 ns 153 ns 4
Short replace symbols with std::string_view find_first_of + copy_stddev 5.45 ns 5.45 ns 4
Short replace symbols with std::string_view find_first_of + copy_cv 3.55 % 3.55 % 4
Short replace runtime symbols with string expressions and without remembering all search results_mean 180 ns 180 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_median 179 ns 179 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_stddev 4.51 ns 4.51 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_cv 2.50 % 2.50 % 4
Short replace runtime symbols with simstr and memorization of all search results_mean 184 ns 184 ns 4
Short replace runtime symbols with simstr and memorization of all search results_median 184 ns 184 ns 4
Short replace runtime symbols with simstr and memorization of all search results_stddev 2.95 ns 2.95 ns 4
Short replace runtime symbols with simstr and memorization of all search results_cv 1.61 % 1.61 % 4
Short replace const symbols with string expressions and without remembering all search results_mean 139 ns 139 ns 4
Short replace const symbols with string expressions and without remembering all search results_median 139 ns 139 ns 4
Short replace const symbols with string expressions and without remembering all search results_stddev 1.27 ns 1.27 ns 4
Short replace const symbols with string expressions and without remembering all search results_cv 0.91 % 0.91 % 4
Short replace const symbols with string expressions and memorization of all search results_mean 132 ns 132 ns 4
Short replace const symbols with string expressions and memorization of all search results_median 132 ns 132 ns 4
Short replace const symbols with string expressions and memorization of all search results_stddev 1.26 ns 1.26 ns 4
Short replace const symbols with string expressions and memorization of all search results_cv 0.95 % 0.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.72 ns 1.72 ns 4
replace bb to ---- in std::string|64_cv 1.11 % 1.11 % 4
replace bb to ---- in std::string|256_mean 504 ns 504 ns 4
replace bb to ---- in std::string|256_median 504 ns 504 ns 4
replace bb to ---- in std::string|256_stddev 18.2 ns 18.2 ns 4
replace bb to ---- in std::string|256_cv 3.62 % 3.62 % 4
replace bb to ---- in std::string|512_mean 1000 ns 1000 ns 4
replace bb to ---- in std::string|512_median 1002 ns 1002 ns 4
replace bb to ---- in std::string|512_stddev 17.0 ns 17.0 ns 4
replace bb to ---- in std::string|512_cv 1.70 % 1.70 % 4
replace bb to ---- in std::string|1024_mean 2347 ns 2347 ns 4
replace bb to ---- in std::string|1024_median 2324 ns 2324 ns 4
replace bb to ---- in std::string|1024_stddev 166 ns 166 ns 4
replace bb to ---- in std::string|1024_cv 7.05 % 7.05 % 4
replace bb to ---- in std::string|2048_mean 5969 ns 5969 ns 4
replace bb to ---- in std::string|2048_median 5919 ns 5919 ns 4
replace bb to ---- in std::string|2048_stddev 266 ns 266 ns 4
replace bb to ---- in std::string|2048_cv 4.46 % 4.46 % 4
replace bb to ---- in lstringa<8>|64_mean 138 ns 138 ns 4
replace bb to ---- in lstringa<8>|64_median 139 ns 139 ns 4
replace bb to ---- in lstringa<8>|64_stddev 3.50 ns 3.50 ns 4
replace bb to ---- in lstringa<8>|64_cv 2.53 % 2.53 % 4
replace bb to ---- in lstringa<8>|256_mean 444 ns 444 ns 4
replace bb to ---- in lstringa<8>|256_median 447 ns 447 ns 4
replace bb to ---- in lstringa<8>|256_stddev 6.19 ns 6.19 ns 4
replace bb to ---- in lstringa<8>|256_cv 1.39 % 1.39 % 4
replace bb to ---- in lstringa<8>|512_mean 899 ns 899 ns 4
replace bb to ---- in lstringa<8>|512_median 896 ns 896 ns 4
replace bb to ---- in lstringa<8>|512_stddev 19.6 ns 19.6 ns 4
replace bb to ---- in lstringa<8>|512_cv 2.18 % 2.18 % 4
replace bb to ---- in lstringa<8>|1024_mean 1751 ns 1751 ns 4
replace bb to ---- in lstringa<8>|1024_median 1752 ns 1752 ns 4
replace bb to ---- in lstringa<8>|1024_stddev 11.7 ns 11.7 ns 4
replace bb to ---- in lstringa<8>|1024_cv 0.67 % 0.67 % 4
replace bb to ---- in lstringa<8>|2048_mean 3301 ns 3301 ns 4
replace bb to ---- in lstringa<8>|2048_median 3294 ns 3294 ns 4
replace bb to ---- in lstringa<8>|2048_stddev 81.9 ns 81.9 ns 4
replace bb to ---- in lstringa<8>|2048_cv 2.48 % 2.48 % 4
replace bb to ---- by init stringa|64_mean 92.8 ns 92.8 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 1.37 ns 1.37 ns 4
replace bb to ---- by init stringa|64_cv 1.48 % 1.48 % 4
replace bb to ---- by init stringa|256_mean 287 ns 288 ns 4
replace bb to ---- by init stringa|256_median 287 ns 287 ns 4
replace bb to ---- by init stringa|256_stddev 1.86 ns 1.86 ns 4
replace bb to ---- by init stringa|256_cv 0.65 % 0.65 % 4
replace bb to ---- by init stringa|512_mean 705 ns 705 ns 4
replace bb to ---- by init stringa|512_median 702 ns 702 ns 4
replace bb to ---- by init stringa|512_stddev 12.7 ns 12.7 ns 4
replace bb to ---- by init stringa|512_cv 1.79 % 1.79 % 4
replace bb to ---- by init stringa|1024_mean 1550 ns 1550 ns 4
replace bb to ---- by init stringa|1024_median 1543 ns 1543 ns 4
replace bb to ---- by init stringa|1024_stddev 19.4 ns 19.4 ns 4
replace bb to ---- by init stringa|1024_cv 1.25 % 1.25 % 4
replace bb to ---- by init stringa|2048_mean 3106 ns 3106 ns 4
replace bb to ---- by init stringa|2048_median 3111 ns 3111 ns 4
replace bb to ---- by init stringa|2048_stddev 20.5 ns 20.4 ns 4
replace bb to ---- by init stringa|2048_cv 0.66 % 0.66 % 4
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 131 ns 131 ns 4
replace bb to -- in std::string|64_median 129 ns 129 ns 4
replace bb to -- in std::string|64_stddev 4.51 ns 4.51 ns 4
replace bb to -- in std::string|64_cv 3.45 % 3.45 % 4
replace bb to -- in std::string|256_mean 381 ns 381 ns 4
replace bb to -- in std::string|256_median 381 ns 381 ns 4
replace bb to -- in std::string|256_stddev 5.71 ns 5.71 ns 4
replace bb to -- in std::string|256_cv 1.50 % 1.50 % 4
replace bb to -- in std::string|512_mean 743 ns 743 ns 4
replace bb to -- in std::string|512_median 744 ns 744 ns 4
replace bb to -- in std::string|512_stddev 6.19 ns 6.19 ns 4
replace bb to -- in std::string|512_cv 0.83 % 0.83 % 4
replace bb to -- in std::string|1024_mean 1483 ns 1483 ns 4
replace bb to -- in std::string|1024_median 1477 ns 1477 ns 4
replace bb to -- in std::string|1024_stddev 36.1 ns 36.1 ns 4
replace bb to -- in std::string|1024_cv 2.43 % 2.43 % 4
replace bb to -- in std::string|2048_mean 2798 ns 2798 ns 4
replace bb to -- in std::string|2048_median 2793 ns 2793 ns 4
replace bb to -- in std::string|2048_stddev 34.3 ns 34.2 ns 4
replace bb to -- in std::string|2048_cv 1.23 % 1.22 % 4
replace bb to -- in lstringa<8>|64_mean 91.5 ns 91.5 ns 4
replace bb to -- in lstringa<8>|64_median 91.9 ns 91.9 ns 4
replace bb to -- in lstringa<8>|64_stddev 2.11 ns 2.11 ns 4
replace bb to -- in lstringa<8>|64_cv 2.30 % 2.30 % 4
replace bb to -- in lstringa<8>|256_mean 302 ns 302 ns 4
replace bb to -- in lstringa<8>|256_median 305 ns 305 ns 4
replace bb to -- in lstringa<8>|256_stddev 5.90 ns 5.90 ns 4
replace bb to -- in lstringa<8>|256_cv 1.95 % 1.95 % 4
replace bb to -- in lstringa<8>|512_mean 539 ns 539 ns 4
replace bb to -- in lstringa<8>|512_median 541 ns 541 ns 4
replace bb to -- in lstringa<8>|512_stddev 7.25 ns 7.25 ns 4
replace bb to -- in lstringa<8>|512_cv 1.34 % 1.34 % 4
replace bb to -- in lstringa<8>|1024_mean 1121 ns 1121 ns 4
replace bb to -- in lstringa<8>|1024_median 1103 ns 1103 ns 4
replace bb to -- in lstringa<8>|1024_stddev 86.3 ns 86.3 ns 4
replace bb to -- in lstringa<8>|1024_cv 7.70 % 7.70 % 4
replace bb to -- in lstringa<8>|2048_mean 2174 ns 2174 ns 4
replace bb to -- in lstringa<8>|2048_median 2126 ns 2126 ns 4
replace bb to -- in lstringa<8>|2048_stddev 136 ns 136 ns 4
replace bb to -- in lstringa<8>|2048_cv 6.25 % 6.25 % 4
replace bb to -- by init stringa|64_mean 112 ns 112 ns 4
replace bb to -- by init stringa|64_median 112 ns 112 ns 4
replace bb to -- by init stringa|64_stddev 1.35 ns 1.35 ns 4
replace bb to -- by init stringa|64_cv 1.20 % 1.20 % 4
replace bb to -- by init stringa|256_mean 262 ns 262 ns 4
replace bb to -- by init stringa|256_median 262 ns 262 ns 4
replace bb to -- by init stringa|256_stddev 3.25 ns 3.25 ns 4
replace bb to -- by init stringa|256_cv 1.24 % 1.24 % 4
replace bb to -- by init stringa|512_mean 479 ns 479 ns 4
replace bb to -- by init stringa|512_median 478 ns 478 ns 4
replace bb to -- by init stringa|512_stddev 6.02 ns 6.02 ns 4
replace bb to -- by init stringa|512_cv 1.26 % 1.26 % 4
replace bb to -- by init stringa|1024_mean 954 ns 954 ns 4
replace bb to -- by init stringa|1024_median 953 ns 953 ns 4
replace bb to -- by init stringa|1024_stddev 27.7 ns 27.7 ns 4
replace bb to -- by init stringa|1024_cv 2.91 % 2.91 % 4
replace bb to -- by init stringa|2048_mean 1809 ns 1809 ns 4
replace bb to -- by init stringa|2048_median 1804 ns 1804 ns 4
replace bb to -- by init stringa|2048_stddev 20.3 ns 20.3 ns 4
replace bb to -- by init stringa|2048_cv 1.12 % 1.12 % 4
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3843202 ns 3843218 ns 4
hashStrMapA<size_t> emplace & find stringa;_median 3876351 ns 3876368 ns 4
hashStrMapA<size_t> emplace & find stringa;_stddev 83132 ns 83131 ns 4
hashStrMapA<size_t> emplace & find stringa;_cv 2.16 % 2.16 % 4
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3689411 ns 3689422 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3701989 ns 3701997 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 102615 ns 102613 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 2.78 % 2.78 % 4
hashStrMapA<size_t> emplace & find ssa;_mean 3848145 ns 3848147 ns 4
hashStrMapA<size_t> emplace & find ssa;_median 3860211 ns 3860203 ns 4
hashStrMapA<size_t> emplace & find ssa;_stddev 53550 ns 53545 ns 4
hashStrMapA<size_t> emplace & find ssa;_cv 1.39 % 1.39 % 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 4076242 ns 4076215 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 4075582 ns 4075516 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 57080 ns 57087 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 1.40 % 1.40 % 4
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 738 ns 738 ns 4
Build func full name std::string;_median 745 ns 745 ns 4
Build func full name std::string;_stddev 20.2 ns 20.2 ns 4
Build func full name std::string;_cv 2.74 % 2.74 % 4
Build func full name std::string 1;_mean 820 ns 820 ns 4
Build func full name std::string 1;_median 819 ns 819 ns 4
Build func full name std::string 1;_stddev 7.48 ns 7.48 ns 4
Build func full name std::string 1;_cv 0.91 % 0.91 % 4
Build func full name std::stream;_mean 2610 ns 2610 ns 4
Build func full name std::stream;_median 2628 ns 2628 ns 4
Build func full name std::stream;_stddev 45.5 ns 45.5 ns 4
Build func full name std::stream;_cv 1.75 % 1.75 % 4
Build func full name stringa;_mean 480 ns 480 ns 4
Build func full name stringa;_median 479 ns 479 ns 4
Build func full name stringa;_stddev 6.26 ns 6.26 ns 4
Build func full name stringa;_cv 1.30 % 1.30 % 4
Build func full name stringa 1;_mean 564 ns 564 ns 4
Build func full name stringa 1;_median 563 ns 563 ns 4
Build func full name stringa 1;_stddev 12.8 ns 12.8 ns 4
Build func full name stringa 1;_cv 2.26 % 2.26 % 4
----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
To upper case std::wstring_mean 175 ns 175 ns 4
To upper case std::wstring_median 174 ns 174 ns 4
To upper case std::wstring_stddev 3.12 ns 3.12 ns 4
To upper case std::wstring_cv 1.78 % 1.78 % 4
To upper case lstringw<15>_mean 40.4 ns 40.4 ns 4
To upper case lstringw<15>_median 40.3 ns 40.3 ns 4
To upper case lstringw<15>_stddev 0.801 ns 0.801 ns 4
To upper case lstringw<15>_cv 1.98 % 1.98 % 4

View File

@ -1,876 +0,0 @@
2026-01-21T00:24:03+03:00
Running benchStr.exe
Run on (32 X 2494 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)
--------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------
----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and number by std to std::string_mean 266 ns 265 ns 10
Concat std::string and number by std to std::string_median 265 ns 265 ns 10
Concat std::string and number by std to std::string_stddev 6.17 ns 4.74 ns 10
Concat std::string and number by std to std::string_cv 2.32 % 1.79 % 10
Concat std::string and number by StrExpr to std::string_mean 157 ns 156 ns 10
Concat std::string and number by StrExpr to std::string_median 157 ns 157 ns 10
Concat std::string and number by StrExpr to std::string_stddev 5.39 ns 6.16 ns 10
Concat std::string and number by StrExpr to std::string_cv 3.43 % 3.95 % 10
Concat stringa and number by StrExpr to simstr::stringa_mean 66.4 ns 66.3 ns 10
Concat stringa and number by StrExpr to simstr::stringa_median 66.7 ns 67.0 ns 10
Concat stringa and number by StrExpr to simstr::stringa_stddev 1.30 ns 1.77 ns 10
Concat stringa and number by StrExpr to simstr::stringa_cv 1.96 % 2.67 % 10
----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and hex number by std to std::string_mean 777 ns 766 ns 10
Concat std::string and hex number by std to std::string_median 773 ns 750 ns 10
Concat std::string and hex number by std to std::string_stddev 30.7 ns 35.3 ns 10
Concat std::string and hex number by std to std::string_cv 3.95 % 4.61 % 10
Concat std::string and hex number by StrExpr to std::string_mean 76.6 ns 76.5 ns 10
Concat std::string and hex number by StrExpr to std::string_median 76.2 ns 76.0 ns 10
Concat std::string and hex number by StrExpr to std::string_stddev 1.72 ns 1.71 ns 10
Concat std::string and hex number by StrExpr to std::string_cv 2.25 % 2.24 % 10
Concat stringa and hex number by StrExpr to simstr::stringa_mean 67.9 ns 67.8 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_median 67.4 ns 67.0 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_stddev 1.81 ns 1.64 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_cv 2.67 % 2.42 % 10
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 39.8 ns 39.4 ns 10
Concat std::string by std to std::string_median 39.8 ns 39.9 ns 10
Concat std::string by std to std::string_stddev 1.29 ns 1.07 ns 10
Concat std::string by std to std::string_cv 3.25 % 2.71 % 10
Concat std::string by StrExpr to std::string_mean 39.1 ns 39.0 ns 10
Concat std::string by StrExpr to std::string_median 39.1 ns 38.5 ns 10
Concat std::string by StrExpr to std::string_stddev 1.05 ns 0.900 ns 10
Concat std::string by StrExpr to std::string_cv 2.69 % 2.31 % 10
Concat stringa by StrExpr to stringa_mean 29.2 ns 29.1 ns 10
Concat stringa by StrExpr to stringa_median 28.7 ns 28.5 ns 10
Concat stringa by StrExpr to stringa_stddev 1.18 ns 1.22 ns 10
Concat stringa by StrExpr to stringa_cv 4.04 % 4.19 % 10
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 208 ns 206 ns 10
Find concat three std::string_median 205 ns 206 ns 10
Find concat three std::string_stddev 6.54 ns 5.76 ns 10
Find concat three std::string_cv 3.15 % 2.79 % 10
Find concat three strexpr_mean 116 ns 115 ns 10
Find concat three strexpr_median 115 ns 114 ns 10
Find concat three strexpr_stddev 3.41 ns 3.45 ns 10
Find concat three strexpr_cv 2.95 % 3.01 % 10
Find concat three simstr_mean 22.2 ns 22.0 ns 10
Find concat three simstr_median 22.2 ns 22.0 ns 10
Find concat three simstr_stddev 0.690 ns 0.537 ns 10
Find concat three simstr_cv 3.11 % 2.44 % 10
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 8.25 ns 8.14 ns 10
BuildTypeNameStr 0/0_median 8.21 ns 8.11 ns 10
BuildTypeNameStr 0/0_stddev 0.223 ns 0.273 ns 10
BuildTypeNameStr 0/0_cv 2.71 % 3.36 % 10
BuildTypeNameExp 0/0_mean 7.50 ns 7.50 ns 10
BuildTypeNameExp 0/0_median 7.41 ns 7.41 ns 10
BuildTypeNameExp 0/0_stddev 0.221 ns 0.247 ns 10
BuildTypeNameExp 0/0_cv 2.95 % 3.29 % 10
BuildTypeNameSim 0/0_mean 8.35 ns 8.25 ns 10
BuildTypeNameSim 0/0_median 8.40 ns 8.37 ns 10
BuildTypeNameSim 0/0_stddev 0.229 ns 0.218 ns 10
BuildTypeNameSim 0/0_cv 2.75 % 2.65 % 10
BuildTypeNameStr 10/10_mean 59.5 ns 59.1 ns 10
BuildTypeNameStr 10/10_median 59.3 ns 59.3 ns 10
BuildTypeNameStr 10/10_stddev 1.54 ns 1.73 ns 10
BuildTypeNameStr 10/10_cv 2.59 % 2.93 % 10
BuildTypeNameExp 10/10_mean 34.2 ns 34.1 ns 10
BuildTypeNameExp 10/10_median 34.2 ns 34.1 ns 10
BuildTypeNameExp 10/10_stddev 0.848 ns 0.708 ns 10
BuildTypeNameExp 10/10_cv 2.48 % 2.07 % 10
BuildTypeNameSim 10/10_mean 26.4 ns 26.0 ns 10
BuildTypeNameSim 10/10_median 26.5 ns 26.1 ns 10
BuildTypeNameSim 10/10_stddev 1.13 ns 1.27 ns 10
BuildTypeNameSim 10/10_cv 4.27 % 4.91 % 10
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 318 ns 316 ns 10
Concat with replace str_median 316 ns 314 ns 10
Concat with replace str_stddev 11.9 ns 10.4 ns 10
Concat with replace str_cv 3.73 % 3.30 % 10
Concat with replace exp_mean 224 ns 223 ns 10
Concat with replace exp_median 220 ns 220 ns 10
Concat with replace exp_stddev 8.19 ns 8.32 ns 10
Concat with replace exp_cv 3.66 % 3.73 % 10
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 1.11 ns 1.10 ns 10
std::string e;_median 1.10 ns 1.07 ns 10
std::string e;_stddev 0.035 ns 0.035 ns 10
std::string e;_cv 3.16 % 3.23 % 10
std::string_view e;_mean 0.372 ns 0.368 ns 10
std::string_view e;_median 0.367 ns 0.365 ns 10
std::string_view e;_stddev 0.013 ns 0.009 ns 10
std::string_view e;_cv 3.56 % 2.40 % 10
ssa e;_mean 0.364 ns 0.361 ns 10
ssa e;_median 0.365 ns 0.361 ns 10
ssa e;_stddev 0.007 ns 0.008 ns 10
ssa e;_cv 2.04 % 2.34 % 10
stringa e;_mean 0.757 ns 0.749 ns 10
stringa e;_median 0.754 ns 0.746 ns 10
stringa e;_stddev 0.027 ns 0.021 ns 10
stringa e;_cv 3.61 % 2.78 % 10
lstringa<20> e;_mean 1.12 ns 1.11 ns 10
lstringa<20> e;_median 1.11 ns 1.12 ns 10
lstringa<20> e;_stddev 0.035 ns 0.036 ns 10
lstringa<20> e;_cv 3.12 % 3.22 % 10
lstringa<40> e;_mean 1.15 ns 1.14 ns 10
lstringa<40> e;_median 1.13 ns 1.13 ns 10
lstringa<40> e;_stddev 0.072 ns 0.079 ns 10
lstringa<40> e;_cv 6.27 % 6.90 % 10
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 1.85 ns 1.82 ns 10
std::string e = "Test text";_median 1.82 ns 1.84 ns 10
std::string e = "Test text";_stddev 0.086 ns 0.049 ns 10
std::string e = "Test text";_cv 4.67 % 2.69 % 10
std::string_view e = "Test text";_mean 0.728 ns 0.722 ns 10
std::string_view e = "Test text";_median 0.721 ns 0.724 ns 10
std::string_view e = "Test text";_stddev 0.020 ns 0.020 ns 10
std::string_view e = "Test text";_cv 2.79 % 2.84 % 10
ssa e = "Test text";_mean 0.370 ns 0.367 ns 10
ssa e = "Test text";_median 0.372 ns 0.369 ns 10
ssa e = "Test text";_stddev 0.010 ns 0.010 ns 10
ssa e = "Test text";_cv 2.79 % 2.68 % 10
stringa e = "Test text";_mean 1.85 ns 1.83 ns 10
stringa e = "Test text";_median 1.87 ns 1.82 ns 10
stringa e = "Test text";_stddev 0.053 ns 0.044 ns 10
stringa e = "Test text";_cv 2.84 % 2.42 % 10
lstringa<20> e = "Test text";_mean 1.89 ns 1.86 ns 10
lstringa<20> e = "Test text";_median 1.89 ns 1.86 ns 10
lstringa<20> e = "Test text";_stddev 0.067 ns 0.085 ns 10
lstringa<20> e = "Test text";_cv 3.55 % 4.60 % 10
lstringa<40> e = "Test text";_mean 1.91 ns 1.90 ns 10
lstringa<40> e = "Test text";_median 1.87 ns 1.86 ns 10
lstringa<40> e = "Test text";_stddev 0.083 ns 0.082 ns 10
lstringa<40> e = "Test text";_cv 4.36 % 4.34 % 10
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 74.9 ns 74.3 ns 10
std::string e = "123456789012345678901234567890";_median 75.2 ns 75.3 ns 10
std::string e = "123456789012345678901234567890";_stddev 2.40 ns 2.03 ns 10
std::string e = "123456789012345678901234567890";_cv 3.20 % 2.74 % 10
std::string_view e = "123456789012345678901234567890";_mean 0.736 ns 0.732 ns 10
std::string_view e = "123456789012345678901234567890";_median 0.732 ns 0.732 ns 10
std::string_view e = "123456789012345678901234567890";_stddev 0.024 ns 0.022 ns 10
std::string_view e = "123456789012345678901234567890";_cv 3.20 % 2.97 % 10
ssa e = "123456789012345678901234567890";_mean 0.365 ns 0.363 ns 10
ssa e = "123456789012345678901234567890";_median 0.366 ns 0.361 ns 10
ssa e = "123456789012345678901234567890";_stddev 0.005 ns 0.005 ns 10
ssa e = "123456789012345678901234567890";_cv 1.27 % 1.40 % 10
stringa e = "123456789012345678901234567890";_mean 1.85 ns 1.84 ns 10
stringa e = "123456789012345678901234567890";_median 1.84 ns 1.84 ns 10
stringa e = "123456789012345678901234567890";_stddev 0.051 ns 0.042 ns 10
stringa e = "123456789012345678901234567890";_cv 2.75 % 2.30 % 10
lstringa<20> e = "123456789012345678901234567890";_mean 76.8 ns 75.9 ns 10
lstringa<20> e = "123456789012345678901234567890";_median 76.5 ns 76.7 ns 10
lstringa<20> e = "123456789012345678901234567890";_stddev 1.85 ns 1.23 ns 10
lstringa<20> e = "123456789012345678901234567890";_cv 2.40 % 1.63 % 10
lstringa<40> e = "123456789012345678901234567890";_mean 2.53 ns 2.52 ns 10
lstringa<40> e = "123456789012345678901234567890";_median 2.53 ns 2.51 ns 10
lstringa<40> e = "123456789012345678901234567890";_stddev 0.065 ns 0.055 ns 10
lstringa<40> e = "123456789012345678901234567890";_cv 2.58 % 2.20 % 10
----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text"; auto c{e};_mean 1.87 ns 1.83 ns 10
std::string e = "Test text"; auto c{e};_median 1.86 ns 1.81 ns 10
std::string e = "Test text"; auto c{e};_stddev 0.059 ns 0.064 ns 10
std::string e = "Test text"; auto c{e};_cv 3.17 % 3.52 % 10
std::string_view e = "Test text"; auto c{e};_mean 0.368 ns 0.367 ns 10
std::string_view e = "Test text"; auto c{e};_median 0.365 ns 0.361 ns 10
std::string_view e = "Test text"; auto c{e};_stddev 0.010 ns 0.010 ns 10
std::string_view e = "Test text"; auto c{e};_cv 2.64 % 2.68 % 10
ssa e = "Test text"; auto c{e};_mean 0.375 ns 0.367 ns 10
ssa e = "Test text"; auto c{e};_median 0.372 ns 0.360 ns 10
ssa e = "Test text"; auto c{e};_stddev 0.017 ns 0.014 ns 10
ssa e = "Test text"; auto c{e};_cv 4.40 % 3.85 % 10
stringa e = "Test text"; auto c{e};_mean 1.32 ns 1.31 ns 10
stringa e = "Test text"; auto c{e};_median 1.33 ns 1.29 ns 10
stringa e = "Test text"; auto c{e};_stddev 0.042 ns 0.047 ns 10
stringa e = "Test text"; auto c{e};_cv 3.17 % 3.62 % 10
lstringa<20> e = "Test text"; auto c{e};_mean 5.30 ns 5.17 ns 10
lstringa<20> e = "Test text"; auto c{e};_median 5.33 ns 5.16 ns 10
lstringa<20> e = "Test text"; auto c{e};_stddev 0.187 ns 0.226 ns 10
lstringa<20> e = "Test text"; auto c{e};_cv 3.53 % 4.38 % 10
lstringa<40> e = "Test text"; auto c{e};_mean 5.22 ns 5.14 ns 10
lstringa<40> e = "Test text"; auto c{e};_median 5.26 ns 5.16 ns 10
lstringa<40> e = "Test text"; auto c{e};_stddev 0.140 ns 0.137 ns 10
lstringa<40> e = "Test text"; auto c{e};_cv 2.68 % 2.66 % 10
----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890"; auto c{e};_mean 81.3 ns 79.9 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_median 80.5 ns 78.5 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 5.02 ns 5.50 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_cv 6.17 % 6.89 % 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.741 ns 0.732 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.739 ns 0.725 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.016 ns 0.015 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 2.18 % 2.06 % 10
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.362 ns 0.359 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.357 ns 0.360 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.011 ns 0.006 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.95 % 1.72 % 10
stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.83 ns 1.81 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_median 1.81 ns 1.80 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.044 ns 0.040 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_cv 2.41 % 2.19 % 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 76.1 ns 75.9 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 75.8 ns 75.9 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 2.87 ns 3.21 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 3.77 % 4.23 % 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 4.38 ns 4.36 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 4.36 ns 4.39 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.073 ns 0.050 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.67 % 1.16 % 10
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find;_mean 38.3 ns 38.0 ns 10
std::string::find;_median 38.3 ns 37.7 ns 10
std::string::find;_stddev 0.476 ns 0.585 ns 10
std::string::find;_cv 1.24 % 1.54 % 10
std::string_view::find;_mean 38.1 ns 37.5 ns 10
std::string_view::find;_median 37.9 ns 37.7 ns 10
std::string_view::find;_stddev 0.751 ns 0.660 ns 10
std::string_view::find;_cv 1.97 % 1.76 % 10
ssa::find;_mean 18.3 ns 18.1 ns 10
ssa::find;_median 18.1 ns 18.0 ns 10
ssa::find;_stddev 0.297 ns 0.345 ns 10
ssa::find;_cv 1.63 % 1.90 % 10
stringa::find;_mean 19.8 ns 19.6 ns 10
stringa::find;_median 19.4 ns 19.5 ns 10
stringa::find;_stddev 0.845 ns 0.648 ns 10
stringa::find;_cv 4.27 % 3.31 % 10
lstringa<20>::find;_mean 17.6 ns 17.5 ns 10
lstringa<20>::find;_median 17.5 ns 17.4 ns 10
lstringa<20>::find;_stddev 0.545 ns 0.397 ns 10
lstringa<20>::find;_cv 3.10 % 2.28 % 10
lstringa<40>::find;_mean 17.8 ns 17.5 ns 10
lstringa<40>::find;_median 17.9 ns 17.3 ns 10
lstringa<40>::find;_stddev 0.432 ns 0.324 ns 10
lstringa<40>::find;_cv 2.42 % 1.85 % 10
------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string copy{str_with_len_N};/15_mean 1.86 ns 1.82 ns 10
std::string copy{str_with_len_N};/15_median 1.83 ns 1.82 ns 10
std::string copy{str_with_len_N};/15_stddev 0.101 ns 0.052 ns 10
std::string copy{str_with_len_N};/15_cv 5.42 % 2.85 % 10
std::string copy{str_with_len_N};/16_mean 80.4 ns 80.0 ns 10
std::string copy{str_with_len_N};/16_median 78.0 ns 78.5 ns 10
std::string copy{str_with_len_N};/16_stddev 4.86 ns 5.36 ns 10
std::string copy{str_with_len_N};/16_cv 6.04 % 6.69 % 10
std::string copy{str_with_len_N};/23_mean 78.0 ns 77.3 ns 10
std::string copy{str_with_len_N};/23_median 76.9 ns 76.7 ns 10
std::string copy{str_with_len_N};/23_stddev 3.65 ns 2.73 ns 10
std::string copy{str_with_len_N};/23_cv 4.68 % 3.54 % 10
std::string copy{str_with_len_N};/24_mean 80.2 ns 79.3 ns 10
std::string copy{str_with_len_N};/24_median 78.3 ns 78.5 ns 10
std::string copy{str_with_len_N};/24_stddev 4.99 ns 5.59 ns 10
std::string copy{str_with_len_N};/24_cv 6.22 % 7.05 % 10
std::string copy{str_with_len_N};/32_mean 82.7 ns 82.1 ns 10
std::string copy{str_with_len_N};/32_median 82.5 ns 82.0 ns 10
std::string copy{str_with_len_N};/32_stddev 1.82 ns 1.29 ns 10
std::string copy{str_with_len_N};/32_cv 2.20 % 1.57 % 10
std::string copy{str_with_len_N};/64_mean 82.0 ns 81.6 ns 10
std::string copy{str_with_len_N};/64_median 80.7 ns 80.2 ns 10
std::string copy{str_with_len_N};/64_stddev 3.00 ns 2.94 ns 10
std::string copy{str_with_len_N};/64_cv 3.66 % 3.60 % 10
std::string copy{str_with_len_N};/128_mean 89.8 ns 87.7 ns 10
std::string copy{str_with_len_N};/128_median 89.7 ns 87.9 ns 10
std::string copy{str_with_len_N};/128_stddev 5.67 ns 4.46 ns 10
std::string copy{str_with_len_N};/128_cv 6.32 % 5.09 % 10
std::string copy{str_with_len_N};/256_mean 91.4 ns 90.5 ns 10
std::string copy{str_with_len_N};/256_median 90.7 ns 90.7 ns 10
std::string copy{str_with_len_N};/256_stddev 2.30 ns 1.92 ns 10
std::string copy{str_with_len_N};/256_cv 2.52 % 2.12 % 10
std::string copy{str_with_len_N};/512_mean 89.2 ns 88.2 ns 10
std::string copy{str_with_len_N};/512_median 89.0 ns 87.2 ns 10
std::string copy{str_with_len_N};/512_stddev 3.91 ns 3.41 ns 10
std::string copy{str_with_len_N};/512_cv 4.38 % 3.86 % 10
std::string copy{str_with_len_N};/1024_mean 96.8 ns 96.3 ns 10
std::string copy{str_with_len_N};/1024_median 97.2 ns 96.3 ns 10
std::string copy{str_with_len_N};/1024_stddev 3.59 ns 2.79 ns 10
std::string copy{str_with_len_N};/1024_cv 3.71 % 2.90 % 10
std::string copy{str_with_len_N};/2048_mean 130 ns 129 ns 10
std::string copy{str_with_len_N};/2048_median 130 ns 128 ns 10
std::string copy{str_with_len_N};/2048_stddev 3.80 ns 3.49 ns 10
std::string copy{str_with_len_N};/2048_cv 2.92 % 2.70 % 10
std::string copy{str_with_len_N};/4096_mean 178 ns 174 ns 10
std::string copy{str_with_len_N};/4096_median 178 ns 176 ns 10
std::string copy{str_with_len_N};/4096_stddev 5.34 ns 4.50 ns 10
std::string copy{str_with_len_N};/4096_cv 3.01 % 2.59 % 10
stringa copy{str_with_len_N};/15_mean 1.28 ns 1.27 ns 10
stringa copy{str_with_len_N};/15_median 1.28 ns 1.28 ns 10
stringa copy{str_with_len_N};/15_stddev 0.030 ns 0.033 ns 10
stringa copy{str_with_len_N};/15_cv 2.32 % 2.57 % 10
stringa copy{str_with_len_N};/16_mean 1.28 ns 1.28 ns 10
stringa copy{str_with_len_N};/16_median 1.27 ns 1.27 ns 10
stringa copy{str_with_len_N};/16_stddev 0.037 ns 0.048 ns 10
stringa copy{str_with_len_N};/16_cv 2.87 % 3.73 % 10
stringa copy{str_with_len_N};/23_mean 1.28 ns 1.28 ns 10
stringa copy{str_with_len_N};/23_median 1.26 ns 1.26 ns 10
stringa copy{str_with_len_N};/23_stddev 0.038 ns 0.035 ns 10
stringa copy{str_with_len_N};/23_cv 3.01 % 2.74 % 10
stringa copy{str_with_len_N};/24_mean 15.8 ns 15.6 ns 10
stringa copy{str_with_len_N};/24_median 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/24_stddev 0.153 ns 0.168 ns 10
stringa copy{str_with_len_N};/24_cv 0.97 % 1.08 % 10
stringa copy{str_with_len_N};/32_mean 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/32_median 15.6 ns 15.7 ns 10
stringa copy{str_with_len_N};/32_stddev 0.217 ns 0.233 ns 10
stringa copy{str_with_len_N};/32_cv 1.38 % 1.48 % 10
stringa copy{str_with_len_N};/64_mean 15.8 ns 15.7 ns 10
stringa copy{str_with_len_N};/64_median 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/64_stddev 0.179 ns 0.233 ns 10
stringa copy{str_with_len_N};/64_cv 1.13 % 1.48 % 10
stringa copy{str_with_len_N};/128_mean 15.8 ns 15.7 ns 10
stringa copy{str_with_len_N};/128_median 15.6 ns 15.7 ns 10
stringa copy{str_with_len_N};/128_stddev 0.291 ns 0.233 ns 10
stringa copy{str_with_len_N};/128_cv 1.84 % 1.48 % 10
stringa copy{str_with_len_N};/256_mean 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/256_median 15.6 ns 15.7 ns 10
stringa copy{str_with_len_N};/256_stddev 0.194 ns 0.257 ns 10
stringa copy{str_with_len_N};/256_cv 1.23 % 1.64 % 10
stringa copy{str_with_len_N};/512_mean 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/512_median 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/512_stddev 0.185 ns 0.198 ns 10
stringa copy{str_with_len_N};/512_cv 1.17 % 1.26 % 10
stringa copy{str_with_len_N};/1024_mean 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/1024_median 15.7 ns 15.7 ns 10
stringa copy{str_with_len_N};/1024_stddev 0.207 ns 0.110 ns 10
stringa copy{str_with_len_N};/1024_cv 1.32 % 0.70 % 10
stringa copy{str_with_len_N};/2048_mean 15.9 ns 15.8 ns 10
stringa copy{str_with_len_N};/2048_median 15.8 ns 15.7 ns 10
stringa copy{str_with_len_N};/2048_stddev 0.321 ns 0.218 ns 10
stringa copy{str_with_len_N};/2048_cv 2.02 % 1.38 % 10
stringa copy{str_with_len_N};/4096_mean 15.9 ns 15.8 ns 10
stringa copy{str_with_len_N};/4096_median 15.9 ns 15.7 ns 10
stringa copy{str_with_len_N};/4096_stddev 0.198 ns 0.331 ns 10
stringa copy{str_with_len_N};/4096_cv 1.24 % 2.09 % 10
lstringa<16> copy{str_with_len_N};/15_mean 4.88 ns 4.85 ns 10
lstringa<16> copy{str_with_len_N};/15_median 4.77 ns 4.71 ns 10
lstringa<16> copy{str_with_len_N};/15_stddev 0.247 ns 0.267 ns 10
lstringa<16> copy{str_with_len_N};/15_cv 5.07 % 5.49 % 10
lstringa<16> copy{str_with_len_N};/16_mean 4.78 ns 4.76 ns 10
lstringa<16> copy{str_with_len_N};/16_median 4.74 ns 4.75 ns 10
lstringa<16> copy{str_with_len_N};/16_stddev 0.183 ns 0.181 ns 10
lstringa<16> copy{str_with_len_N};/16_cv 3.82 % 3.80 % 10
lstringa<16> copy{str_with_len_N};/23_mean 4.80 ns 4.76 ns 10
lstringa<16> copy{str_with_len_N};/23_median 4.73 ns 4.71 ns 10
lstringa<16> copy{str_with_len_N};/23_stddev 0.159 ns 0.123 ns 10
lstringa<16> copy{str_with_len_N};/23_cv 3.31 % 2.59 % 10
lstringa<16> copy{str_with_len_N};/24_mean 76.9 ns 76.4 ns 10
lstringa<16> copy{str_with_len_N};/24_median 75.5 ns 75.0 ns 10
lstringa<16> copy{str_with_len_N};/24_stddev 2.76 ns 1.98 ns 10
lstringa<16> copy{str_with_len_N};/24_cv 3.59 % 2.59 % 10
lstringa<16> copy{str_with_len_N};/32_mean 80.5 ns 79.7 ns 10
lstringa<16> copy{str_with_len_N};/32_median 80.5 ns 79.3 ns 10
lstringa<16> copy{str_with_len_N};/32_stddev 4.29 ns 3.49 ns 10
lstringa<16> copy{str_with_len_N};/32_cv 5.33 % 4.38 % 10
lstringa<16> copy{str_with_len_N};/64_mean 81.7 ns 80.6 ns 10
lstringa<16> copy{str_with_len_N};/64_median 81.0 ns 81.1 ns 10
lstringa<16> copy{str_with_len_N};/64_stddev 3.42 ns 3.37 ns 10
lstringa<16> copy{str_with_len_N};/64_cv 4.18 % 4.18 % 10
lstringa<16> copy{str_with_len_N};/128_mean 81.6 ns 81.0 ns 10
lstringa<16> copy{str_with_len_N};/128_median 81.4 ns 81.6 ns 10
lstringa<16> copy{str_with_len_N};/128_stddev 3.00 ns 3.42 ns 10
lstringa<16> copy{str_with_len_N};/128_cv 3.68 % 4.23 % 10
lstringa<16> copy{str_with_len_N};/256_mean 83.0 ns 82.4 ns 10
lstringa<16> copy{str_with_len_N};/256_median 82.3 ns 81.6 ns 10
lstringa<16> copy{str_with_len_N};/256_stddev 3.27 ns 3.85 ns 10
lstringa<16> copy{str_with_len_N};/256_cv 3.94 % 4.66 % 10
lstringa<16> copy{str_with_len_N};/512_mean 87.0 ns 87.0 ns 10
lstringa<16> copy{str_with_len_N};/512_median 85.9 ns 85.4 ns 10
lstringa<16> copy{str_with_len_N};/512_stddev 3.56 ns 3.72 ns 10
lstringa<16> copy{str_with_len_N};/512_cv 4.09 % 4.27 % 10
lstringa<16> copy{str_with_len_N};/1024_mean 96.8 ns 95.8 ns 10
lstringa<16> copy{str_with_len_N};/1024_median 95.4 ns 94.2 ns 10
lstringa<16> copy{str_with_len_N};/1024_stddev 4.63 ns 4.61 ns 10
lstringa<16> copy{str_with_len_N};/1024_cv 4.78 % 4.81 % 10
lstringa<16> copy{str_with_len_N};/2048_mean 133 ns 132 ns 10
lstringa<16> copy{str_with_len_N};/2048_median 132 ns 130 ns 10
lstringa<16> copy{str_with_len_N};/2048_stddev 11.8 ns 10.4 ns 10
lstringa<16> copy{str_with_len_N};/2048_cv 8.86 % 7.88 % 10
lstringa<16> copy{str_with_len_N};/4096_mean 195 ns 193 ns 10
lstringa<16> copy{str_with_len_N};/4096_median 196 ns 193 ns 10
lstringa<16> copy{str_with_len_N};/4096_stddev 8.89 ns 9.82 ns 10
lstringa<16> copy{str_with_len_N};/4096_cv 4.57 % 5.08 % 10
lstringa<512> copy{str_with_len_N};/15_mean 5.12 ns 5.11 ns 10
lstringa<512> copy{str_with_len_N};/15_median 5.09 ns 5.00 ns 10
lstringa<512> copy{str_with_len_N};/15_stddev 0.139 ns 0.166 ns 10
lstringa<512> copy{str_with_len_N};/15_cv 2.72 % 3.24 % 10
lstringa<512> copy{str_with_len_N};/16_mean 5.09 ns 5.06 ns 10
lstringa<512> copy{str_with_len_N};/16_median 5.05 ns 5.00 ns 10
lstringa<512> copy{str_with_len_N};/16_stddev 0.123 ns 0.109 ns 10
lstringa<512> copy{str_with_len_N};/16_cv 2.42 % 2.16 % 10
lstringa<512> copy{str_with_len_N};/23_mean 5.25 ns 5.12 ns 10
lstringa<512> copy{str_with_len_N};/23_median 5.12 ns 5.08 ns 10
lstringa<512> copy{str_with_len_N};/23_stddev 0.292 ns 0.127 ns 10
lstringa<512> copy{str_with_len_N};/23_cv 5.57 % 2.48 % 10
lstringa<512> copy{str_with_len_N};/24_mean 5.15 ns 5.12 ns 10
lstringa<512> copy{str_with_len_N};/24_median 5.09 ns 5.09 ns 10
lstringa<512> copy{str_with_len_N};/24_stddev 0.157 ns 0.162 ns 10
lstringa<512> copy{str_with_len_N};/24_cv 3.05 % 3.16 % 10
lstringa<512> copy{str_with_len_N};/32_mean 7.92 ns 7.87 ns 10
lstringa<512> copy{str_with_len_N};/32_median 7.92 ns 7.95 ns 10
lstringa<512> copy{str_with_len_N};/32_stddev 0.109 ns 0.176 ns 10
lstringa<512> copy{str_with_len_N};/32_cv 1.37 % 2.24 % 10
lstringa<512> copy{str_with_len_N};/64_mean 7.99 ns 7.93 ns 10
lstringa<512> copy{str_with_len_N};/64_median 7.92 ns 7.93 ns 10
lstringa<512> copy{str_with_len_N};/64_stddev 0.222 ns 0.206 ns 10
lstringa<512> copy{str_with_len_N};/64_cv 2.77 % 2.59 % 10
lstringa<512> copy{str_with_len_N};/128_mean 8.43 ns 8.32 ns 10
lstringa<512> copy{str_with_len_N};/128_median 8.35 ns 8.28 ns 10
lstringa<512> copy{str_with_len_N};/128_stddev 0.256 ns 0.233 ns 10
lstringa<512> copy{str_with_len_N};/128_cv 3.03 % 2.80 % 10
lstringa<512> copy{str_with_len_N};/256_mean 9.40 ns 9.37 ns 10
lstringa<512> copy{str_with_len_N};/256_median 9.36 ns 9.42 ns 10
lstringa<512> copy{str_with_len_N};/256_stddev 0.193 ns 0.276 ns 10
lstringa<512> copy{str_with_len_N};/256_cv 2.05 % 2.94 % 10
lstringa<512> copy{str_with_len_N};/512_mean 12.3 ns 12.3 ns 10
lstringa<512> copy{str_with_len_N};/512_median 12.1 ns 12.0 ns 10
lstringa<512> copy{str_with_len_N};/512_stddev 1.24 ns 1.32 ns 10
lstringa<512> copy{str_with_len_N};/512_cv 10.08 % 10.73 % 10
lstringa<512> copy{str_with_len_N};/1024_mean 94.1 ns 94.0 ns 10
lstringa<512> copy{str_with_len_N};/1024_median 94.1 ns 94.2 ns 10
lstringa<512> copy{str_with_len_N};/1024_stddev 2.92 ns 3.48 ns 10
lstringa<512> copy{str_with_len_N};/1024_cv 3.11 % 3.70 % 10
lstringa<512> copy{str_with_len_N};/2048_mean 128 ns 127 ns 10
lstringa<512> copy{str_with_len_N};/2048_median 127 ns 126 ns 10
lstringa<512> copy{str_with_len_N};/2048_stddev 5.72 ns 5.14 ns 10
lstringa<512> copy{str_with_len_N};/2048_cv 4.46 % 4.05 % 10
lstringa<512> copy{str_with_len_N};/4096_mean 181 ns 180 ns 10
lstringa<512> copy{str_with_len_N};/4096_median 180 ns 180 ns 10
lstringa<512> copy{str_with_len_N};/4096_stddev 4.69 ns 3.66 ns 10
lstringa<512> copy{str_with_len_N};/4096_cv 2.60 % 2.04 % 10
----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 30.8 ns 30.7 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 30.6 ns 30.8 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.714 ns 0.877 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.32 % 2.86 % 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 13.5 ns 13.4 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 13.3 ns 13.3 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.465 ns 0.535 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 3.44 % 3.99 % 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 14.1 ns 14.1 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 14.1 ns 14.0 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.277 ns 0.328 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.96 % 2.32 % 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 13.5 ns 13.4 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 13.3 ns 13.2 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.612 ns 0.607 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 4.54 % 4.51 % 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 13.6 ns 13.6 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 13.3 ns 13.4 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.588 ns 0.706 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 4.32 % 5.19 % 10
----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 33.5 ns 33.2 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 33.0 ns 33.0 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.985 ns 1.04 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.94 % 3.13 % 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 8.14 ns 8.06 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 8.04 ns 8.02 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.214 ns 0.160 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 2.62 % 1.99 % 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 13.9 ns 13.8 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 13.8 ns 13.8 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.259 ns 0.362 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.86 % 2.62 % 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 12.6 ns 12.5 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 12.6 ns 12.6 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.114 ns 0.256 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 0.90 % 2.05 % 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 11.8 ns 11.7 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 11.8 ns 11.6 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.147 ns 0.152 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.25 % 1.30 % 10
----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 43.6 ns 43.1 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 43.2 ns 42.8 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.36 ns 1.39 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 3.13 % 3.22 % 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 18.2 ns 18.1 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 18.3 ns 18.0 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.318 ns 0.432 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 1.74 % 2.39 % 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 16.2 ns 16.0 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 16.1 ns 15.9 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.478 ns 0.403 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 2.96 % 2.51 % 10
----- 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 98.3 ns 96.9 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 96.7 ns 97.7 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 4.06 ns 2.32 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 4.13 % 2.39 % 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 59.2 ns 58.6 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 58.5 ns 57.8 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 2.00 ns 1.69 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 3.38 % 2.88 % 10
ssa s = "1234.567e10"; double res = *s.to_double()_mean 35.1 ns 34.9 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_median 34.6 ns 34.4 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 1.29 ns 0.980 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_cv 3.69 % 2.80 % 10
-- 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 4661 ns 4604 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_median 4646 ns 4604 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 86.0 ns 69.8 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 1.85 % 1.52 % 10
std::string str; ... str += "abbaabbaabbaabba";_mean 1070 ns 1062 ns 10
std::string str; ... str += "abbaabbaabbaabba";_median 1061 ns 1050 ns 10
std::string str; ... str += "abbaabbaabbaabba";_stddev 25.8 ns 20.7 ns 10
std::string str; ... str += "abbaabbaabbaabba";_cv 2.41 % 1.95 % 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 736 ns 727 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 739 ns 725 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 20.0 ns 13.9 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 2.72 % 1.91 % 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 396 ns 392 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 394 ns 392 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 11.0 ns 7.12 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 2.77 % 1.81 % 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 234 ns 233 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 233 ns 233 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 4.95 ns 4.45 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 2.11 % 1.91 % 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 155 ns 153 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 154 ns 153 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 2.64 ns 2.75 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.71 % 1.80 % 10
-- 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 4793 ns 4734 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 4773 ns 4703 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 281 ns 277 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 5.87 % 5.86 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 3861 ns 3819 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 3863 ns 3749 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 133 ns 135 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 3.44 % 3.54 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 726 ns 713 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 720 ns 711 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 42.3 ns 18.0 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.83 % 2.52 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 440 ns 436 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 436 ns 439 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 12.2 ns 8.24 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.77 % 1.89 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 287 ns 285 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 284 ns 283 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 6.55 ns 4.39 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.28 % 1.54 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 183 ns 181 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 181 ns 180 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 3.10 ns 4.43 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.70 % 2.45 % 10
-- 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 221750 ns 219004 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 218930 ns 215377 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 12107 ns 12101 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 5.46 % 5.53 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 194313 ns 192252 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 189899 ns 190438 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 8351 ns 8865 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.30 % 4.61 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17965 ns 17878 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17710 ns 17648 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 662 ns 682 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.69 % 3.81 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17021 ns 16919 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16966 ns 16881 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 348 ns 494 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.05 % 2.92 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16893 ns 16766 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16799 ns 16881 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 703 ns 573 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.16 % 3.42 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16257 ns 16183 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16080 ns 16044 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 357 ns 441 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.20 % 2.73 % 10
-- 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 4399 ns 4336 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_median 4368 ns 4297 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_stddev 109 ns 105 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_cv 2.49 % 2.42 % 10
std::string str; ... str += str_var1 + str_var2;_mean 3920 ns 3884 ns 10
std::string str; ... str += str_var1 + str_var2;_median 3858 ns 3850 ns 10
std::string str; ... str += str_var1 + str_var2;_stddev 188 ns 138 ns 10
std::string str; ... str += str_var1 + str_var2;_cv 4.80 % 3.55 % 10
lstringa<16> str; ... str += str_var1 + str_var2;_mean 817 ns 807 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_median 803 ns 802 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 38.0 ns 35.9 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_cv 4.65 % 4.44 % 10
lstringa<128> str; ... str += str_var1 + str_var2;_mean 545 ns 542 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_median 545 ns 539 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 13.7 ns 12.9 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_cv 2.52 % 2.37 % 10
lstringa<512> str; ... str += str_var1 + str_var2;_mean 381 ns 375 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_median 383 ns 369 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 12.9 ns 13.1 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_cv 3.39 % 3.50 % 10
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 284 ns 277 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_median 284 ns 276 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 5.92 ns 7.52 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 2.09 % 2.71 % 10
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 11067 ns 10889 ns 10
std::stringstream str; str << "test = " << k << " times";_median 11053 ns 10986 ns 10
std::stringstream str; str << "test = " << k << " times";_stddev 367 ns 349 ns 10
std::stringstream str; str << "test = " << k << " times";_cv 3.32 % 3.21 % 10
std::string str = "test = " + std::to_string(k) + " times";_mean 1078 ns 1067 ns 10
std::string str = "test = " + std::to_string(k) + " times";_median 1072 ns 1046 ns 10
std::string str = "test = " + std::to_string(k) + " times";_stddev 32.9 ns 38.2 ns 10
std::string str = "test = " + std::to_string(k) + " times";_cv 3.05 % 3.58 % 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2776 ns 2745 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2756 ns 2727 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 72.0 ns 48.8 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.59 % 1.78 % 10
std::string str = std::format("test = {} times", k);_mean 2001 ns 1992 ns 10
std::string str = std::format("test = {} times", k);_median 2000 ns 2009 ns 10
std::string str = std::format("test = {} times", k);_stddev 86.8 ns 74.3 ns 10
std::string str = std::format("test = {} times", k);_cv 4.34 % 3.73 % 10
lstringa<8> str; str.format("test = {} times", k);_mean 2076 ns 2054 ns 10
lstringa<8> str; str.format("test = {} times", k);_median 2036 ns 2040 ns 10
lstringa<8> str; str.format("test = {} times", k);_stddev 84.9 ns 56.8 ns 10
lstringa<8> str; str.format("test = {} times", k);_cv 4.09 % 2.76 % 10
lstringa<32> str; str.format("test = {} times", k);_mean 1004 ns 1000 ns 10
lstringa<32> str; str.format("test = {} times", k);_median 990 ns 984 ns 10
lstringa<32> str; str.format("test = {} times", k);_stddev 29.4 ns 32.4 ns 10
lstringa<32> str; str.format("test = {} times", k);_cv 2.93 % 3.24 % 10
lstringa<8> str = "test = " + k + " times";_mean 778 ns 774 ns 10
lstringa<8> str = "test = " + k + " times";_median 775 ns 767 ns 10
lstringa<8> str = "test = " + k + " times";_stddev 14.5 ns 22.1 ns 10
lstringa<8> str = "test = " + k + " times";_cv 1.86 % 2.85 % 10
lstringa<32> str = "test = " + k + " times";_mean 154 ns 153 ns 10
lstringa<32> str = "test = " + k + " times";_median 152 ns 153 ns 10
lstringa<32> str = "test = " + k + " times";_stddev 6.33 ns 6.37 ns 10
lstringa<32> str = "test = " + k + " times";_cv 4.10 % 4.15 % 10
stringa str = "test = " + k + " times";_mean 152 ns 150 ns 10
stringa str = "test = " + k + " times";_median 151 ns 149 ns 10
stringa str = "test = " + k + " times";_stddev 2.90 ns 3.45 ns 10
stringa str = "test = " + k + " times";_cv 1.90 % 2.30 % 10
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 546 ns 533 ns 10
std::string::find + substr + std::strtol_median 549 ns 530 ns 10
std::string::find + substr + std::strtol_stddev 14.3 ns 11.0 ns 10
std::string::find + substr + std::strtol_cv 2.61 % 2.06 % 10
ssa::splitter + ssa::as_int_mean 170 ns 169 ns 10
ssa::splitter + ssa::as_int_median 168 ns 169 ns 10
ssa::splitter + ssa::as_int_stddev 5.45 ns 4.43 ns 10
ssa::splitter + ssa::as_int_cv 3.21 % 2.62 % 10
ssa::splitf + functor_mean 188 ns 186 ns 10
ssa::splitf + functor_median 187 ns 186 ns 10
ssa::splitf + functor_stddev 6.56 ns 6.41 ns 10
ssa::splitf + functor_cv 3.49 % 3.45 % 10
-- 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 1153 ns 1138 ns 10
Naive (and wrong) replace symbols with std::string find + replace_median 1128 ns 1116 ns 10
Naive (and wrong) replace symbols with std::string find + replace_stddev 64.4 ns 41.2 ns 10
Naive (and wrong) replace symbols with std::string find + replace_cv 5.58 % 3.62 % 10
replace symbols with std::string find_first_of + replace_mean 2047 ns 2031 ns 10
replace symbols with std::string find_first_of + replace_median 2017 ns 2018 ns 10
replace symbols with std::string find_first_of + replace_stddev 98.2 ns 99.8 ns 10
replace symbols with std::string find_first_of + replace_cv 4.80 % 4.91 % 10
replace symbols with std::string_view find_first_of + copy_mean 2300 ns 2280 ns 10
replace symbols with std::string_view find_first_of + copy_median 2286 ns 2295 ns 10
replace symbols with std::string_view find_first_of + copy_stddev 58.4 ns 61.1 ns 10
replace symbols with std::string_view find_first_of + copy_cv 2.54 % 2.68 % 10
replace runtime symbols with string expressions and without remembering all search results_mean 1434 ns 1413 ns 10
replace runtime symbols with string expressions and without remembering all search results_median 1428 ns 1397 ns 10
replace runtime symbols with string expressions and without remembering all search results_stddev 48.8 ns 49.1 ns 10
replace runtime symbols with string expressions and without remembering all search results_cv 3.40 % 3.47 % 10
replace runtime symbols with simstr and memorization of all search results_mean 1349 ns 1334 ns 10
replace runtime symbols with simstr and memorization of all search results_median 1339 ns 1350 ns 10
replace runtime symbols with simstr and memorization of all search results_stddev 32.5 ns 39.8 ns 10
replace runtime symbols with simstr and memorization of all search results_cv 2.41 % 2.99 % 10
replace const symbols with string expressions and without remembering all search results_mean 1146 ns 1135 ns 10
replace const symbols with string expressions and without remembering all search results_median 1137 ns 1147 ns 10
replace const symbols with string expressions and without remembering all search results_stddev 29.7 ns 31.0 ns 10
replace const symbols with string expressions and without remembering all search results_cv 2.59 % 2.73 % 10
replace const symbols with string expressions and memorization of all search results_mean 1213 ns 1197 ns 10
replace const symbols with string expressions and memorization of all search results_median 1200 ns 1186 ns 10
replace const symbols with string expressions and memorization of all search results_stddev 35.7 ns 30.7 ns 10
replace const symbols with string expressions and memorization of all search results_cv 2.94 % 2.57 % 10
-- Replace symbols in text ~40 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000
Short Naive (and wrong) replace symbols with std::string find + replace_mean 314 ns 312 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_median 315 ns 311 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 7.64 ns 9.08 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.43 % 2.91 % 10
Short replace symbols with std::string find_first_of + replace_mean 369 ns 367 ns 10
Short replace symbols with std::string find_first_of + replace_median 363 ns 360 ns 10
Short replace symbols with std::string find_first_of + replace_stddev 14.2 ns 16.9 ns 10
Short replace symbols with std::string find_first_of + replace_cv 3.83 % 4.61 % 10
Short replace symbols with std::string_view find_first_of + copy_mean 322 ns 321 ns 10
Short replace symbols with std::string_view find_first_of + copy_median 321 ns 321 ns 10
Short replace symbols with std::string_view find_first_of + copy_stddev 9.99 ns 9.98 ns 10
Short replace symbols with std::string_view find_first_of + copy_cv 3.10 % 3.11 % 10
Short replace runtime symbols with string expressions and without remembering all search results_mean 258 ns 257 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_median 259 ns 259 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_stddev 4.29 ns 6.43 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_cv 1.66 % 2.50 % 10
Short replace runtime symbols with simstr and memorization of all search results_mean 344 ns 343 ns 10
Short replace runtime symbols with simstr and memorization of all search results_median 340 ns 339 ns 10
Short replace runtime symbols with simstr and memorization of all search results_stddev 11.9 ns 12.5 ns 10
Short replace runtime symbols with simstr and memorization of all search results_cv 3.46 % 3.64 % 10
Short replace const symbols with string expressions and without remembering all search results_mean 213 ns 213 ns 10
Short replace const symbols with string expressions and without remembering all search results_median 214 ns 213 ns 10
Short replace const symbols with string expressions and without remembering all search results_stddev 4.05 ns 4.51 ns 10
Short replace const symbols with string expressions and without remembering all search results_cv 1.90 % 2.12 % 10
Short replace const symbols with string expressions and memorization of all search results_mean 303 ns 301 ns 10
Short replace const symbols with string expressions and memorization of all search results_median 300 ns 298 ns 10
Short replace const symbols with string expressions and memorization of all search results_stddev 8.35 ns 9.57 ns 10
Short replace const symbols with string expressions and memorization of all search results_cv 2.75 % 3.18 % 10
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 227 ns 223 ns 10
replace bb to ---- in std::string|64_median 226 ns 222 ns 10
replace bb to ---- in std::string|64_stddev 6.99 ns 4.02 ns 10
replace bb to ---- in std::string|64_cv 3.08 % 1.80 % 10
replace bb to ---- in std::string|256_mean 765 ns 760 ns 10
replace bb to ---- in std::string|256_median 766 ns 753 ns 10
replace bb to ---- in std::string|256_stddev 21.8 ns 20.0 ns 10
replace bb to ---- in std::string|256_cv 2.85 % 2.63 % 10
replace bb to ---- in std::string|512_mean 1465 ns 1456 ns 10
replace bb to ---- in std::string|512_median 1468 ns 1451 ns 10
replace bb to ---- in std::string|512_stddev 71.6 ns 73.0 ns 10
replace bb to ---- in std::string|512_cv 4.89 % 5.01 % 10
replace bb to ---- in std::string|1024_mean 3193 ns 3121 ns 10
replace bb to ---- in std::string|1024_median 3207 ns 3181 ns 10
replace bb to ---- in std::string|1024_stddev 145 ns 115 ns 10
replace bb to ---- in std::string|1024_cv 4.53 % 3.67 % 10
replace bb to ---- in std::string|2048_mean 7883 ns 7778 ns 10
replace bb to ---- in std::string|2048_median 7810 ns 7673 ns 10
replace bb to ---- in std::string|2048_stddev 224 ns 205 ns 10
replace bb to ---- in std::string|2048_cv 2.84 % 2.63 % 10
replace bb to ---- in lstringa<8>|64_mean 320 ns 314 ns 10
replace bb to ---- in lstringa<8>|64_median 320 ns 315 ns 10
replace bb to ---- in lstringa<8>|64_stddev 16.3 ns 11.2 ns 10
replace bb to ---- in lstringa<8>|64_cv 5.11 % 3.55 % 10
replace bb to ---- in lstringa<8>|256_mean 629 ns 621 ns 10
replace bb to ---- in lstringa<8>|256_median 621 ns 614 ns 10
replace bb to ---- in lstringa<8>|256_stddev 18.4 ns 13.6 ns 10
replace bb to ---- in lstringa<8>|256_cv 2.92 % 2.18 % 10
replace bb to ---- in lstringa<8>|512_mean 1065 ns 1057 ns 10
replace bb to ---- in lstringa<8>|512_median 1056 ns 1050 ns 10
replace bb to ---- in lstringa<8>|512_stddev 31.2 ns 30.6 ns 10
replace bb to ---- in lstringa<8>|512_cv 2.93 % 2.89 % 10
replace bb to ---- in lstringa<8>|1024_mean 1907 ns 1879 ns 10
replace bb to ---- in lstringa<8>|1024_median 1880 ns 1883 ns 10
replace bb to ---- in lstringa<8>|1024_stddev 61.4 ns 50.1 ns 10
replace bb to ---- in lstringa<8>|1024_cv 3.22 % 2.67 % 10
replace bb to ---- in lstringa<8>|2048_mean 3579 ns 3522 ns 10
replace bb to ---- in lstringa<8>|2048_median 3524 ns 3530 ns 10
replace bb to ---- in lstringa<8>|2048_stddev 95.4 ns 43.6 ns 10
replace bb to ---- in lstringa<8>|2048_cv 2.67 % 1.24 % 10
replace bb to ---- by init stringa|64_mean 172 ns 168 ns 10
replace bb to ---- by init stringa|64_median 171 ns 164 ns 10
replace bb to ---- by init stringa|64_stddev 9.74 ns 8.35 ns 10
replace bb to ---- by init stringa|64_cv 5.68 % 4.97 % 10
replace bb to ---- by init stringa|256_mean 377 ns 375 ns 10
replace bb to ---- by init stringa|256_median 374 ns 372 ns 10
replace bb to ---- by init stringa|256_stddev 8.32 ns 8.65 ns 10
replace bb to ---- by init stringa|256_cv 2.21 % 2.31 % 10
replace bb to ---- by init stringa|512_mean 813 ns 802 ns 10
replace bb to ---- by init stringa|512_median 808 ns 802 ns 10
replace bb to ---- by init stringa|512_stddev 20.4 ns 18.4 ns 10
replace bb to ---- by init stringa|512_cv 2.51 % 2.29 % 10
replace bb to ---- by init stringa|1024_mean 1637 ns 1625 ns 10
replace bb to ---- by init stringa|1024_median 1614 ns 1604 ns 10
replace bb to ---- by init stringa|1024_stddev 49.5 ns 52.5 ns 10
replace bb to ---- by init stringa|1024_cv 3.02 % 3.23 % 10
replace bb to ---- by init stringa|2048_mean 3090 ns 3062 ns 10
replace bb to ---- by init stringa|2048_median 3057 ns 3048 ns 10
replace bb to ---- by init stringa|2048_stddev 93.5 ns 68.4 ns 10
replace bb to ---- by init stringa|2048_cv 3.03 % 2.24 % 10
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 190 ns 190 ns 10
replace bb to -- in std::string|64_median 190 ns 190 ns 10
replace bb to -- in std::string|64_stddev 5.77 ns 7.18 ns 10
replace bb to -- in std::string|64_cv 3.03 % 3.77 % 10
replace bb to -- in std::string|256_mean 468 ns 466 ns 10
replace bb to -- in std::string|256_median 465 ns 460 ns 10
replace bb to -- in std::string|256_stddev 8.61 ns 10.2 ns 10
replace bb to -- in std::string|256_cv 1.84 % 2.18 % 10
replace bb to -- in std::string|512_mean 842 ns 833 ns 10
replace bb to -- in std::string|512_median 835 ns 837 ns 10
replace bb to -- in std::string|512_stddev 23.2 ns 19.2 ns 10
replace bb to -- in std::string|512_cv 2.76 % 2.31 % 10
replace bb to -- in std::string|1024_mean 1614 ns 1597 ns 10
replace bb to -- in std::string|1024_median 1579 ns 1569 ns 10
replace bb to -- in std::string|1024_stddev 65.9 ns 61.1 ns 10
replace bb to -- in std::string|1024_cv 4.09 % 3.82 % 10
replace bb to -- in std::string|2048_mean 3157 ns 3134 ns 10
replace bb to -- in std::string|2048_median 3144 ns 3115 ns 10
replace bb to -- in std::string|2048_stddev 79.0 ns 44.7 ns 10
replace bb to -- in std::string|2048_cv 2.50 % 1.43 % 10
replace bb to -- in lstringa<8>|64_mean 185 ns 184 ns 10
replace bb to -- in lstringa<8>|64_median 184 ns 181 ns 10
replace bb to -- in lstringa<8>|64_stddev 4.07 ns 6.14 ns 10
replace bb to -- in lstringa<8>|64_cv 2.20 % 3.34 % 10
replace bb to -- in lstringa<8>|256_mean 435 ns 429 ns 10
replace bb to -- in lstringa<8>|256_median 431 ns 424 ns 10
replace bb to -- in lstringa<8>|256_stddev 21.1 ns 20.0 ns 10
replace bb to -- in lstringa<8>|256_cv 4.84 % 4.65 % 10
replace bb to -- in lstringa<8>|512_mean 763 ns 753 ns 10
replace bb to -- in lstringa<8>|512_median 760 ns 753 ns 10
replace bb to -- in lstringa<8>|512_stddev 15.0 ns 13.2 ns 10
replace bb to -- in lstringa<8>|512_cv 1.96 % 1.75 % 10
replace bb to -- in lstringa<8>|1024_mean 1404 ns 1394 ns 10
replace bb to -- in lstringa<8>|1024_median 1395 ns 1397 ns 10
replace bb to -- in lstringa<8>|1024_stddev 42.3 ns 39.7 ns 10
replace bb to -- in lstringa<8>|1024_cv 3.01 % 2.85 % 10
replace bb to -- in lstringa<8>|2048_mean 2741 ns 2716 ns 10
replace bb to -- in lstringa<8>|2048_median 2744 ns 2727 ns 10
replace bb to -- in lstringa<8>|2048_stddev 76.5 ns 67.3 ns 10
replace bb to -- in lstringa<8>|2048_cv 2.79 % 2.48 % 10
replace bb to -- by init stringa|64_mean 162 ns 161 ns 10
replace bb to -- by init stringa|64_median 164 ns 162 ns 10
replace bb to -- by init stringa|64_stddev 4.13 ns 4.20 ns 10
replace bb to -- by init stringa|64_cv 2.55 % 2.61 % 10
replace bb to -- by init stringa|256_mean 357 ns 353 ns 10
replace bb to -- by init stringa|256_median 358 ns 353 ns 10
replace bb to -- by init stringa|256_stddev 11.8 ns 10.7 ns 10
replace bb to -- by init stringa|256_cv 3.30 % 3.03 % 10
replace bb to -- by init stringa|512_mean 580 ns 564 ns 10
replace bb to -- by init stringa|512_median 577 ns 558 ns 10
replace bb to -- by init stringa|512_stddev 23.9 ns 11.8 ns 10
replace bb to -- by init stringa|512_cv 4.13 % 2.09 % 10
replace bb to -- by init stringa|1024_mean 1091 ns 1077 ns 10
replace bb to -- by init stringa|1024_median 1091 ns 1086 ns 10
replace bb to -- by init stringa|1024_stddev 48.5 ns 38.9 ns 10
replace bb to -- by init stringa|1024_cv 4.45 % 3.62 % 10
replace bb to -- by init stringa|2048_mean 1998 ns 1972 ns 10
replace bb to -- by init stringa|2048_median 2010 ns 1972 ns 10
replace bb to -- by init stringa|2048_stddev 51.7 ns 49.0 ns 10
replace bb to -- by init stringa|2048_cv 2.59 % 2.48 % 10
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3693883 ns 3674930 ns 10
hashStrMapA<size_t> emplace & find stringa;_median 3687852 ns 3666201 ns 10
hashStrMapA<size_t> emplace & find stringa;_stddev 226433 ns 207589 ns 10
hashStrMapA<size_t> emplace & find stringa;_cv 6.13 % 5.65 % 10
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 5258881 ns 5231585 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_median 5227104 ns 5161830 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 147989 ns 135578 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 2.81 % 2.59 % 10
hashStrMapA<size_t> emplace & find ssa;_mean 3418166 ns 3416054 ns 10
hashStrMapA<size_t> emplace & find ssa;_median 3409800 ns 3408395 ns 10
hashStrMapA<size_t> emplace & find ssa;_stddev 67498 ns 73996 ns 10
hashStrMapA<size_t> emplace & find ssa;_cv 1.97 % 2.17 % 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 6295014 ns 6277902 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 6199714 ns 6138393 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 245175 ns 263061 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 3.89 % 4.19 % 10
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 1533 ns 1522 ns 10
Build func full name std::string;_median 1513 ns 1491 ns 10
Build func full name std::string;_stddev 58.1 ns 59.6 ns 10
Build func full name std::string;_cv 3.79 % 3.92 % 10
Build func full name std::string 1;_mean 1602 ns 1588 ns 10
Build func full name std::string 1;_median 1581 ns 1573 ns 10
Build func full name std::string 1;_stddev 71.7 ns 70.5 ns 10
Build func full name std::string 1;_cv 4.48 % 4.44 % 10
Build func full name std::stream;_mean 8228 ns 8161 ns 10
Build func full name std::stream;_median 8257 ns 8109 ns 10
Build func full name std::stream;_stddev 326 ns 305 ns 10
Build func full name std::stream;_cv 3.96 % 3.74 % 10
Build func full name stringa;_mean 818 ns 815 ns 10
Build func full name stringa;_median 817 ns 816 ns 10
Build func full name stringa;_stddev 22.1 ns 24.8 ns 10
Build func full name stringa;_cv 2.70 % 3.04 % 10
Build func full name stringa 1;_mean 959 ns 952 ns 10
Build func full name stringa 1;_median 936 ns 940 ns 10
Build func full name stringa 1;_stddev 50.6 ns 43.1 ns 10
Build func full name stringa 1;_cv 5.27 % 4.52 % 10

View File

@ -0,0 +1,987 @@
Benchmarks of simstr, version 1.8.1
Sources: https://github.com/orefkov/simstr
Results: https://orefkov.github.io/simstr/results.html
Compiler Clang 22.1.0
2026-03-22T14:13:24+03:00
Running benchStr.exe
Run on (32 X 2494 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)
--------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------
----- Concatenate email ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat email std::format_mean 201 ns 198 ns 4
Concat email std::format_median 202 ns 197 ns 4
Concat email std::format_stddev 3.07 ns 4.34 ns 4
Concat email std::format_cv 1.52 % 2.19 % 4
Concat email std::stringstream_mean 830 ns 827 ns 4
Concat email std::stringstream_median 834 ns 827 ns 4
Concat email std::stringstream_stddev 18.5 ns 12.1 ns 4
Concat email std::stringstream_cv 2.23 % 1.46 % 4
Concat email stringzilla append_mean 273 ns 271 ns 4
Concat email stringzilla append_median 274 ns 273 ns 4
Concat email stringzilla append_stddev 3.38 ns 2.96 ns 4
Concat email stringzilla append_cv 1.24 % 1.09 % 4
Concat email stringzilla concat_mean 126 ns 127 ns 4
Concat email stringzilla concat_median 127 ns 127 ns 4
Concat email stringzilla concat_stddev 1.88 ns 1.61 ns 4
Concat email stringzilla concat_cv 1.48 % 1.27 % 4
Concat email std::string append_mean 187 ns 185 ns 4
Concat email std::string append_median 187 ns 184 ns 4
Concat email std::string append_stddev 2.11 ns 2.09 ns 4
Concat email std::string append_cv 1.13 % 1.13 % 4
Concat email std::string by strexpr_mean 104 ns 104 ns 4
Concat email std::string by strexpr_median 103 ns 104 ns 4
Concat email std::string by strexpr_stddev 1.83 ns 2.00 ns 4
Concat email std::string by strexpr_cv 1.76 % 1.92 % 4
Concat email stringa_mean 94.4 ns 94.2 ns 4
Concat email stringa_median 94.9 ns 94.2 ns 4
Concat email stringa_stddev 2.21 ns 1.71 ns 4
Concat email stringa_cv 2.34 % 1.81 % 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 268 ns 268 ns 4
Concat std::string and number by std to std::string_median 267 ns 267 ns 4
Concat std::string and number by std to std::string_stddev 7.57 ns 10.7 ns 4
Concat std::string and number by std to std::string_cv 2.83 % 3.99 % 4
Concat std::string and number by StrExpr to std::string_mean 160 ns 160 ns 4
Concat std::string and number by StrExpr to std::string_median 160 ns 160 ns 4
Concat std::string and number by StrExpr to std::string_stddev 4.44 ns 4.39 ns 4
Concat std::string and number by StrExpr to std::string_cv 2.78 % 2.75 % 4
Concat stringa and number by StrExpr to simstr::stringa_mean 68.7 ns 68.4 ns 4
Concat stringa and number by StrExpr to simstr::stringa_median 68.4 ns 68.4 ns 4
Concat stringa and number by StrExpr to simstr::stringa_stddev 1.17 ns 0.000 ns 4
Concat stringa and number by StrExpr to simstr::stringa_cv 1.70 % 0.00 % 4
Concat stringa and number by e_concat to simstr::stringa_mean 74.2 ns 74.3 ns 4
Concat stringa and number by e_concat to simstr::stringa_median 74.1 ns 73.9 ns 4
Concat stringa and number by e_concat to simstr::stringa_stddev 0.363 ns 0.698 ns 4
Concat stringa and number by e_concat to simstr::stringa_cv 0.49 % 0.94 % 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 725 ns 722 ns 4
Concat std::string and format hex number and literal to std::string_median 727 ns 725 ns 4
Concat std::string and format hex number and literal to std::string_stddev 8.98 ns 6.98 ns 4
Concat std::string and format hex number and literal to std::string_cv 1.24 % 0.97 % 4
std::format std::string and hex number by literal to std::string_mean 1525 ns 1508 ns 4
std::format std::string and hex number by literal to std::string_median 1525 ns 1517 ns 4
std::format std::string and hex number by literal to std::string_stddev 29.4 ns 33.4 ns 4
std::format std::string and hex number by literal to std::string_cv 1.93 % 2.21 % 4
Concat std::string and std::to_chars and string to std::string_mean 188 ns 186 ns 4
Concat std::string and std::to_chars and string to std::string_median 189 ns 186 ns 4
Concat std::string and std::to_chars and string to std::string_stddev 3.60 ns 2.42 ns 4
Concat std::string and std::to_chars and string to std::string_cv 1.91 % 1.30 % 4
Concat std::string and hex number and literal by StrExpr to std::string_mean 84.6 ns 84.1 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_median 85.1 ns 84.6 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_stddev 1.31 ns 1.67 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_cv 1.55 % 1.98 % 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 71.4 ns 71.1 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 71.3 ns 70.6 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 1.52 ns 1.67 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 2.12 % 2.35 % 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 76.9 ns 76.3 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_median 77.0 ns 75.9 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 0.926 ns 1.67 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.20 % 2.19 % 4
Subst stringa and hex number by e_subst literal to simstr::stringa_mean 149 ns 150 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_median 149 ns 149 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 2.26 ns 3.01 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_cv 1.51 % 2.01 % 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 287 ns 287 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 286 ns 285 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 5.37 ns 8.34 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.87 % 2.91 % 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 639 ns 635 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 637 ns 635 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 5.27 ns 18.0 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 0.83 % 2.84 % 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 750 ns 746 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 749 ns 753 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 11.7 ns 14.0 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 1.56 % 1.87 % 4
e_vsubst(pattern, i / 0x8a010_fmt)_mean 1070 ns 1067 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_median 1070 ns 1057 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_stddev 27.0 ns 29.6 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_cv 2.52 % 2.77 % 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 1433 ns 1437 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 1440 ns 1451 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 38.0 ns 27.9 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 2.65 % 1.94 % 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 1327 ns 1318 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 1310 ns 1297 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 39.9 ns 52.8 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 3.01 % 4.01 % 4
std::format("abcdefghihklmopqr {:#010o} end", i)_mean 1568 ns 1569 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_median 1565 ns 1569 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 20.6 ns 28.5 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_cv 1.32 % 1.81 % 4
std::vformat(pattern, std::make_format_args(i))_mean 1555 ns 1543 ns 4
std::vformat(pattern, std::make_format_args(i))_median 1546 ns 1552 ns 4
std::vformat(pattern, std::make_format_args(i))_stddev 40.0 ns 33.4 ns 4
std::vformat(pattern, std::make_format_args(i))_cv 2.57 % 2.16 % 4
std::format with std::formatted_size_mean 2496 ns 2490 ns 4
std::format with std::formatted_size_median 2488 ns 2490 ns 4
std::format with std::formatted_size_stddev 31.6 ns 68.5 ns 4
std::format with std::formatted_size_cv 1.27 % 2.75 % 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 6707 ns 6731 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 6709 ns 6766 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 106 ns 134 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 1.58 % 1.98 % 4
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 42.2 ns 42.2 ns 4
Concat std::string by std to std::string_median 41.7 ns 42.2 ns 4
Concat std::string by std to std::string_stddev 1.16 ns 1.17 ns 4
Concat std::string by std to std::string_cv 2.76 % 2.78 % 4
Concat std::string by StrExpr to std::string_mean 39.3 ns 39.5 ns 4
Concat std::string by StrExpr to std::string_median 39.4 ns 39.2 ns 4
Concat std::string by StrExpr to std::string_stddev 0.441 ns 0.436 ns 4
Concat std::string by StrExpr to std::string_cv 1.12 % 1.10 % 4
Concat stringa by StrExpr to stringa_mean 30.6 ns 30.2 ns 4
Concat stringa by StrExpr to stringa_median 30.5 ns 30.0 ns 4
Concat stringa by StrExpr to stringa_stddev 0.672 ns 0.349 ns 4
Concat stringa by StrExpr to stringa_cv 2.20 % 1.16 % 4
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 206 ns 204 ns 4
Find concat three std::string_median 206 ns 204 ns 4
Find concat three std::string_stddev 2.29 ns 5.24 ns 4
Find concat three std::string_cv 1.11 % 2.57 % 4
Find concat three strexpr_mean 113 ns 112 ns 4
Find concat three strexpr_median 112 ns 113 ns 4
Find concat three strexpr_stddev 3.29 ns 2.67 ns 4
Find concat three strexpr_cv 2.92 % 2.38 % 4
Find concat three simstr_mean 21.2 ns 21.2 ns 4
Find concat three simstr_median 21.0 ns 21.1 ns 4
Find concat three simstr_stddev 0.696 ns 0.774 ns 4
Find concat three simstr_cv 3.29 % 3.65 % 4
Find concat three stringzilla string_mean 215 ns 215 ns 4
Find concat three stringzilla string_median 215 ns 215 ns 4
Find concat three stringzilla string_stddev 1.86 ns 3.99 ns 4
Find concat three stringzilla string_cv 0.86 % 1.86 % 4
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 8.34 ns 8.37 ns 4
BuildTypeNameStr 0/0_median 8.34 ns 8.37 ns 4
BuildTypeNameStr 0/0_stddev 0.055 ns 0.000 ns 4
BuildTypeNameStr 0/0_cv 0.66 % 0.00 % 4
BuildTypeNameExp 0/0_mean 7.67 ns 7.59 ns 4
BuildTypeNameExp 0/0_median 7.68 ns 7.59 ns 4
BuildTypeNameExp 0/0_stddev 0.232 ns 0.225 ns 4
BuildTypeNameExp 0/0_cv 3.03 % 2.97 % 4
BuildTypeNameSim 0/0_mean 7.90 ns 7.85 ns 4
BuildTypeNameSim 0/0_median 7.83 ns 7.76 ns 4
BuildTypeNameSim 0/0_stddev 0.149 ns 0.247 ns 4
BuildTypeNameSim 0/0_cv 1.89 % 3.14 % 4
BuildTypeNameStr 10/10_mean 79.5 ns 79.8 ns 4
BuildTypeNameStr 10/10_median 79.5 ns 79.3 ns 4
BuildTypeNameStr 10/10_stddev 2.19 ns 1.67 ns 4
BuildTypeNameStr 10/10_cv 2.75 % 2.09 % 4
BuildTypeNameExp 10/10_mean 33.1 ns 33.1 ns 4
BuildTypeNameExp 10/10_median 32.9 ns 33.0 ns 4
BuildTypeNameExp 10/10_stddev 0.775 ns 0.922 ns 4
BuildTypeNameExp 10/10_cv 2.34 % 2.78 % 4
BuildTypeNameSim 10/10_mean 25.2 ns 25.2 ns 4
BuildTypeNameSim 10/10_median 25.2 ns 25.2 ns 4
BuildTypeNameSim 10/10_stddev 0.364 ns 0.342 ns 4
BuildTypeNameSim 10/10_cv 1.45 % 1.36 % 4
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 315 ns 312 ns 4
Concat with replace str_median 314 ns 314 ns 4
Concat with replace str_stddev 5.64 ns 3.49 ns 4
Concat with replace str_cv 1.79 % 1.12 % 4
Concat with replace exp_mean 220 ns 220 ns 4
Concat with replace exp_median 219 ns 222 ns 4
Concat with replace exp_stddev 6.89 ns 6.91 ns 4
Concat with replace exp_cv 3.13 % 3.14 % 4
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 1.12 ns 1.12 ns 4
std::string e;_median 1.12 ns 1.12 ns 4
std::string e;_stddev 0.012 ns 0.012 ns 4
std::string e;_cv 1.11 % 1.09 % 4
std::string_view e;_mean 0.369 ns 0.369 ns 4
std::string_view e;_median 0.369 ns 0.369 ns 4
std::string_view e;_stddev 0.002 ns 0.000 ns 4
std::string_view e;_cv 0.66 % 0.00 % 4
ssa e;_mean 0.362 ns 0.359 ns 4
ssa e;_median 0.363 ns 0.361 ns 4
ssa e;_stddev 0.003 ns 0.004 ns 4
ssa e;_cv 0.91 % 1.12 % 4
stringa e;_mean 0.745 ns 0.746 ns 4
stringa e;_median 0.744 ns 0.746 ns 4
stringa e;_stddev 0.004 ns 0.008 ns 4
stringa e;_cv 0.54 % 1.08 % 4
lstringa<20> e;_mean 1.10 ns 1.09 ns 4
lstringa<20> e;_median 1.10 ns 1.09 ns 4
lstringa<20> e;_stddev 0.015 ns 0.023 ns 4
lstringa<20> e;_cv 1.36 % 2.14 % 4
lstringa<40> e;_mean 1.11 ns 1.10 ns 4
lstringa<40> e;_median 1.11 ns 1.10 ns 4
lstringa<40> e;_stddev 0.015 ns 0.016 ns 4
lstringa<40> e;_cv 1.33 % 1.46 % 4
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 1.84 ns 1.82 ns 4
std::string e = "Test text";_median 1.85 ns 1.82 ns 4
std::string e = "Test text";_stddev 0.023 ns 0.024 ns 4
std::string e = "Test text";_cv 1.27 % 1.33 % 4
std::string_view e = "Test text";_mean 0.741 ns 0.743 ns 4
std::string_view e = "Test text";_median 0.741 ns 0.746 ns 4
std::string_view e = "Test text";_stddev 0.009 ns 0.013 ns 4
std::string_view e = "Test text";_cv 1.25 % 1.80 % 4
ssa e = "Test text";_mean 0.369 ns 0.367 ns 4
ssa e = "Test text";_median 0.368 ns 0.369 ns 4
ssa e = "Test text";_stddev 0.008 ns 0.004 ns 4
ssa e = "Test text";_cv 2.15 % 1.09 % 4
stringa e = "Test text";_mean 1.11 ns 1.11 ns 4
stringa e = "Test text";_median 1.11 ns 1.11 ns 4
stringa e = "Test text";_stddev 0.011 ns 0.014 ns 4
stringa e = "Test text";_cv 1.02 % 1.27 % 4
lstringa<20> e = "Test text";_mean 1.84 ns 1.82 ns 4
lstringa<20> e = "Test text";_median 1.85 ns 1.80 ns 4
lstringa<20> e = "Test text";_stddev 0.028 ns 0.042 ns 4
lstringa<20> e = "Test text";_cv 1.55 % 2.30 % 4
lstringa<40> e = "Test text";_mean 1.85 ns 1.82 ns 4
lstringa<40> e = "Test text";_median 1.83 ns 1.79 ns 4
lstringa<40> e = "Test text";_stddev 0.063 ns 0.086 ns 4
lstringa<40> e = "Test text";_cv 3.39 % 4.70 % 4
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 73.9 ns 73.7 ns 4
std::string e = "123456789012345678901234567890";_median 74.4 ns 74.1 ns 4
std::string e = "123456789012345678901234567890";_stddev 0.956 ns 1.67 ns 4
std::string e = "123456789012345678901234567890";_cv 1.29 % 2.27 % 4
std::string_view e = "123456789012345678901234567890";_mean 0.736 ns 0.736 ns 4
std::string_view e = "123456789012345678901234567890";_median 0.735 ns 0.739 ns 4
std::string_view e = "123456789012345678901234567890";_stddev 0.009 ns 0.007 ns 4
std::string_view e = "123456789012345678901234567890";_cv 1.22 % 0.95 % 4
ssa e = "123456789012345678901234567890";_mean 0.369 ns 0.369 ns 4
ssa e = "123456789012345678901234567890";_median 0.369 ns 0.369 ns 4
ssa e = "123456789012345678901234567890";_stddev 0.004 ns 0.007 ns 4
ssa e = "123456789012345678901234567890";_cv 1.03 % 1.77 % 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.010 ns 0.014 ns 4
stringa e = "123456789012345678901234567890";_cv 0.93 % 1.27 % 4
lstringa<20> e = "123456789012345678901234567890";_mean 73.1 ns 73.2 ns 4
lstringa<20> e = "123456789012345678901234567890";_median 72.7 ns 73.2 ns 4
lstringa<20> e = "123456789012345678901234567890";_stddev 1.20 ns 1.42 ns 4
lstringa<20> e = "123456789012345678901234567890";_cv 1.64 % 1.94 % 4
lstringa<40> e = "123456789012345678901234567890";_mean 2.56 ns 2.55 ns 4
lstringa<40> e = "123456789012345678901234567890";_median 2.56 ns 2.57 ns 4
lstringa<40> e = "123456789012345678901234567890";_stddev 0.031 ns 0.028 ns 4
lstringa<40> e = "123456789012345678901234567890";_cv 1.22 % 1.09 % 4
----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text"; auto c{e};_mean 1.84 ns 1.83 ns 4
std::string e = "Test text"; auto c{e};_median 1.84 ns 1.82 ns 4
std::string e = "Test text"; auto c{e};_stddev 0.028 ns 0.040 ns 4
std::string e = "Test text"; auto c{e};_cv 1.53 % 2.19 % 4
std::string_view e = "Test text"; auto c{e};_mean 0.373 ns 0.371 ns 4
std::string_view e = "Test text"; auto c{e};_median 0.373 ns 0.373 ns 4
std::string_view e = "Test text"; auto c{e};_stddev 0.001 ns 0.008 ns 4
std::string_view e = "Test text"; auto c{e};_cv 0.38 % 2.07 % 4
ssa e = "Test text"; auto c{e};_mean 0.380 ns 0.377 ns 4
ssa e = "Test text"; auto c{e};_median 0.380 ns 0.377 ns 4
ssa e = "Test text"; auto c{e};_stddev 0.006 ns 0.007 ns 4
ssa e = "Test text"; auto c{e};_cv 1.71 % 1.74 % 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.011 ns 0.000 ns 4
stringa e = "Test text"; auto c{e};_cv 0.99 % 0.00 % 4
lstringa<20> e = "Test text"; auto c{e};_mean 1.12 ns 1.10 ns 4
lstringa<20> e = "Test text"; auto c{e};_median 1.12 ns 1.10 ns 4
lstringa<20> e = "Test text"; auto c{e};_stddev 0.026 ns 0.031 ns 4
lstringa<20> e = "Test text"; auto c{e};_cv 2.34 % 2.78 % 4
lstringa<40> e = "Test text"; auto c{e};_mean 1.11 ns 1.11 ns 4
lstringa<40> e = "Test text"; auto c{e};_median 1.11 ns 1.11 ns 4
lstringa<40> e = "Test text"; auto c{e};_stddev 0.017 ns 0.032 ns 4
lstringa<40> e = "Test text"; auto c{e};_cv 1.49 % 2.84 % 4
----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890"; auto c{e};_mean 78.0 ns 77.6 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_median 78.1 ns 77.6 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 2.07 ns 2.25 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_cv 2.66 % 2.90 % 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 0.734 ns 0.732 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 0.736 ns 0.732 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.005 ns 0.008 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 0.70 % 1.10 % 4
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.377 ns 0.368 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.373 ns 0.366 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.011 ns 0.004 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.90 % 1.18 % 4
stringa e = "123456789012345678901234567890"; auto c{e};_mean 1.12 ns 1.12 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_median 1.11 ns 1.12 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.009 ns 0.012 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_cv 0.82 % 1.09 % 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 72.6 ns 72.4 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 73.0 ns 72.4 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 2.07 ns 2.25 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.85 % 3.11 % 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 5.42 ns 5.43 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 5.44 ns 5.39 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.101 ns 0.150 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.87 % 2.76 % 4
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
sz::string::find;_mean 94.8 ns 94.2 ns 4
sz::string::find;_median 94.3 ns 94.2 ns 4
sz::string::find;_stddev 1.19 ns 0.000 ns 4
sz::string::find;_cv 1.26 % 0.00 % 4
std::string::find;_mean 40.2 ns 40.1 ns 4
std::string::find;_median 40.0 ns 40.4 ns 4
std::string::find;_stddev 0.608 ns 0.868 ns 4
std::string::find;_cv 1.51 % 2.16 % 4
std::string_view::find;_mean 39.3 ns 39.2 ns 4
std::string_view::find;_median 39.2 ns 39.0 ns 4
std::string_view::find;_stddev 0.443 ns 0.453 ns 4
std::string_view::find;_cv 1.13 % 1.16 % 4
ssa::find;_mean 18.7 ns 18.7 ns 4
ssa::find;_median 18.5 ns 18.6 ns 4
ssa::find;_stddev 0.479 ns 0.401 ns 4
ssa::find;_cv 2.57 % 2.14 % 4
stringa::find;_mean 19.6 ns 19.5 ns 4
stringa::find;_median 19.8 ns 19.5 ns 4
stringa::find;_stddev 0.421 ns 0.524 ns 4
stringa::find;_cv 2.15 % 2.69 % 4
lstringa<20>::find;_mean 18.0 ns 17.9 ns 4
lstringa<20>::find;_median 18.1 ns 18.0 ns 4
lstringa<20>::find;_stddev 0.262 ns 0.209 ns 4
lstringa<20>::find;_cv 1.45 % 1.17 % 4
lstringa<40>::find;_mean 18.5 ns 18.5 ns 4
lstringa<40>::find;_median 18.4 ns 18.6 ns 4
lstringa<40>::find;_stddev 0.343 ns 0.227 ns 4
lstringa<40>::find;_cv 1.85 % 1.23 % 4
------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string copy{str_with_len_N};/15_mean 1.83 ns 1.82 ns 4
std::string copy{str_with_len_N};/15_median 1.83 ns 1.84 ns 4
std::string copy{str_with_len_N};/15_stddev 0.018 ns 0.043 ns 4
std::string copy{str_with_len_N};/15_cv 0.98 % 2.38 % 4
std::string copy{str_with_len_N};/16_mean 78.7 ns 78.9 ns 4
std::string copy{str_with_len_N};/16_median 78.9 ns 79.3 ns 4
std::string copy{str_with_len_N};/16_stddev 1.33 ns 1.67 ns 4
std::string copy{str_with_len_N};/16_cv 1.69 % 2.12 % 4
std::string copy{str_with_len_N};/23_mean 79.1 ns 78.5 ns 4
std::string copy{str_with_len_N};/23_median 79.0 ns 78.5 ns 4
std::string copy{str_with_len_N};/23_stddev 0.895 ns 1.42 ns 4
std::string copy{str_with_len_N};/23_cv 1.13 % 1.81 % 4
std::string copy{str_with_len_N};/24_mean 80.3 ns 79.8 ns 4
std::string copy{str_with_len_N};/24_median 80.4 ns 79.3 ns 4
std::string copy{str_with_len_N};/24_stddev 1.94 ns 1.67 ns 4
std::string copy{str_with_len_N};/24_cv 2.41 % 2.09 % 4
std::string copy{str_with_len_N};/32_mean 79.6 ns 79.3 ns 4
std::string copy{str_with_len_N};/32_median 78.3 ns 78.5 ns 4
std::string copy{str_with_len_N};/32_stddev 3.75 ns 3.02 ns 4
std::string copy{str_with_len_N};/32_cv 4.71 % 3.81 % 4
std::string copy{str_with_len_N};/64_mean 80.7 ns 81.1 ns 4
std::string copy{str_with_len_N};/64_median 80.9 ns 81.1 ns 4
std::string copy{str_with_len_N};/64_stddev 3.49 ns 3.02 ns 4
std::string copy{str_with_len_N};/64_cv 4.32 % 3.72 % 4
std::string copy{str_with_len_N};/128_mean 84.2 ns 84.1 ns 4
std::string copy{str_with_len_N};/128_median 84.6 ns 84.6 ns 4
std::string copy{str_with_len_N};/128_stddev 2.47 ns 1.67 ns 4
std::string copy{str_with_len_N};/128_cv 2.93 % 1.98 % 4
std::string copy{str_with_len_N};/256_mean 87.3 ns 86.8 ns 4
std::string copy{str_with_len_N};/256_median 87.7 ns 86.8 ns 4
std::string copy{str_with_len_N};/256_stddev 1.06 ns 1.21 ns 4
std::string copy{str_with_len_N};/256_cv 1.21 % 1.39 % 4
std::string copy{str_with_len_N};/512_mean 87.3 ns 87.6 ns 4
std::string copy{str_with_len_N};/512_median 86.7 ns 87.2 ns 4
std::string copy{str_with_len_N};/512_stddev 2.31 ns 2.19 ns 4
std::string copy{str_with_len_N};/512_cv 2.65 % 2.50 % 4
std::string copy{str_with_len_N};/1024_mean 97.6 ns 97.3 ns 4
std::string copy{str_with_len_N};/1024_median 97.9 ns 97.3 ns 4
std::string copy{str_with_len_N};/1024_stddev 3.35 ns 2.70 ns 4
std::string copy{str_with_len_N};/1024_cv 3.43 % 2.78 % 4
std::string copy{str_with_len_N};/2048_mean 132 ns 133 ns 4
std::string copy{str_with_len_N};/2048_median 132 ns 133 ns 4
std::string copy{str_with_len_N};/2048_stddev 1.34 ns 1.61 ns 4
std::string copy{str_with_len_N};/2048_cv 1.01 % 1.22 % 4
std::string copy{str_with_len_N};/4096_mean 180 ns 179 ns 4
std::string copy{str_with_len_N};/4096_median 180 ns 180 ns 4
std::string copy{str_with_len_N};/4096_stddev 1.41 ns 1.92 ns 4
std::string copy{str_with_len_N};/4096_cv 0.78 % 1.07 % 4
stringa copy{str_with_len_N};/15_mean 1.09 ns 1.09 ns 4
stringa copy{str_with_len_N};/15_median 1.09 ns 1.09 ns 4
stringa copy{str_with_len_N};/15_stddev 0.024 ns 0.032 ns 4
stringa copy{str_with_len_N};/15_cv 2.20 % 2.90 % 4
stringa copy{str_with_len_N};/16_mean 1.08 ns 1.09 ns 4
stringa copy{str_with_len_N};/16_median 1.08 ns 1.09 ns 4
stringa copy{str_with_len_N};/16_stddev 0.016 ns 0.014 ns 4
stringa copy{str_with_len_N};/16_cv 1.48 % 1.30 % 4
stringa copy{str_with_len_N};/23_mean 1.09 ns 1.09 ns 4
stringa copy{str_with_len_N};/23_median 1.09 ns 1.10 ns 4
stringa copy{str_with_len_N};/23_stddev 0.005 ns 0.012 ns 4
stringa copy{str_with_len_N};/23_cv 0.49 % 1.12 % 4
stringa copy{str_with_len_N};/24_mean 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/24_median 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/24_stddev 0.102 ns 0.000 ns 4
stringa copy{str_with_len_N};/24_cv 0.63 % 0.00 % 4
stringa copy{str_with_len_N};/32_mean 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/32_median 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/32_stddev 0.076 ns 0.000 ns 4
stringa copy{str_with_len_N};/32_cv 0.47 % 0.00 % 4
stringa copy{str_with_len_N};/64_mean 16.0 ns 16.0 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.056 ns 0.000 ns 4
stringa copy{str_with_len_N};/64_cv 0.35 % 0.00 % 4
stringa copy{str_with_len_N};/128_mean 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/128_median 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/128_stddev 0.079 ns 0.000 ns 4
stringa copy{str_with_len_N};/128_cv 0.49 % 0.00 % 4
stringa copy{str_with_len_N};/256_mean 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/256_median 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/256_stddev 0.125 ns 0.174 ns 4
stringa copy{str_with_len_N};/256_cv 0.78 % 1.09 % 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.073 ns 0.174 ns 4
stringa copy{str_with_len_N};/512_cv 0.46 % 1.09 % 4
stringa copy{str_with_len_N};/1024_mean 16.1 ns 16.0 ns 4
stringa copy{str_with_len_N};/1024_median 16.1 ns 15.9 ns 4
stringa copy{str_with_len_N};/1024_stddev 0.121 ns 0.367 ns 4
stringa copy{str_with_len_N};/1024_cv 0.75 % 2.29 % 4
stringa copy{str_with_len_N};/2048_mean 16.0 ns 16.0 ns 4
stringa copy{str_with_len_N};/2048_median 16.0 ns 16.0 ns 4
stringa copy{str_with_len_N};/2048_stddev 0.042 ns 0.174 ns 4
stringa copy{str_with_len_N};/2048_cv 0.27 % 1.09 % 4
stringa copy{str_with_len_N};/4096_mean 16.1 ns 16.0 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.112 ns 0.192 ns 4
stringa copy{str_with_len_N};/4096_cv 0.70 % 1.20 % 4
lstringa<16> copy{str_with_len_N};/15_mean 1.12 ns 1.10 ns 4
lstringa<16> copy{str_with_len_N};/15_median 1.11 ns 1.10 ns 4
lstringa<16> copy{str_with_len_N};/15_stddev 0.011 ns 0.031 ns 4
lstringa<16> copy{str_with_len_N};/15_cv 1.01 % 2.78 % 4
lstringa<16> copy{str_with_len_N};/16_mean 4.56 ns 4.54 ns 4
lstringa<16> copy{str_with_len_N};/16_median 4.54 ns 4.49 ns 4
lstringa<16> copy{str_with_len_N};/16_stddev 0.102 ns 0.098 ns 4
lstringa<16> copy{str_with_len_N};/16_cv 2.25 % 2.15 % 4
lstringa<16> copy{str_with_len_N};/23_mean 4.49 ns 4.50 ns 4
lstringa<16> copy{str_with_len_N};/23_median 4.48 ns 4.50 ns 4
lstringa<16> copy{str_with_len_N};/23_stddev 0.027 ns 0.058 ns 4
lstringa<16> copy{str_with_len_N};/23_cv 0.61 % 1.30 % 4
lstringa<16> copy{str_with_len_N};/24_mean 76.6 ns 76.3 ns 4
lstringa<16> copy{str_with_len_N};/24_median 76.7 ns 75.9 ns 4
lstringa<16> copy{str_with_len_N};/24_stddev 2.12 ns 1.67 ns 4
lstringa<16> copy{str_with_len_N};/24_cv 2.77 % 2.19 % 4
lstringa<16> copy{str_with_len_N};/32_mean 77.3 ns 77.2 ns 4
lstringa<16> copy{str_with_len_N};/32_median 77.0 ns 76.7 ns 4
lstringa<16> copy{str_with_len_N};/32_stddev 3.05 ns 2.62 ns 4
lstringa<16> copy{str_with_len_N};/32_cv 3.95 % 3.39 % 4
lstringa<16> copy{str_with_len_N};/64_mean 79.3 ns 79.2 ns 4
lstringa<16> copy{str_with_len_N};/64_median 79.5 ns 79.5 ns 4
lstringa<16> copy{str_with_len_N};/64_stddev 4.31 ns 3.67 ns 4
lstringa<16> copy{str_with_len_N};/64_cv 5.44 % 4.63 % 4
lstringa<16> copy{str_with_len_N};/128_mean 82.6 ns 82.8 ns 4
lstringa<16> copy{str_with_len_N};/128_median 82.3 ns 82.0 ns 4
lstringa<16> copy{str_with_len_N};/128_stddev 1.87 ns 1.74 ns 4
lstringa<16> copy{str_with_len_N};/128_cv 2.26 % 2.11 % 4
lstringa<16> copy{str_with_len_N};/256_mean 83.7 ns 83.7 ns 4
lstringa<16> copy{str_with_len_N};/256_median 83.7 ns 83.7 ns 4
lstringa<16> copy{str_with_len_N};/256_stddev 1.07 ns 0.000 ns 4
lstringa<16> copy{str_with_len_N};/256_cv 1.28 % 0.00 % 4
lstringa<16> copy{str_with_len_N};/512_mean 88.5 ns 88.4 ns 4
lstringa<16> copy{str_with_len_N};/512_median 87.5 ns 86.8 ns 4
lstringa<16> copy{str_with_len_N};/512_stddev 3.22 ns 3.96 ns 4
lstringa<16> copy{str_with_len_N};/512_cv 3.63 % 4.48 % 4
lstringa<16> copy{str_with_len_N};/1024_mean 93.9 ns 94.2 ns 4
lstringa<16> copy{str_with_len_N};/1024_median 94.1 ns 94.2 ns 4
lstringa<16> copy{str_with_len_N};/1024_stddev 3.71 ns 3.82 ns 4
lstringa<16> copy{str_with_len_N};/1024_cv 3.95 % 4.06 % 4
lstringa<16> copy{str_with_len_N};/2048_mean 125 ns 126 ns 4
lstringa<16> copy{str_with_len_N};/2048_median 126 ns 126 ns 4
lstringa<16> copy{str_with_len_N};/2048_stddev 4.07 ns 3.22 ns 4
lstringa<16> copy{str_with_len_N};/2048_cv 3.25 % 2.57 % 4
lstringa<16> copy{str_with_len_N};/4096_mean 190 ns 189 ns 4
lstringa<16> copy{str_with_len_N};/4096_median 188 ns 188 ns 4
lstringa<16> copy{str_with_len_N};/4096_stddev 5.83 ns 4.34 ns 4
lstringa<16> copy{str_with_len_N};/4096_cv 3.08 % 2.29 % 4
lstringa<512> copy{str_with_len_N};/15_mean 1.14 ns 1.14 ns 4
lstringa<512> copy{str_with_len_N};/15_median 1.12 ns 1.13 ns 4
lstringa<512> copy{str_with_len_N};/15_stddev 0.043 ns 0.039 ns 4
lstringa<512> copy{str_with_len_N};/15_cv 3.72 % 3.45 % 4
lstringa<512> copy{str_with_len_N};/16_mean 6.12 ns 6.09 ns 4
lstringa<512> copy{str_with_len_N};/16_median 6.32 ns 6.25 ns 4
lstringa<512> copy{str_with_len_N};/16_stddev 0.549 ns 0.556 ns 4
lstringa<512> copy{str_with_len_N};/16_cv 8.97 % 9.13 % 4
lstringa<512> copy{str_with_len_N};/23_mean 5.29 ns 5.27 ns 4
lstringa<512> copy{str_with_len_N};/23_median 5.29 ns 5.30 ns 4
lstringa<512> copy{str_with_len_N};/23_stddev 0.012 ns 0.070 ns 4
lstringa<512> copy{str_with_len_N};/23_cv 0.22 % 1.32 % 4
lstringa<512> copy{str_with_len_N};/24_mean 5.27 ns 5.27 ns 4
lstringa<512> copy{str_with_len_N};/24_median 5.23 ns 5.23 ns 4
lstringa<512> copy{str_with_len_N};/24_stddev 0.121 ns 0.150 ns 4
lstringa<512> copy{str_with_len_N};/24_cv 2.30 % 2.84 % 4
lstringa<512> copy{str_with_len_N};/32_mean 8.14 ns 8.15 ns 4
lstringa<512> copy{str_with_len_N};/32_median 8.13 ns 8.20 ns 4
lstringa<512> copy{str_with_len_N};/32_stddev 0.077 ns 0.087 ns 4
lstringa<512> copy{str_with_len_N};/32_cv 0.94 % 1.07 % 4
lstringa<512> copy{str_with_len_N};/64_mean 8.48 ns 8.41 ns 4
lstringa<512> copy{str_with_len_N};/64_median 8.44 ns 8.37 ns 4
lstringa<512> copy{str_with_len_N};/64_stddev 0.164 ns 0.219 ns 4
lstringa<512> copy{str_with_len_N};/64_cv 1.93 % 2.61 % 4
lstringa<512> copy{str_with_len_N};/128_mean 8.58 ns 8.59 ns 4
lstringa<512> copy{str_with_len_N};/128_median 8.58 ns 8.63 ns 4
lstringa<512> copy{str_with_len_N};/128_stddev 0.127 ns 0.167 ns 4
lstringa<512> copy{str_with_len_N};/128_cv 1.48 % 1.94 % 4
lstringa<512> copy{str_with_len_N};/256_mean 9.69 ns 9.68 ns 4
lstringa<512> copy{str_with_len_N};/256_median 9.67 ns 9.63 ns 4
lstringa<512> copy{str_with_len_N};/256_stddev 0.143 ns 0.105 ns 4
lstringa<512> copy{str_with_len_N};/256_cv 1.48 % 1.08 % 4
lstringa<512> copy{str_with_len_N};/512_mean 11.4 ns 11.3 ns 4
lstringa<512> copy{str_with_len_N};/512_median 11.3 ns 11.2 ns 4
lstringa<512> copy{str_with_len_N};/512_stddev 0.178 ns 0.307 ns 4
lstringa<512> copy{str_with_len_N};/512_cv 1.57 % 2.72 % 4
lstringa<512> copy{str_with_len_N};/1024_mean 98.3 ns 97.0 ns 4
lstringa<512> copy{str_with_len_N};/1024_median 99.6 ns 98.9 ns 4
lstringa<512> copy{str_with_len_N};/1024_stddev 3.01 ns 4.62 ns 4
lstringa<512> copy{str_with_len_N};/1024_cv 3.06 % 4.76 % 4
lstringa<512> copy{str_with_len_N};/2048_mean 130 ns 130 ns 4
lstringa<512> copy{str_with_len_N};/2048_median 130 ns 130 ns 4
lstringa<512> copy{str_with_len_N};/2048_stddev 3.75 ns 3.60 ns 4
lstringa<512> copy{str_with_len_N};/2048_cv 2.88 % 2.78 % 4
lstringa<512> copy{str_with_len_N};/4096_mean 188 ns 187 ns 4
lstringa<512> copy{str_with_len_N};/4096_median 188 ns 188 ns 4
lstringa<512> copy{str_with_len_N};/4096_stddev 3.59 ns 4.83 ns 4
lstringa<512> copy{str_with_len_N};/4096_cv 1.91 % 2.58 % 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 31.4 ns 31.3 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 31.5 ns 31.5 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.520 ns 0.634 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.65 % 2.03 % 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 12.6 ns 12.6 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 12.6 ns 12.6 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.135 ns 0.228 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 1.07 % 1.81 % 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 13.7 ns 13.6 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 13.7 ns 13.7 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.166 ns 0.301 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.21 % 2.21 % 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 9.40 ns 9.42 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 9.34 ns 9.31 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.179 ns 0.296 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.91 % 3.14 % 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 13.4 ns 13.3 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 13.4 ns 13.3 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.251 ns 0.405 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.88 % 3.04 % 4
----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 33.6 ns 33.2 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 33.5 ns 33.0 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.374 ns 0.965 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 1.11 % 2.91 % 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 8.50 ns 8.46 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 8.49 ns 8.46 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.106 ns 0.101 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.24 % 1.19 % 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 13.7 ns 13.5 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 13.7 ns 13.5 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.213 ns 0.000 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.56 % 0.00 % 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 7.50 ns 7.46 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 7.53 ns 7.41 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.081 ns 0.167 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.08 % 2.24 % 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 12.6 ns 12.6 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 12.4 ns 12.6 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.460 ns 0.351 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 3.64 % 2.78 % 4
----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 43.6 ns 43.5 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 43.8 ns 43.5 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.865 ns 0.826 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 1.98 % 1.90 % 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 17.3 ns 17.1 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 17.1 ns 17.1 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.318 ns 0.222 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 1.84 % 1.30 % 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 12.9 ns 12.9 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 12.9 ns 13.0 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.107 ns 0.267 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 0.82 % 2.07 % 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 100 ns 99.9 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 100 ns 100 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 1.37 ns 1.05 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.37 % 1.05 % 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 58.7 ns 58.6 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 58.7 ns 58.6 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 0.055 ns 0.000 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 0.09 % 0.00 % 4
ssa s = "1234.567e10"; double res = *s.to_double()_mean 36.7 ns 36.6 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_median 36.7 ns 36.8 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.255 ns 0.419 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_cv 0.69 % 1.14 % 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 5118 ns 5082 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_median 5015 ns 5028 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 256 ns 234 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 5.00 % 4.60 % 4
std::string str; ... str += "abbaabbaabbaabba";_mean 1073 ns 1074 ns 4
std::string str; ... str += "abbaabbaabbaabba";_median 1074 ns 1074 ns 4
std::string str; ... str += "abbaabbaabbaabba";_stddev 30.6 ns 28.2 ns 4
std::string str; ... str += "abbaabbaabbaabba";_cv 2.85 % 2.62 % 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 767 ns 754 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 768 ns 759 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 10.1 ns 16.7 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 1.32 % 2.21 % 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 390 ns 390 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 386 ns 384 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 10.5 ns 13.1 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 2.70 % 3.35 % 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 239 ns 238 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 240 ns 238 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 1.20 ns 3.02 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 0.50 % 1.27 % 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 158 ns 159 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 158 ns 159 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 0.918 ns 2.01 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 0.58 % 1.27 % 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 4657 ns 4627 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 4626 ns 4602 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 87.2 ns 96.8 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 1.87 % 2.09 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 3774 ns 3767 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 3760 ns 3767 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 66.6 ns 68.3 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 1.76 % 1.81 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 716 ns 718 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 721 ns 718 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.4 ns 18.0 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.57 % 2.51 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 442 ns 443 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 442 ns 443 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 4.25 ns 7.69 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 0.96 % 1.74 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 303 ns 300 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 304 ns 302 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 4.86 ns 6.34 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.61 % 2.12 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 188 ns 186 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 189 ns 186 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 4.25 ns 5.40 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.26 % 2.90 % 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 221584 ns 220947 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 221856 ns 222168 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 3088 ns 4675 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 1.39 % 2.12 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 183793 ns 181029 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 182410 ns 182075 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 4717 ns 4007 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.57 % 2.21 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 19687 ns 19671 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 19753 ns 19671 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 462 ns 483 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.35 % 2.46 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16880 ns 16915 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16897 ns 17090 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 194 ns 349 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.15 % 2.06 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 17061 ns 17073 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 17073 ns 17073 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 272 ns 222 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.60 % 1.30 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 16444 ns 16401 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 16332 ns 16305 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 295 ns 367 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.80 % 2.24 % 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 4403 ns 4402 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_median 4390 ns 4426 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_stddev 43.3 ns 47.1 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_cv 0.98 % 1.07 % 4
std::string str; ... str += str_var1 + str_var2;_mean 3893 ns 3870 ns 4
std::string str; ... str += str_var1 + str_var2;_median 3890 ns 3891 ns 4
std::string str; ... str += str_var1 + str_var2;_stddev 44.1 ns 76.8 ns 4
std::string str; ... str += str_var1 + str_var2;_cv 1.13 % 1.98 % 4
lstringa<16> str; ... str += str_var1 + str_var2;_mean 794 ns 789 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_median 793 ns 793 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 19.0 ns 16.7 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_cv 2.40 % 2.12 % 4
lstringa<128> str; ... str += str_var1 + str_var2;_mean 527 ns 527 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_median 528 ns 523 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 7.44 ns 15.0 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_cv 1.41 % 2.84 % 4
lstringa<512> str; ... str += str_var1 + str_var2;_mean 381 ns 379 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_median 378 ns 377 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 8.74 ns 12.6 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_cv 2.30 % 3.31 % 4
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 297 ns 292 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_median 299 ns 292 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 7.42 ns 0.000 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 2.50 % 0.00 % 4
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 10833 ns 10742 ns 4
std::stringstream str; str << "test = " << k << " times";_median 10807 ns 10742 ns 4
std::stringstream str; str << "test = " << k << " times";_stddev 90.0 ns 199 ns 4
std::stringstream str; str << "test = " << k << " times";_cv 0.83 % 1.86 % 4
std::string str = "test = " + std::to_string(k) + " times";_mean 1053 ns 1052 ns 4
std::string str = "test = " + std::to_string(k) + " times";_median 1055 ns 1057 ns 4
std::string str = "test = " + std::to_string(k) + " times";_stddev 7.82 ns 20.0 ns 4
std::string str = "test = " + std::to_string(k) + " times";_cv 0.74 % 1.91 % 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2810 ns 2794 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2794 ns 2794 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 67.1 ns 36.2 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.39 % 1.30 % 4
std::string str = std::format("test = {} times", k);_mean 1904 ns 1893 ns 4
std::string str = std::format("test = {} times", k);_median 1911 ns 1882 ns 4
std::string str = std::format("test = {} times", k);_stddev 32.1 ns 43.4 ns 4
std::string str = std::format("test = {} times", k);_cv 1.68 % 2.29 % 4
lstringa<8> str; str.format("test = {} times", k);_mean 2003 ns 1995 ns 4
lstringa<8> str; str.format("test = {} times", k);_median 1998 ns 1995 ns 4
lstringa<8> str; str.format("test = {} times", k);_stddev 50.7 ns 52.4 ns 4
lstringa<8> str; str.format("test = {} times", k);_cv 2.53 % 2.62 % 4
lstringa<32> str; str.format("test = {} times", k);_mean 962 ns 952 ns 4
lstringa<32> str; str.format("test = {} times", k);_median 962 ns 952 ns 4
lstringa<32> str; str.format("test = {} times", k);_stddev 12.7 ns 19.9 ns 4
lstringa<32> str; str.format("test = {} times", k);_cv 1.32 % 2.09 % 4
lstringa<8> str = "test = " + k + " times";_mean 807 ns 809 ns 4
lstringa<8> str = "test = " + k + " times";_median 806 ns 809 ns 4
lstringa<8> str = "test = " + k + " times";_stddev 8.18 ns 11.4 ns 4
lstringa<8> str = "test = " + k + " times";_cv 1.01 % 1.41 % 4
lstringa<32> str = "test = " + k + " times";_mean 134 ns 133 ns 4
lstringa<32> str = "test = " + k + " times";_median 134 ns 133 ns 4
lstringa<32> str = "test = " + k + " times";_stddev 1.83 ns 2.67 ns 4
lstringa<32> str = "test = " + k + " times";_cv 1.37 % 2.01 % 4
stringa str = "test = " + k + " times";_mean 126 ns 124 ns 4
stringa str = "test = " + k + " times";_median 126 ns 124 ns 4
stringa str = "test = " + k + " times";_stddev 0.706 ns 1.61 ns 4
stringa str = "test = " + k + " times";_cv 0.56 % 1.30 % 4
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 558 ns 559 ns 4
std::string::find + substr + std::strtol_median 559 ns 562 ns 4
std::string::find + substr + std::strtol_stddev 10.3 ns 7.81 ns 4
std::string::find + substr + std::strtol_cv 1.85 % 1.40 % 4
ssa::splitter + ssa::as_int_mean 176 ns 176 ns 4
ssa::splitter + ssa::as_int_median 176 ns 176 ns 4
ssa::splitter + ssa::as_int_stddev 4.18 ns 5.75 ns 4
ssa::splitter + ssa::as_int_cv 2.37 % 3.28 % 4
ssa::splitf + functor_mean 192 ns 192 ns 4
ssa::splitf + functor_median 190 ns 190 ns 4
ssa::splitf + functor_stddev 4.66 ns 5.71 ns 4
ssa::splitf + functor_cv 2.43 % 2.98 % 4
-- Replace symbols in text ~400 symbols --/repeats:1 0.000 ns 0.000 ns 1000000000000
Naive (and wrong) replace symbols with std::string find + replace_mean 1124 ns 1117 ns 4
Naive (and wrong) replace symbols with std::string find + replace_median 1116 ns 1099 ns 4
Naive (and wrong) replace symbols with std::string find + replace_stddev 24.4 ns 36.6 ns 4
Naive (and wrong) replace symbols with std::string find + replace_cv 2.17 % 3.28 % 4
replace symbols with std::string find_first_of + replace_mean 1940 ns 1938 ns 4
replace symbols with std::string find_first_of + replace_median 1929 ns 1927 ns 4
replace symbols with std::string find_first_of + replace_stddev 28.9 ns 43.4 ns 4
replace symbols with std::string find_first_of + replace_cv 1.49 % 2.24 % 4
replace symbols with std::string_view find_first_of + copy_mean 2359 ns 2356 ns 4
replace symbols with std::string_view find_first_of + copy_median 2360 ns 2344 ns 4
replace symbols with std::string_view find_first_of + copy_stddev 29.6 ns 24.4 ns 4
replace symbols with std::string_view find_first_of + copy_cv 1.25 % 1.04 % 4
replace runtime symbols with string expressions and without remembering all search results_mean 1654 ns 1650 ns 4
replace runtime symbols with string expressions and without remembering all search results_median 1660 ns 1669 ns 4
replace runtime symbols with string expressions and without remembering all search results_stddev 40.9 ns 54.3 ns 4
replace runtime symbols with string expressions and without remembering all search results_cv 2.47 % 3.29 % 4
replace runtime symbols with simstr and memorization of all search results_mean 1483 ns 1483 ns 4
replace runtime symbols with simstr and memorization of all search results_median 1482 ns 1491 ns 4
replace runtime symbols with simstr and memorization of all search results_stddev 14.5 ns 30.1 ns 4
replace runtime symbols with simstr and memorization of all search results_cv 0.98 % 2.03 % 4
replace const symbols with string expressions and without remembering all search results_mean 1122 ns 1117 ns 4
replace const symbols with string expressions and without remembering all search results_median 1119 ns 1123 ns 4
replace const symbols with string expressions and without remembering all search results_stddev 16.8 ns 12.2 ns 4
replace const symbols with string expressions and without remembering all search results_cv 1.50 % 1.09 % 4
replace const symbols with string expressions and memorization of all search results_mean 1170 ns 1165 ns 4
replace const symbols with string expressions and memorization of all search results_median 1174 ns 1158 ns 4
replace const symbols with string expressions and memorization of all search results_stddev 18.2 ns 26.7 ns 4
replace const symbols with string expressions and memorization of all search results_cv 1.56 % 2.29 % 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 308 ns 305 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_median 305 ns 303 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 6.23 ns 11.9 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.02 % 3.90 % 4
Short replace symbols with std::string find_first_of + replace_mean 364 ns 363 ns 4
Short replace symbols with std::string find_first_of + replace_median 366 ns 364 ns 4
Short replace symbols with std::string find_first_of + replace_stddev 9.78 ns 7.35 ns 4
Short replace symbols with std::string find_first_of + replace_cv 2.68 % 2.03 % 4
Short replace symbols with std::string_view find_first_of + copy_mean 305 ns 305 ns 4
Short replace symbols with std::string_view find_first_of + copy_median 306 ns 305 ns 4
Short replace symbols with std::string_view find_first_of + copy_stddev 6.50 ns 7.65 ns 4
Short replace symbols with std::string_view find_first_of + copy_cv 2.13 % 2.51 % 4
Short replace runtime symbols with string expressions and without remembering all search results_mean 269 ns 264 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_median 268 ns 264 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_stddev 4.83 ns 5.13 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_cv 1.80 % 1.94 % 4
Short replace runtime symbols with simstr and memorization of all search results_mean 366 ns 365 ns 4
Short replace runtime symbols with simstr and memorization of all search results_median 367 ns 365 ns 4
Short replace runtime symbols with simstr and memorization of all search results_stddev 2.14 ns 4.63 ns 4
Short replace runtime symbols with simstr and memorization of all search results_cv 0.58 % 1.27 % 4
Short replace const symbols with string expressions and without remembering all search results_mean 202 ns 202 ns 4
Short replace const symbols with string expressions and without remembering all search results_median 202 ns 202 ns 4
Short replace const symbols with string expressions and without remembering all search results_stddev 2.65 ns 5.85 ns 4
Short replace const symbols with string expressions and without remembering all search results_cv 1.31 % 2.90 % 4
Short replace const symbols with string expressions and memorization of all search results_mean 293 ns 292 ns 4
Short replace const symbols with string expressions and memorization of all search results_median 293 ns 292 ns 4
Short replace const symbols with string expressions and memorization of all search results_stddev 7.11 ns 5.41 ns 4
Short replace const symbols with string expressions and memorization of all search results_cv 2.43 % 1.86 % 4
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 223 ns 221 ns 4
replace bb to ---- in std::string|64_median 223 ns 222 ns 4
replace bb to ---- in std::string|64_stddev 4.11 ns 4.67 ns 4
replace bb to ---- in std::string|64_cv 1.84 % 2.12 % 4
replace bb to ---- in std::string|256_mean 727 ns 729 ns 4
replace bb to ---- in std::string|256_median 720 ns 718 ns 4
replace bb to ---- in std::string|256_stddev 20.3 ns 26.4 ns 4
replace bb to ---- in std::string|256_cv 2.79 % 3.62 % 4
replace bb to ---- in std::string|512_mean 1418 ns 1413 ns 4
replace bb to ---- in std::string|512_median 1416 ns 1413 ns 4
replace bb to ---- in std::string|512_stddev 37.9 ns 45.0 ns 4
replace bb to ---- in std::string|512_cv 2.67 % 3.19 % 4
replace bb to ---- in std::string|1024_mean 3058 ns 3058 ns 4
replace bb to ---- in std::string|1024_median 3054 ns 3076 ns 4
replace bb to ---- in std::string|1024_stddev 45.8 ns 36.6 ns 4
replace bb to ---- in std::string|1024_cv 1.50 % 1.20 % 4
replace bb to ---- in std::string|2048_mean 8038 ns 7847 ns 4
replace bb to ---- in std::string|2048_median 8026 ns 7847 ns 4
replace bb to ---- in std::string|2048_stddev 49.4 ns 318 ns 4
replace bb to ---- in std::string|2048_cv 0.61 % 4.06 % 4
replace bb to ---- in lstringa<8>|64_mean 216 ns 216 ns 4
replace bb to ---- in lstringa<8>|64_median 215 ns 215 ns 4
replace bb to ---- in lstringa<8>|64_stddev 2.62 ns 2.44 ns 4
replace bb to ---- in lstringa<8>|64_cv 1.22 % 1.13 % 4
replace bb to ---- in lstringa<8>|256_mean 606 ns 607 ns 4
replace bb to ---- in lstringa<8>|256_median 602 ns 600 ns 4
replace bb to ---- in lstringa<8>|256_stddev 13.8 ns 14.0 ns 4
replace bb to ---- in lstringa<8>|256_cv 2.27 % 2.30 % 4
replace bb to ---- in lstringa<8>|512_mean 1002 ns 1004 ns 4
replace bb to ---- in lstringa<8>|512_median 996 ns 994 ns 4
replace bb to ---- in lstringa<8>|512_stddev 22.0 ns 29.6 ns 4
replace bb to ---- in lstringa<8>|512_cv 2.20 % 2.95 % 4
replace bb to ---- in lstringa<8>|1024_mean 1848 ns 1842 ns 4
replace bb to ---- in lstringa<8>|1024_median 1847 ns 1842 ns 4
replace bb to ---- in lstringa<8>|1024_stddev 26.3 ns 31.3 ns 4
replace bb to ---- in lstringa<8>|1024_cv 1.42 % 1.70 % 4
replace bb to ---- in lstringa<8>|2048_mean 3556 ns 3530 ns 4
replace bb to ---- in lstringa<8>|2048_median 3581 ns 3568 ns 4
replace bb to ---- in lstringa<8>|2048_stddev 76.1 ns 109 ns 4
replace bb to ---- in lstringa<8>|2048_cv 2.14 % 3.07 % 4
replace bb to ---- by init stringa|64_mean 165 ns 165 ns 4
replace bb to ---- by init stringa|64_median 165 ns 165 ns 4
replace bb to ---- by init stringa|64_stddev 3.13 ns 3.13 ns 4
replace bb to ---- by init stringa|64_cv 1.90 % 1.90 % 4
replace bb to ---- by init stringa|256_mean 366 ns 367 ns 4
replace bb to ---- by init stringa|256_median 363 ns 369 ns 4
replace bb to ---- by init stringa|256_stddev 7.03 ns 4.01 ns 4
replace bb to ---- by init stringa|256_cv 1.92 % 1.09 % 4
replace bb to ---- by init stringa|512_mean 793 ns 793 ns 4
replace bb to ---- by init stringa|512_median 799 ns 802 ns 4
replace bb to ---- by init stringa|512_stddev 15.0 ns 17.4 ns 4
replace bb to ---- by init stringa|512_cv 1.89 % 2.20 % 4
replace bb to ---- by init stringa|1024_mean 1626 ns 1621 ns 4
replace bb to ---- by init stringa|1024_median 1632 ns 1611 ns 4
replace bb to ---- by init stringa|1024_stddev 14.6 ns 19.2 ns 4
replace bb to ---- by init stringa|1024_cv 0.90 % 1.18 % 4
replace bb to ---- by init stringa|2048_mean 3047 ns 3032 ns 4
replace bb to ---- by init stringa|2048_median 3055 ns 3048 ns 4
replace bb to ---- by init stringa|2048_stddev 22.3 ns 33.1 ns 4
replace bb to ---- by init stringa|2048_cv 0.73 % 1.09 % 4
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 187 ns 186 ns 4
replace bb to -- in std::string|64_median 188 ns 186 ns 4
replace bb to -- in std::string|64_stddev 2.48 ns 4.95 ns 4
replace bb to -- in std::string|64_cv 1.33 % 2.66 % 4
replace bb to -- in std::string|256_mean 469 ns 470 ns 4
replace bb to -- in std::string|256_median 471 ns 476 ns 4
replace bb to -- in std::string|256_stddev 8.19 ns 10.8 ns 4
replace bb to -- in std::string|256_cv 1.74 % 2.30 % 4
replace bb to -- in std::string|512_mean 837 ns 837 ns 4
replace bb to -- in std::string|512_median 835 ns 837 ns 4
replace bb to -- in std::string|512_stddev 14.4 ns 24.2 ns 4
replace bb to -- in std::string|512_cv 1.73 % 2.89 % 4
replace bb to -- in std::string|1024_mean 1612 ns 1596 ns 4
replace bb to -- in std::string|1024_median 1608 ns 1604 ns 4
replace bb to -- in std::string|1024_stddev 24.9 ns 17.4 ns 4
replace bb to -- in std::string|1024_cv 1.55 % 1.09 % 4
replace bb to -- in std::string|2048_mean 3131 ns 3122 ns 4
replace bb to -- in std::string|2048_median 3146 ns 3104 ns 4
replace bb to -- in std::string|2048_stddev 47.3 ns 66.8 ns 4
replace bb to -- in std::string|2048_cv 1.51 % 2.14 % 4
replace bb to -- in lstringa<8>|64_mean 175 ns 176 ns 4
replace bb to -- in lstringa<8>|64_median 176 ns 176 ns 4
replace bb to -- in lstringa<8>|64_stddev 2.70 ns 4.83 ns 4
replace bb to -- in lstringa<8>|64_cv 1.54 % 2.75 % 4
replace bb to -- in lstringa<8>|256_mean 427 ns 426 ns 4
replace bb to -- in lstringa<8>|256_median 425 ns 424 ns 4
replace bb to -- in lstringa<8>|256_stddev 8.29 ns 11.8 ns 4
replace bb to -- in lstringa<8>|256_cv 1.94 % 2.78 % 4
replace bb to -- in lstringa<8>|512_mean 723 ns 724 ns 4
replace bb to -- in lstringa<8>|512_median 723 ns 724 ns 4
replace bb to -- in lstringa<8>|512_stddev 1.22 ns 10.1 ns 4
replace bb to -- in lstringa<8>|512_cv 0.17 % 1.39 % 4
replace bb to -- in lstringa<8>|1024_mean 1373 ns 1365 ns 4
replace bb to -- in lstringa<8>|1024_median 1373 ns 1365 ns 4
replace bb to -- in lstringa<8>|1024_stddev 36.7 ns 18.1 ns 4
replace bb to -- in lstringa<8>|1024_cv 2.68 % 1.33 % 4
replace bb to -- in lstringa<8>|2048_mean 2685 ns 2683 ns 4
replace bb to -- in lstringa<8>|2048_median 2675 ns 2668 ns 4
replace bb to -- in lstringa<8>|2048_stddev 29.6 ns 29.6 ns 4
replace bb to -- in lstringa<8>|2048_cv 1.10 % 1.10 % 4
replace bb to -- by init stringa|64_mean 153 ns 152 ns 4
replace bb to -- by init stringa|64_median 153 ns 152 ns 4
replace bb to -- by init stringa|64_stddev 2.02 ns 2.01 ns 4
replace bb to -- by init stringa|64_cv 1.32 % 1.33 % 4
replace bb to -- by init stringa|256_mean 322 ns 322 ns 4
replace bb to -- by init stringa|256_median 319 ns 319 ns 4
replace bb to -- by init stringa|256_stddev 9.25 ns 10.4 ns 4
replace bb to -- by init stringa|256_cv 2.87 % 3.21 % 4
replace bb to -- by init stringa|512_mean 520 ns 516 ns 4
replace bb to -- by init stringa|512_median 514 ns 509 ns 4
replace bb to -- by init stringa|512_stddev 18.8 ns 19.7 ns 4
replace bb to -- by init stringa|512_cv 3.61 % 3.82 % 4
replace bb to -- by init stringa|1024_mean 954 ns 952 ns 4
replace bb to -- by init stringa|1024_median 951 ns 952 ns 4
replace bb to -- by init stringa|1024_stddev 20.0 ns 27.0 ns 4
replace bb to -- by init stringa|1024_cv 2.10 % 2.84 % 4
replace bb to -- by init stringa|2048_mean 1806 ns 1800 ns 4
replace bb to -- by init stringa|2048_median 1801 ns 1800 ns 4
replace bb to -- by init stringa|2048_stddev 32.2 ns 48.3 ns 4
replace bb to -- by init stringa|2048_cv 1.78 % 2.69 % 4
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 4069702 ns 4080831 ns 4
hashStrMapA<size_t> emplace & find stringa;_median 4065785 ns 4102654 ns 4
hashStrMapA<size_t> emplace & find stringa;_stddev 27677 ns 43645 ns 4
hashStrMapA<size_t> emplace & find stringa;_cv 0.68 % 1.07 % 4
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 5913523 ns 5824498 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_median 5907914 ns 5859375 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 277139 ns 309341 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 4.69 % 5.31 % 4
hashStrMapA<size_t> emplace & find ssa;_mean 3619495 ns 3545673 ns 4
hashStrMapA<size_t> emplace & find ssa;_median 3562421 ns 3565705 ns 4
hashStrMapA<size_t> emplace & find ssa;_stddev 164099 ns 76717 ns 4
hashStrMapA<size_t> emplace & find ssa;_cv 4.53 % 2.16 % 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 6497268 ns 6522042 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 6500552 ns 6556920 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 44944 ns 69754 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 0.69 % 1.07 % 4
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 1507 ns 1507 ns 4
Build func full name std::string;_median 1518 ns 1507 ns 4
Build func full name std::string;_stddev 28.8 ns 25.6 ns 4
Build func full name std::string;_cv 1.91 % 1.70 % 4
Build func full name std::string 1;_mean 1515 ns 1507 ns 4
Build func full name std::string 1;_median 1512 ns 1507 ns 4
Build func full name std::string 1;_stddev 14.5 ns 25.6 ns 4
Build func full name std::string 1;_cv 0.96 % 1.70 % 4
Build func full name std::stream;_mean 8296 ns 8327 ns 4
Build func full name std::stream;_median 8331 ns 8371 ns 4
Build func full name std::stream;_stddev 233 ns 262 ns 4
Build func full name std::stream;_cv 2.80 % 3.14 % 4
Build func full name stringa;_mean 749 ns 750 ns 4
Build func full name stringa;_median 748 ns 750 ns 4
Build func full name stringa;_stddev 12.4 ns 14.2 ns 4
Build func full name stringa;_cv 1.65 % 1.90 % 4
Build func full name stringa 1;_mean 878 ns 853 ns 4
Build func full name stringa 1;_median 865 ns 858 ns 4
Build func full name stringa 1;_stddev 30.2 ns 10.5 ns 4
Build func full name stringa 1;_cv 3.44 % 1.23 % 4
----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
To upper case std::wstring_mean 1457 ns 1460 ns 4
To upper case std::wstring_median 1455 ns 1460 ns 4
To upper case std::wstring_stddev 16.8 ns 18.1 ns 4
To upper case std::wstring_cv 1.16 % 1.24 % 4
To upper case lstringw<15>_mean 41.0 ns 41.0 ns 4
To upper case lstringw<15>_median 41.0 ns 41.0 ns 4
To upper case lstringw<15>_stddev 0.393 ns 0.544 ns 4
To upper case lstringw<15>_cv 0.96 % 1.33 % 4

View File

@ -1,876 +0,0 @@
2026-01-21T00:56:24+03:00
Running benchStr.exe
Run on (32 X 2494 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)
--------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------
----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and number by std to std::string_mean 331 ns 330 ns 10
Concat std::string and number by std to std::string_median 328 ns 328 ns 10
Concat std::string and number by std to std::string_stddev 9.88 ns 8.73 ns 10
Concat std::string and number by std to std::string_cv 2.98 % 2.65 % 10
Concat std::string and number by StrExpr to std::string_mean 211 ns 207 ns 10
Concat std::string and number by StrExpr to std::string_median 212 ns 206 ns 10
Concat std::string and number by StrExpr to std::string_stddev 5.83 ns 5.26 ns 10
Concat std::string and number by StrExpr to std::string_cv 2.77 % 2.54 % 10
Concat stringa and number by StrExpr to simstr::stringa_mean 108 ns 107 ns 10
Concat stringa and number by StrExpr to simstr::stringa_median 108 ns 107 ns 10
Concat stringa and number by StrExpr to simstr::stringa_stddev 2.53 ns 2.24 ns 10
Concat stringa and number by StrExpr to simstr::stringa_cv 2.33 % 2.10 % 10
----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and hex number by std to std::string_mean 1074 ns 1059 ns 10
Concat std::string and hex number by std to std::string_median 1060 ns 1046 ns 10
Concat std::string and hex number by std to std::string_stddev 38.0 ns 38.5 ns 10
Concat std::string and hex number by std to std::string_cv 3.54 % 3.63 % 10
Concat std::string and hex number by StrExpr to std::string_mean 136 ns 136 ns 10
Concat std::string and hex number by StrExpr to std::string_median 137 ns 135 ns 10
Concat std::string and hex number by StrExpr to std::string_stddev 4.05 ns 4.20 ns 10
Concat std::string and hex number by StrExpr to std::string_cv 2.97 % 3.09 % 10
Concat stringa and hex number by StrExpr to simstr::stringa_mean 101 ns 98.4 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_median 102 ns 97.7 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_stddev 4.57 ns 4.00 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_cv 4.50 % 4.06 % 10
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 55.4 ns 55.0 ns 10
Concat std::string by std to std::string_median 54.8 ns 54.4 ns 10
Concat std::string by std to std::string_stddev 1.60 ns 1.76 ns 10
Concat std::string by std to std::string_cv 2.89 % 3.21 % 10
Concat std::string by StrExpr to std::string_mean 77.9 ns 77.0 ns 10
Concat std::string by StrExpr to std::string_median 77.6 ns 76.7 ns 10
Concat std::string by StrExpr to std::string_stddev 1.39 ns 1.28 ns 10
Concat std::string by StrExpr to std::string_cv 1.78 % 1.66 % 10
Concat stringa by StrExpr to stringa_mean 52.5 ns 52.0 ns 10
Concat stringa by StrExpr to stringa_median 51.6 ns 51.6 ns 10
Concat stringa by StrExpr to stringa_stddev 1.34 ns 0.755 ns 10
Concat stringa by StrExpr to stringa_cv 2.56 % 1.45 % 10
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 225 ns 222 ns 10
Find concat three std::string_median 223 ns 217 ns 10
Find concat three std::string_stddev 9.31 ns 8.69 ns 10
Find concat three std::string_cv 4.13 % 3.91 % 10
Find concat three strexpr_mean 122 ns 121 ns 10
Find concat three strexpr_median 122 ns 120 ns 10
Find concat three strexpr_stddev 3.71 ns 3.68 ns 10
Find concat three strexpr_cv 3.05 % 3.05 % 10
Find concat three simstr_mean 28.4 ns 27.9 ns 10
Find concat three simstr_median 28.2 ns 27.9 ns 10
Find concat three simstr_stddev 0.873 ns 0.791 ns 10
Find concat three simstr_cv 3.08 % 2.84 % 10
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 17.9 ns 17.7 ns 10
BuildTypeNameStr 0/0_median 17.7 ns 17.6 ns 10
BuildTypeNameStr 0/0_stddev 0.347 ns 0.353 ns 10
BuildTypeNameStr 0/0_cv 1.94 % 1.99 % 10
BuildTypeNameExp 0/0_mean 14.2 ns 14.1 ns 10
BuildTypeNameExp 0/0_median 14.0 ns 14.1 ns 10
BuildTypeNameExp 0/0_stddev 0.420 ns 0.391 ns 10
BuildTypeNameExp 0/0_cv 2.96 % 2.77 % 10
BuildTypeNameSim 0/0_mean 17.2 ns 17.1 ns 10
BuildTypeNameSim 0/0_median 17.2 ns 17.3 ns 10
BuildTypeNameSim 0/0_stddev 0.256 ns 0.185 ns 10
BuildTypeNameSim 0/0_cv 1.49 % 1.08 % 10
BuildTypeNameStr 10/10_mean 79.4 ns 79.2 ns 10
BuildTypeNameStr 10/10_median 78.6 ns 78.5 ns 10
BuildTypeNameStr 10/10_stddev 1.75 ns 1.22 ns 10
BuildTypeNameStr 10/10_cv 2.20 % 1.54 % 10
BuildTypeNameExp 10/10_mean 40.0 ns 40.0 ns 10
BuildTypeNameExp 10/10_median 39.9 ns 40.1 ns 10
BuildTypeNameExp 10/10_stddev 0.764 ns 0.643 ns 10
BuildTypeNameExp 10/10_cv 1.91 % 1.61 % 10
BuildTypeNameSim 10/10_mean 37.9 ns 37.8 ns 10
BuildTypeNameSim 10/10_median 37.8 ns 37.5 ns 10
BuildTypeNameSim 10/10_stddev 0.709 ns 0.718 ns 10
BuildTypeNameSim 10/10_cv 1.87 % 1.90 % 10
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 362 ns 351 ns 10
Concat with replace str_median 364 ns 349 ns 10
Concat with replace str_stddev 13.6 ns 10.6 ns 10
Concat with replace str_cv 3.75 % 3.01 % 10
Concat with replace exp_mean 223 ns 221 ns 10
Concat with replace exp_median 222 ns 222 ns 10
Concat with replace exp_stddev 5.40 ns 4.68 ns 10
Concat with replace exp_cv 2.42 % 2.12 % 10
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 2.63 ns 2.57 ns 10
std::string e;_median 2.61 ns 2.58 ns 10
std::string e;_stddev 0.115 ns 0.093 ns 10
std::string e;_cv 4.35 % 3.62 % 10
std::string_view e;_mean 1.84 ns 1.83 ns 10
std::string_view e;_median 1.82 ns 1.84 ns 10
std::string_view e;_stddev 0.042 ns 0.028 ns 10
std::string_view e;_cv 2.27 % 1.54 % 10
ssa e;_mean 1.83 ns 1.82 ns 10
ssa e;_median 1.83 ns 1.84 ns 10
ssa e;_stddev 0.031 ns 0.041 ns 10
ssa e;_cv 1.68 % 2.23 % 10
stringa e;_mean 2.22 ns 2.20 ns 10
stringa e;_median 2.22 ns 2.20 ns 10
stringa e;_stddev 0.056 ns 0.046 ns 10
stringa e;_cv 2.53 % 2.10 % 10
lstringa<20> e;_mean 2.59 ns 2.57 ns 10
lstringa<20> e;_median 2.56 ns 2.57 ns 10
lstringa<20> e;_stddev 0.070 ns 0.051 ns 10
lstringa<20> e;_cv 2.69 % 1.99 % 10
lstringa<40> e;_mean 2.56 ns 2.54 ns 10
lstringa<40> e;_median 2.55 ns 2.55 ns 10
lstringa<40> e;_stddev 0.045 ns 0.044 ns 10
lstringa<40> e;_cv 1.75 % 1.72 % 10
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 2.64 ns 2.61 ns 10
std::string e = "Test text";_median 2.63 ns 2.59 ns 10
std::string e = "Test text";_stddev 0.074 ns 0.078 ns 10
std::string e = "Test text";_cv 2.79 % 2.99 % 10
std::string_view e = "Test text";_mean 1.85 ns 1.83 ns 10
std::string_view e = "Test text";_median 1.84 ns 1.82 ns 10
std::string_view e = "Test text";_stddev 0.038 ns 0.027 ns 10
std::string_view e = "Test text";_cv 2.05 % 1.47 % 10
ssa e = "Test text";_mean 1.83 ns 1.82 ns 10
ssa e = "Test text";_median 1.83 ns 1.81 ns 10
ssa e = "Test text";_stddev 0.022 ns 0.029 ns 10
ssa e = "Test text";_cv 1.20 % 1.57 % 10
stringa e = "Test text";_mean 2.20 ns 2.20 ns 10
stringa e = "Test text";_median 2.19 ns 2.20 ns 10
stringa e = "Test text";_stddev 0.053 ns 0.061 ns 10
stringa e = "Test text";_cv 2.42 % 2.77 % 10
lstringa<20> e = "Test text";_mean 2.59 ns 2.57 ns 10
lstringa<20> e = "Test text";_median 2.60 ns 2.55 ns 10
lstringa<20> e = "Test text";_stddev 0.033 ns 0.031 ns 10
lstringa<20> e = "Test text";_cv 1.28 % 1.19 % 10
lstringa<40> e = "Test text";_mean 2.58 ns 2.54 ns 10
lstringa<40> e = "Test text";_median 2.57 ns 2.55 ns 10
lstringa<40> e = "Test text";_stddev 0.082 ns 0.059 ns 10
lstringa<40> e = "Test text";_cv 3.17 % 2.32 % 10
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 77.5 ns 77.2 ns 10
std::string e = "123456789012345678901234567890";_median 77.1 ns 77.4 ns 10
std::string e = "123456789012345678901234567890";_stddev 2.32 ns 2.51 ns 10
std::string e = "123456789012345678901234567890";_cv 2.99 % 3.24 % 10
std::string_view e = "123456789012345678901234567890";_mean 1.83 ns 1.81 ns 10
std::string_view e = "123456789012345678901234567890";_median 1.82 ns 1.80 ns 10
std::string_view e = "123456789012345678901234567890";_stddev 0.028 ns 0.028 ns 10
std::string_view e = "123456789012345678901234567890";_cv 1.53 % 1.56 % 10
ssa e = "123456789012345678901234567890";_mean 1.83 ns 1.83 ns 10
ssa e = "123456789012345678901234567890";_median 1.83 ns 1.84 ns 10
ssa e = "123456789012345678901234567890";_stddev 0.007 ns 0.019 ns 10
ssa e = "123456789012345678901234567890";_cv 0.36 % 1.01 % 10
stringa e = "123456789012345678901234567890";_mean 2.24 ns 2.23 ns 10
stringa e = "123456789012345678901234567890";_median 2.22 ns 2.22 ns 10
stringa e = "123456789012345678901234567890";_stddev 0.060 ns 0.047 ns 10
stringa e = "123456789012345678901234567890";_cv 2.70 % 2.10 % 10
lstringa<20> e = "123456789012345678901234567890";_mean 77.7 ns 77.1 ns 10
lstringa<20> e = "123456789012345678901234567890";_median 76.7 ns 76.7 ns 10
lstringa<20> e = "123456789012345678901234567890";_stddev 2.51 ns 2.57 ns 10
lstringa<20> e = "123456789012345678901234567890";_cv 3.24 % 3.34 % 10
lstringa<40> e = "123456789012345678901234567890";_mean 3.42 ns 3.40 ns 10
lstringa<40> e = "123456789012345678901234567890";_median 3.36 ns 3.35 ns 10
lstringa<40> e = "123456789012345678901234567890";_stddev 0.192 ns 0.168 ns 10
lstringa<40> e = "123456789012345678901234567890";_cv 5.60 % 4.95 % 10
----- 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.43 ns 5.37 ns 10
std::string e = "Test text"; auto c{e};_median 5.37 ns 5.31 ns 10
std::string e = "Test text"; auto c{e};_stddev 0.131 ns 0.132 ns 10
std::string e = "Test text"; auto c{e};_cv 2.41 % 2.45 % 10
std::string_view e = "Test text"; auto c{e};_mean 2.94 ns 2.93 ns 10
std::string_view e = "Test text"; auto c{e};_median 2.94 ns 2.93 ns 10
std::string_view e = "Test text"; auto c{e};_stddev 0.055 ns 0.066 ns 10
std::string_view e = "Test text"; auto c{e};_cv 1.86 % 2.24 % 10
ssa e = "Test text"; auto c{e};_mean 2.92 ns 2.90 ns 10
ssa e = "Test text"; auto c{e};_median 2.90 ns 2.92 ns 10
ssa e = "Test text"; auto c{e};_stddev 0.056 ns 0.070 ns 10
ssa e = "Test text"; auto c{e};_cv 1.93 % 2.42 % 10
stringa e = "Test text"; auto c{e};_mean 4.13 ns 4.09 ns 10
stringa e = "Test text"; auto c{e};_median 4.08 ns 4.05 ns 10
stringa e = "Test text"; auto c{e};_stddev 0.145 ns 0.104 ns 10
stringa e = "Test text"; auto c{e};_cv 3.51 % 2.55 % 10
lstringa<20> e = "Test text"; auto c{e};_mean 7.74 ns 7.60 ns 10
lstringa<20> e = "Test text"; auto c{e};_median 7.65 ns 7.50 ns 10
lstringa<20> e = "Test text"; auto c{e};_stddev 0.280 ns 0.187 ns 10
lstringa<20> e = "Test text"; auto c{e};_cv 3.62 % 2.47 % 10
lstringa<40> e = "Test text"; auto c{e};_mean 8.56 ns 8.46 ns 10
lstringa<40> e = "Test text"; auto c{e};_median 8.52 ns 8.37 ns 10
lstringa<40> e = "Test text"; auto c{e};_stddev 0.277 ns 0.276 ns 10
lstringa<40> e = "Test text"; auto c{e};_cv 3.24 % 3.26 % 10
----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890"; auto c{e};_mean 77.5 ns 76.6 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_median 77.6 ns 77.4 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 2.80 ns 2.50 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_cv 3.61 % 3.26 % 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 1.88 ns 1.85 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 1.84 ns 1.82 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.098 ns 0.086 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 5.20 % 4.64 % 10
ssa e = "123456789012345678901234567890"; auto c{e};_mean 1.83 ns 1.82 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_median 1.82 ns 1.80 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.047 ns 0.045 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_cv 2.54 % 2.47 % 10
stringa e = "123456789012345678901234567890"; auto c{e};_mean 3.02 ns 2.98 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_median 3.01 ns 2.98 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.093 ns 0.070 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_cv 3.09 % 2.34 % 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 79.3 ns 78.6 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 78.3 ns 78.5 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 2.18 ns 2.09 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.75 % 2.65 % 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 6.63 ns 6.63 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 6.60 ns 6.63 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.129 ns 0.151 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.95 % 2.27 % 10
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find;_mean 40.7 ns 40.4 ns 10
std::string::find;_median 40.6 ns 40.4 ns 10
std::string::find;_stddev 0.887 ns 1.43 ns 10
std::string::find;_cv 2.18 % 3.55 % 10
std::string_view::find;_mean 40.8 ns 40.4 ns 10
std::string_view::find;_median 40.7 ns 39.9 ns 10
std::string_view::find;_stddev 0.671 ns 0.641 ns 10
std::string_view::find;_cv 1.64 % 1.59 % 10
ssa::find;_mean 22.6 ns 22.5 ns 10
ssa::find;_median 22.6 ns 22.7 ns 10
ssa::find;_stddev 0.634 ns 0.779 ns 10
ssa::find;_cv 2.81 % 3.46 % 10
stringa::find;_mean 28.4 ns 28.2 ns 10
stringa::find;_median 28.5 ns 27.6 ns 10
stringa::find;_stddev 1.42 ns 1.51 ns 10
stringa::find;_cv 4.99 % 5.37 % 10
lstringa<20>::find;_mean 23.2 ns 23.0 ns 10
lstringa<20>::find;_median 23.1 ns 22.9 ns 10
lstringa<20>::find;_stddev 0.720 ns 0.765 ns 10
lstringa<20>::find;_cv 3.10 % 3.32 % 10
lstringa<40>::find;_mean 21.3 ns 21.0 ns 10
lstringa<40>::find;_median 20.9 ns 20.9 ns 10
lstringa<40>::find;_stddev 0.840 ns 0.678 ns 10
lstringa<40>::find;_cv 3.95 % 3.23 % 10
------- 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.27 ns 5.17 ns 10
std::string copy{str_with_len_N};/15_median 5.22 ns 5.16 ns 10
std::string copy{str_with_len_N};/15_stddev 0.211 ns 0.155 ns 10
std::string copy{str_with_len_N};/15_cv 4.00 % 3.00 % 10
std::string copy{str_with_len_N};/16_mean 83.4 ns 83.2 ns 10
std::string copy{str_with_len_N};/16_median 81.9 ns 82.0 ns 10
std::string copy{str_with_len_N};/16_stddev 4.14 ns 4.20 ns 10
std::string copy{str_with_len_N};/16_cv 4.96 % 5.04 % 10
std::string copy{str_with_len_N};/23_mean 82.9 ns 82.3 ns 10
std::string copy{str_with_len_N};/23_median 82.5 ns 81.1 ns 10
std::string copy{str_with_len_N};/23_stddev 2.73 ns 2.94 ns 10
std::string copy{str_with_len_N};/23_cv 3.30 % 3.57 % 10
std::string copy{str_with_len_N};/24_mean 83.8 ns 82.4 ns 10
std::string copy{str_with_len_N};/24_median 83.3 ns 81.6 ns 10
std::string copy{str_with_len_N};/24_stddev 3.68 ns 3.30 ns 10
std::string copy{str_with_len_N};/24_cv 4.39 % 4.00 % 10
std::string copy{str_with_len_N};/32_mean 88.0 ns 87.7 ns 10
std::string copy{str_with_len_N};/32_median 87.0 ns 87.9 ns 10
std::string copy{str_with_len_N};/32_stddev 2.48 ns 2.30 ns 10
std::string copy{str_with_len_N};/32_cv 2.82 % 2.63 % 10
std::string copy{str_with_len_N};/64_mean 84.3 ns 83.5 ns 10
std::string copy{str_with_len_N};/64_median 83.4 ns 83.7 ns 10
std::string copy{str_with_len_N};/64_stddev 2.69 ns 2.51 ns 10
std::string copy{str_with_len_N};/64_cv 3.19 % 3.00 % 10
std::string copy{str_with_len_N};/128_mean 87.8 ns 87.5 ns 10
std::string copy{str_with_len_N};/128_median 87.3 ns 87.9 ns 10
std::string copy{str_with_len_N};/128_stddev 1.32 ns 1.65 ns 10
std::string copy{str_with_len_N};/128_cv 1.51 % 1.89 % 10
std::string copy{str_with_len_N};/256_mean 88.5 ns 88.1 ns 10
std::string copy{str_with_len_N};/256_median 88.5 ns 87.9 ns 10
std::string copy{str_with_len_N};/256_stddev 1.91 ns 2.30 ns 10
std::string copy{str_with_len_N};/256_cv 2.16 % 2.61 % 10
std::string copy{str_with_len_N};/512_mean 91.6 ns 91.0 ns 10
std::string copy{str_with_len_N};/512_median 90.9 ns 90.0 ns 10
std::string copy{str_with_len_N};/512_stddev 3.32 ns 3.31 ns 10
std::string copy{str_with_len_N};/512_cv 3.63 % 3.63 % 10
std::string copy{str_with_len_N};/1024_mean 99.9 ns 99.6 ns 10
std::string copy{str_with_len_N};/1024_median 101 ns 99.4 ns 10
std::string copy{str_with_len_N};/1024_stddev 2.94 ns 2.65 ns 10
std::string copy{str_with_len_N};/1024_cv 2.95 % 2.66 % 10
std::string copy{str_with_len_N};/2048_mean 129 ns 128 ns 10
std::string copy{str_with_len_N};/2048_median 129 ns 126 ns 10
std::string copy{str_with_len_N};/2048_stddev 4.47 ns 5.43 ns 10
std::string copy{str_with_len_N};/2048_cv 3.46 % 4.26 % 10
std::string copy{str_with_len_N};/4096_mean 177 ns 174 ns 10
std::string copy{str_with_len_N};/4096_median 177 ns 174 ns 10
std::string copy{str_with_len_N};/4096_stddev 3.85 ns 3.68 ns 10
std::string copy{str_with_len_N};/4096_cv 2.17 % 2.11 % 10
stringa copy{str_with_len_N};/15_mean 4.05 ns 4.02 ns 10
stringa copy{str_with_len_N};/15_median 4.03 ns 4.01 ns 10
stringa copy{str_with_len_N};/15_stddev 0.115 ns 0.104 ns 10
stringa copy{str_with_len_N};/15_cv 2.85 % 2.60 % 10
stringa copy{str_with_len_N};/16_mean 4.03 ns 4.02 ns 10
stringa copy{str_with_len_N};/16_median 4.01 ns 4.00 ns 10
stringa copy{str_with_len_N};/16_stddev 0.090 ns 0.109 ns 10
stringa copy{str_with_len_N};/16_cv 2.22 % 2.72 % 10
stringa copy{str_with_len_N};/23_mean 4.10 ns 4.04 ns 10
stringa copy{str_with_len_N};/23_median 4.05 ns 4.04 ns 10
stringa copy{str_with_len_N};/23_stddev 0.096 ns 0.048 ns 10
stringa copy{str_with_len_N};/23_cv 2.34 % 1.18 % 10
stringa copy{str_with_len_N};/24_mean 18.5 ns 18.4 ns 10
stringa copy{str_with_len_N};/24_median 18.5 ns 18.4 ns 10
stringa copy{str_with_len_N};/24_stddev 0.254 ns 0.218 ns 10
stringa copy{str_with_len_N};/24_cv 1.37 % 1.19 % 10
stringa copy{str_with_len_N};/32_mean 18.5 ns 18.4 ns 10
stringa copy{str_with_len_N};/32_median 18.5 ns 18.4 ns 10
stringa copy{str_with_len_N};/32_stddev 0.251 ns 0.313 ns 10
stringa copy{str_with_len_N};/32_cv 1.35 % 1.70 % 10
stringa copy{str_with_len_N};/64_mean 18.6 ns 18.5 ns 10
stringa copy{str_with_len_N};/64_median 18.5 ns 18.4 ns 10
stringa copy{str_with_len_N};/64_stddev 0.532 ns 0.385 ns 10
stringa copy{str_with_len_N};/64_cv 2.85 % 2.08 % 10
stringa copy{str_with_len_N};/128_mean 18.5 ns 18.1 ns 10
stringa copy{str_with_len_N};/128_median 18.5 ns 18.0 ns 10
stringa copy{str_with_len_N};/128_stddev 0.403 ns 0.316 ns 10
stringa copy{str_with_len_N};/128_cv 2.18 % 1.74 % 10
stringa copy{str_with_len_N};/256_mean 18.5 ns 18.4 ns 10
stringa copy{str_with_len_N};/256_median 18.5 ns 18.4 ns 10
stringa copy{str_with_len_N};/256_stddev 0.340 ns 0.366 ns 10
stringa copy{str_with_len_N};/256_cv 1.84 % 1.99 % 10
stringa copy{str_with_len_N};/512_mean 18.4 ns 18.2 ns 10
stringa copy{str_with_len_N};/512_median 18.3 ns 18.2 ns 10
stringa copy{str_with_len_N};/512_stddev 0.276 ns 0.293 ns 10
stringa copy{str_with_len_N};/512_cv 1.50 % 1.60 % 10
stringa copy{str_with_len_N};/1024_mean 18.9 ns 18.8 ns 10
stringa copy{str_with_len_N};/1024_median 18.7 ns 18.6 ns 10
stringa copy{str_with_len_N};/1024_stddev 0.739 ns 0.711 ns 10
stringa copy{str_with_len_N};/1024_cv 3.91 % 3.78 % 10
stringa copy{str_with_len_N};/2048_mean 18.4 ns 18.2 ns 10
stringa copy{str_with_len_N};/2048_median 18.3 ns 18.0 ns 10
stringa copy{str_with_len_N};/2048_stddev 0.265 ns 0.296 ns 10
stringa copy{str_with_len_N};/2048_cv 1.44 % 1.63 % 10
stringa copy{str_with_len_N};/4096_mean 18.3 ns 18.3 ns 10
stringa copy{str_with_len_N};/4096_median 18.3 ns 18.4 ns 10
stringa copy{str_with_len_N};/4096_stddev 0.201 ns 0.324 ns 10
stringa copy{str_with_len_N};/4096_cv 1.10 % 1.77 % 10
lstringa<16> copy{str_with_len_N};/15_mean 7.84 ns 7.80 ns 10
lstringa<16> copy{str_with_len_N};/15_median 7.79 ns 7.85 ns 10
lstringa<16> copy{str_with_len_N};/15_stddev 0.204 ns 0.118 ns 10
lstringa<16> copy{str_with_len_N};/15_cv 2.60 % 1.51 % 10
lstringa<16> copy{str_with_len_N};/16_mean 7.89 ns 7.78 ns 10
lstringa<16> copy{str_with_len_N};/16_median 7.82 ns 7.74 ns 10
lstringa<16> copy{str_with_len_N};/16_stddev 0.209 ns 0.132 ns 10
lstringa<16> copy{str_with_len_N};/16_cv 2.65 % 1.70 % 10
lstringa<16> copy{str_with_len_N};/23_mean 7.73 ns 7.71 ns 10
lstringa<16> copy{str_with_len_N};/23_median 7.68 ns 7.67 ns 10
lstringa<16> copy{str_with_len_N};/23_stddev 0.151 ns 0.138 ns 10
lstringa<16> copy{str_with_len_N};/23_cv 1.96 % 1.78 % 10
lstringa<16> copy{str_with_len_N};/24_mean 82.1 ns 81.6 ns 10
lstringa<16> copy{str_with_len_N};/24_median 81.9 ns 81.6 ns 10
lstringa<16> copy{str_with_len_N};/24_stddev 3.09 ns 2.96 ns 10
lstringa<16> copy{str_with_len_N};/24_cv 3.76 % 3.63 % 10
lstringa<16> copy{str_with_len_N};/32_mean 84.1 ns 83.7 ns 10
lstringa<16> copy{str_with_len_N};/32_median 83.9 ns 83.7 ns 10
lstringa<16> copy{str_with_len_N};/32_stddev 1.82 ns 1.42 ns 10
lstringa<16> copy{str_with_len_N};/32_cv 2.16 % 1.70 % 10
lstringa<16> copy{str_with_len_N};/64_mean 84.8 ns 84.2 ns 10
lstringa<16> copy{str_with_len_N};/64_median 82.9 ns 82.0 ns 10
lstringa<16> copy{str_with_len_N};/64_stddev 4.78 ns 4.87 ns 10
lstringa<16> copy{str_with_len_N};/64_cv 5.63 % 5.78 % 10
lstringa<16> copy{str_with_len_N};/128_mean 84.7 ns 83.7 ns 10
lstringa<16> copy{str_with_len_N};/128_median 83.8 ns 83.7 ns 10
lstringa<16> copy{str_with_len_N};/128_stddev 2.94 ns 2.61 ns 10
lstringa<16> copy{str_with_len_N};/128_cv 3.47 % 3.12 % 10
lstringa<16> copy{str_with_len_N};/256_mean 649 ns 646 ns 10
lstringa<16> copy{str_with_len_N};/256_median 643 ns 642 ns 10
lstringa<16> copy{str_with_len_N};/256_stddev 15.9 ns 11.5 ns 10
lstringa<16> copy{str_with_len_N};/256_cv 2.45 % 1.78 % 10
lstringa<16> copy{str_with_len_N};/512_mean 91.6 ns 89.8 ns 10
lstringa<16> copy{str_with_len_N};/512_median 89.9 ns 87.9 ns 10
lstringa<16> copy{str_with_len_N};/512_stddev 4.09 ns 3.62 ns 10
lstringa<16> copy{str_with_len_N};/512_cv 4.47 % 4.03 % 10
lstringa<16> copy{str_with_len_N};/1024_mean 96.2 ns 95.8 ns 10
lstringa<16> copy{str_with_len_N};/1024_median 97.3 ns 96.3 ns 10
lstringa<16> copy{str_with_len_N};/1024_stddev 2.69 ns 1.92 ns 10
lstringa<16> copy{str_with_len_N};/1024_cv 2.80 % 2.01 % 10
lstringa<16> copy{str_with_len_N};/2048_mean 128 ns 127 ns 10
lstringa<16> copy{str_with_len_N};/2048_median 129 ns 126 ns 10
lstringa<16> copy{str_with_len_N};/2048_stddev 5.41 ns 5.62 ns 10
lstringa<16> copy{str_with_len_N};/2048_cv 4.21 % 4.43 % 10
lstringa<16> copy{str_with_len_N};/4096_mean 185 ns 182 ns 10
lstringa<16> copy{str_with_len_N};/4096_median 185 ns 182 ns 10
lstringa<16> copy{str_with_len_N};/4096_stddev 4.32 ns 6.00 ns 10
lstringa<16> copy{str_with_len_N};/4096_cv 2.34 % 3.30 % 10
lstringa<512> copy{str_with_len_N};/15_mean 8.54 ns 8.43 ns 10
lstringa<512> copy{str_with_len_N};/15_median 8.50 ns 8.37 ns 10
lstringa<512> copy{str_with_len_N};/15_stddev 0.107 ns 0.141 ns 10
lstringa<512> copy{str_with_len_N};/15_cv 1.25 % 1.67 % 10
lstringa<512> copy{str_with_len_N};/16_mean 8.63 ns 8.62 ns 10
lstringa<512> copy{str_with_len_N};/16_median 8.50 ns 8.51 ns 10
lstringa<512> copy{str_with_len_N};/16_stddev 0.377 ns 0.420 ns 10
lstringa<512> copy{str_with_len_N};/16_cv 4.37 % 4.87 % 10
lstringa<512> copy{str_with_len_N};/23_mean 8.58 ns 8.50 ns 10
lstringa<512> copy{str_with_len_N};/23_median 8.56 ns 8.58 ns 10
lstringa<512> copy{str_with_len_N};/23_stddev 0.136 ns 0.108 ns 10
lstringa<512> copy{str_with_len_N};/23_cv 1.59 % 1.27 % 10
lstringa<512> copy{str_with_len_N};/24_mean 8.55 ns 8.52 ns 10
lstringa<512> copy{str_with_len_N};/24_median 8.49 ns 8.48 ns 10
lstringa<512> copy{str_with_len_N};/24_stddev 0.246 ns 0.280 ns 10
lstringa<512> copy{str_with_len_N};/24_cv 2.87 % 3.29 % 10
lstringa<512> copy{str_with_len_N};/32_mean 11.5 ns 11.4 ns 10
lstringa<512> copy{str_with_len_N};/32_median 11.4 ns 11.4 ns 10
lstringa<512> copy{str_with_len_N};/32_stddev 0.298 ns 0.244 ns 10
lstringa<512> copy{str_with_len_N};/32_cv 2.59 % 2.14 % 10
lstringa<512> copy{str_with_len_N};/64_mean 11.9 ns 11.7 ns 10
lstringa<512> copy{str_with_len_N};/64_median 11.9 ns 11.7 ns 10
lstringa<512> copy{str_with_len_N};/64_stddev 0.441 ns 0.382 ns 10
lstringa<512> copy{str_with_len_N};/64_cv 3.71 % 3.27 % 10
lstringa<512> copy{str_with_len_N};/128_mean 12.1 ns 11.8 ns 10
lstringa<512> copy{str_with_len_N};/128_median 12.1 ns 11.7 ns 10
lstringa<512> copy{str_with_len_N};/128_stddev 0.349 ns 0.328 ns 10
lstringa<512> copy{str_with_len_N};/128_cv 2.89 % 2.77 % 10
lstringa<512> copy{str_with_len_N};/256_mean 13.0 ns 12.8 ns 10
lstringa<512> copy{str_with_len_N};/256_median 12.9 ns 12.9 ns 10
lstringa<512> copy{str_with_len_N};/256_stddev 0.254 ns 0.386 ns 10
lstringa<512> copy{str_with_len_N};/256_cv 1.96 % 3.01 % 10
lstringa<512> copy{str_with_len_N};/512_mean 14.3 ns 14.3 ns 10
lstringa<512> copy{str_with_len_N};/512_median 14.3 ns 14.3 ns 10
lstringa<512> copy{str_with_len_N};/512_stddev 0.162 ns 0.219 ns 10
lstringa<512> copy{str_with_len_N};/512_cv 1.13 % 1.54 % 10
lstringa<512> copy{str_with_len_N};/1024_mean 97.2 ns 97.3 ns 10
lstringa<512> copy{str_with_len_N};/1024_median 95.8 ns 96.3 ns 10
lstringa<512> copy{str_with_len_N};/1024_stddev 3.21 ns 3.45 ns 10
lstringa<512> copy{str_with_len_N};/1024_cv 3.30 % 3.55 % 10
lstringa<512> copy{str_with_len_N};/2048_mean 127 ns 126 ns 10
lstringa<512> copy{str_with_len_N};/2048_median 125 ns 123 ns 10
lstringa<512> copy{str_with_len_N};/2048_stddev 6.82 ns 7.42 ns 10
lstringa<512> copy{str_with_len_N};/2048_cv 5.38 % 5.88 % 10
lstringa<512> copy{str_with_len_N};/4096_mean 186 ns 184 ns 10
lstringa<512> copy{str_with_len_N};/4096_median 187 ns 184 ns 10
lstringa<512> copy{str_with_len_N};/4096_stddev 6.34 ns 7.34 ns 10
lstringa<512> copy{str_with_len_N};/4096_cv 3.41 % 3.99 % 10
----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 32.2 ns 32.1 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 31.9 ns 32.1 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.839 ns 0.870 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 2.60 % 2.71 % 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 13.8 ns 13.7 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 13.7 ns 13.7 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.442 ns 0.359 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 3.21 % 2.62 % 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 15.7 ns 15.7 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 15.5 ns 15.5 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.567 ns 0.531 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 3.61 % 3.39 % 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 15.1 ns 14.9 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 15.0 ns 14.8 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.325 ns 0.449 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 2.16 % 3.00 % 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 16.1 ns 15.9 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 16.1 ns 15.9 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.287 ns 0.287 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.79 % 1.80 % 10
----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 35.1 ns 34.8 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 34.9 ns 34.5 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 1.07 ns 1.04 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 3.04 % 2.97 % 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 9.56 ns 9.52 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 9.46 ns 9.42 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.246 ns 0.320 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 2.57 % 3.37 % 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 13.5 ns 13.1 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 13.3 ns 13.2 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.431 ns 0.212 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 3.20 % 1.62 % 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 13.0 ns 12.8 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 12.8 ns 12.8 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.294 ns 0.263 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 2.27 % 2.05 % 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 13.3 ns 13.2 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 13.1 ns 13.1 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.427 ns 0.256 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 3.22 % 1.95 % 10
----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 45.3 ns 44.8 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 45.3 ns 44.9 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.32 ns 0.971 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 2.92 % 2.17 % 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 19.7 ns 19.5 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 19.6 ns 19.3 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.325 ns 0.356 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 1.65 % 1.83 % 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 17.7 ns 17.5 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 17.7 ns 17.6 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.306 ns 0.282 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 1.73 % 1.62 % 10
----- 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 102 ns 101 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 101 ns 100 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 2.49 ns 2.76 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 2.44 % 2.73 % 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 76.5 ns 76.2 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 75.7 ns 75.9 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 2.73 ns 2.73 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 3.57 % 3.59 % 10
ssa s = "1234.567e10"; double res = *s.to_double()_mean 36.6 ns 36.3 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_median 36.1 ns 36.1 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 1.09 ns 0.986 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.99 % 2.72 % 10
-- 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 5705 ns 5706 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_median 5476 ns 5511 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 425 ns 443 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 7.44 % 7.77 % 10
std::string str; ... str += "abbaabbaabbaabba";_mean 1288 ns 1278 ns 10
std::string str; ... str += "abbaabbaabbaabba";_median 1272 ns 1270 ns 10
std::string str; ... str += "abbaabbaabbaabba";_stddev 52.8 ns 48.9 ns 10
std::string str; ... str += "abbaabbaabbaabba";_cv 4.10 % 3.82 % 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 923 ns 911 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 915 ns 903 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 34.1 ns 28.3 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 3.69 % 3.11 % 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 531 ns 527 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 525 ns 523 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 14.9 ns 16.6 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 2.81 % 3.14 % 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 349 ns 346 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 348 ns 345 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 5.90 ns 5.66 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 1.69 % 1.64 % 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 234 ns 232 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 234 ns 229 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 4.73 ns 4.75 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.02 % 2.05 % 10
-- 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 5637 ns 5500 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 5631 ns 5469 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 259 ns 123 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 4.60 % 2.24 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 3881 ns 3845 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 3863 ns 3836 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 85.9 ns 49.5 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 2.21 % 1.29 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 839 ns 828 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 835 ns 828 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.8 ns 18.8 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.24 % 2.27 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 533 ns 527 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 526 ns 523 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 27.6 ns 23.4 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.18 % 4.43 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 387 ns 379 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 390 ns 377 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 13.0 ns 11.8 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.35 % 3.13 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 285 ns 279 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 286 ns 276 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 9.43 ns 10.1 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.31 % 3.62 % 10
-- 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 274181 ns 271821 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 272079 ns 269938 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 6678 ns 7279 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 2.44 % 2.68 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 196295 ns 193795 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 196074 ns 192540 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 5109 ns 6559 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.60 % 3.38 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 23926 ns 23242 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 23566 ns 22949 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1393 ns 573 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.82 % 2.47 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 22113 ns 21777 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22164 ns 21484 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 539 ns 573 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.44 % 2.63 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 23784 ns 23646 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 23238 ns 23019 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 1312 ns 1369 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.51 % 5.79 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 22963 ns 22851 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22728 ns 22670 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 784 ns 805 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 3.42 % 3.52 % 10
-- 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 5373 ns 5281 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_median 5528 ns 5234 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_stddev 262 ns 231 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_cv 4.88 % 4.37 % 10
std::string str; ... str += str_var1 + str_var2;_mean 3964 ns 3889 ns 10
std::string str; ... str += str_var1 + str_var2;_median 3945 ns 3861 ns 10
std::string str; ... str += str_var1 + str_var2;_stddev 102 ns 89.3 ns 10
std::string str; ... str += str_var1 + str_var2;_cv 2.57 % 2.30 % 10
lstringa<16> str; ... str += str_var1 + str_var2;_mean 932 ns 914 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_median 922 ns 889 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 45.8 ns 47.4 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_cv 4.91 % 5.18 % 10
lstringa<128> str; ... str += str_var1 + str_var2;_mean 597 ns 596 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_median 596 ns 600 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 9.11 ns 9.42 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_cv 1.53 % 1.58 % 10
lstringa<512> str; ... str += str_var1 + str_var2;_mean 449 ns 448 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_median 446 ns 449 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 7.41 ns 9.71 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_cv 1.65 % 2.17 % 10
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 353 ns 350 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_median 351 ns 349 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 6.61 ns 8.67 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.87 % 2.48 % 10
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 11252 ns 11143 ns 10
std::stringstream str; str << "test = " << k << " times";_median 11193 ns 10986 ns 10
std::stringstream str; str << "test = " << k << " times";_stddev 294 ns 398 ns 10
std::stringstream str; str << "test = " << k << " times";_cv 2.61 % 3.58 % 10
std::string str = "test = " + std::to_string(k) + " times";_mean 1222 ns 1216 ns 10
std::string str = "test = " + std::to_string(k) + " times";_median 1221 ns 1221 ns 10
std::string str = "test = " + std::to_string(k) + " times";_stddev 22.2 ns 22.4 ns 10
std::string str = "test = " + std::to_string(k) + " times";_cv 1.82 % 1.85 % 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2807 ns 2800 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2814 ns 2825 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 48.0 ns 43.9 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 1.71 % 1.57 % 10
std::string str = std::format("test = {} times", k);_mean 2421 ns 2412 ns 10
std::string str = std::format("test = {} times", k);_median 2380 ns 2407 ns 10
std::string str = std::format("test = {} times", k);_stddev 88.1 ns 71.7 ns 10
std::string str = std::format("test = {} times", k);_cv 3.64 % 2.97 % 10
lstringa<8> str; str.format("test = {} times", k);_mean 2671 ns 2633 ns 10
lstringa<8> str; str.format("test = {} times", k);_median 2648 ns 2609 ns 10
lstringa<8> str; str.format("test = {} times", k);_stddev 70.0 ns 50.0 ns 10
lstringa<8> str; str.format("test = {} times", k);_cv 2.62 % 1.90 % 10
lstringa<32> str; str.format("test = {} times", k);_mean 1531 ns 1523 ns 10
lstringa<32> str; str.format("test = {} times", k);_median 1522 ns 1515 ns 10
lstringa<32> str; str.format("test = {} times", k);_stddev 32.6 ns 44.5 ns 10
lstringa<32> str; str.format("test = {} times", k);_cv 2.13 % 2.92 % 10
lstringa<8> str = "test = " + k + " times";_mean 880 ns 872 ns 10
lstringa<8> str = "test = " + k + " times";_median 880 ns 872 ns 10
lstringa<8> str = "test = " + k + " times";_stddev 19.1 ns 16.4 ns 10
lstringa<8> str = "test = " + k + " times";_cv 2.17 % 1.89 % 10
lstringa<32> str = "test = " + k + " times";_mean 187 ns 182 ns 10
lstringa<32> str = "test = " + k + " times";_median 188 ns 181 ns 10
lstringa<32> str = "test = " + k + " times";_stddev 5.30 ns 4.63 ns 10
lstringa<32> str = "test = " + k + " times";_cv 2.84 % 2.54 % 10
stringa str = "test = " + k + " times";_mean 236 ns 234 ns 10
stringa str = "test = " + k + " times";_median 231 ns 232 ns 10
stringa str = "test = " + k + " times";_stddev 10.9 ns 9.21 ns 10
stringa str = "test = " + k + " times";_cv 4.62 % 3.93 % 10
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 550 ns 539 ns 10
std::string::find + substr + std::strtol_median 544 ns 530 ns 10
std::string::find + substr + std::strtol_stddev 21.9 ns 13.5 ns 10
std::string::find + substr + std::strtol_cv 3.99 % 2.50 % 10
ssa::splitter + ssa::as_int_mean 303 ns 300 ns 10
ssa::splitter + ssa::as_int_median 303 ns 295 ns 10
ssa::splitter + ssa::as_int_stddev 15.1 ns 17.4 ns 10
ssa::splitter + ssa::as_int_cv 4.98 % 5.80 % 10
ssa::splitf + functor_mean 217 ns 214 ns 10
ssa::splitf + functor_median 217 ns 212 ns 10
ssa::splitf + functor_stddev 5.38 ns 6.73 ns 10
ssa::splitf + functor_cv 2.49 % 3.15 % 10
-- 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 1298 ns 1292 ns 10
Naive (and wrong) replace symbols with std::string find + replace_median 1287 ns 1270 ns 10
Naive (and wrong) replace symbols with std::string find + replace_stddev 82.0 ns 86.3 ns 10
Naive (and wrong) replace symbols with std::string find + replace_cv 6.32 % 6.68 % 10
replace symbols with std::string find_first_of + replace_mean 2231 ns 2212 ns 10
replace symbols with std::string find_first_of + replace_median 2235 ns 2197 ns 10
replace symbols with std::string find_first_of + replace_stddev 86.8 ns 97.8 ns 10
replace symbols with std::string find_first_of + replace_cv 3.89 % 4.42 % 10
replace symbols with std::string_view find_first_of + copy_mean 2520 ns 2517 ns 10
replace symbols with std::string_view find_first_of + copy_median 2524 ns 2511 ns 10
replace symbols with std::string_view find_first_of + copy_stddev 31.7 ns 31.7 ns 10
replace symbols with std::string_view find_first_of + copy_cv 1.26 % 1.26 % 10
replace runtime symbols with string expressions and without remembering all search results_mean 1580 ns 1573 ns 10
replace runtime symbols with string expressions and without remembering all search results_median 1559 ns 1554 ns 10
replace runtime symbols with string expressions and without remembering all search results_stddev 51.1 ns 56.2 ns 10
replace runtime symbols with string expressions and without remembering all search results_cv 3.23 % 3.58 % 10
replace runtime symbols with simstr and memorization of all search results_mean 1389 ns 1384 ns 10
replace runtime symbols with simstr and memorization of all search results_median 1377 ns 1381 ns 10
replace runtime symbols with simstr and memorization of all search results_stddev 36.5 ns 31.2 ns 10
replace runtime symbols with simstr and memorization of all search results_cv 2.63 % 2.25 % 10
replace const symbols with string expressions and without remembering all search results_mean 1283 ns 1271 ns 10
replace const symbols with string expressions and without remembering all search results_median 1270 ns 1256 ns 10
replace const symbols with string expressions and without remembering all search results_stddev 31.2 ns 22.2 ns 10
replace const symbols with string expressions and without remembering all search results_cv 2.43 % 1.75 % 10
replace const symbols with string expressions and memorization of all search results_mean 1242 ns 1233 ns 10
replace const symbols with string expressions and memorization of all search results_median 1240 ns 1228 ns 10
replace const symbols with string expressions and memorization of all search results_stddev 39.7 ns 31.7 ns 10
replace const symbols with string expressions and memorization of all search results_cv 3.20 % 2.57 % 10
-- 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 339 ns 338 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_median 335 ns 338 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 9.07 ns 6.26 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_cv 2.67 % 1.86 % 10
Short replace symbols with std::string find_first_of + replace_mean 431 ns 429 ns 10
Short replace symbols with std::string find_first_of + replace_median 429 ns 425 ns 10
Short replace symbols with std::string find_first_of + replace_stddev 15.6 ns 15.2 ns 10
Short replace symbols with std::string find_first_of + replace_cv 3.63 % 3.55 % 10
Short replace symbols with std::string_view find_first_of + copy_mean 357 ns 356 ns 10
Short replace symbols with std::string_view find_first_of + copy_median 356 ns 356 ns 10
Short replace symbols with std::string_view find_first_of + copy_stddev 8.94 ns 9.86 ns 10
Short replace symbols with std::string_view find_first_of + copy_cv 2.50 % 2.77 % 10
Short replace runtime symbols with string expressions and without remembering all search results_mean 315 ns 313 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_median 313 ns 311 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_stddev 8.27 ns 7.56 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_cv 2.62 % 2.41 % 10
Short replace runtime symbols with simstr and memorization of all search results_mean 393 ns 390 ns 10
Short replace runtime symbols with simstr and memorization of all search results_median 386 ns 388 ns 10
Short replace runtime symbols with simstr and memorization of all search results_stddev 14.7 ns 8.27 ns 10
Short replace runtime symbols with simstr and memorization of all search results_cv 3.74 % 2.12 % 10
Short replace const symbols with string expressions and without remembering all search results_mean 253 ns 250 ns 10
Short replace const symbols with string expressions and without remembering all search results_median 254 ns 249 ns 10
Short replace const symbols with string expressions and without remembering all search results_stddev 8.12 ns 7.82 ns 10
Short replace const symbols with string expressions and without remembering all search results_cv 3.21 % 3.13 % 10
Short replace const symbols with string expressions and memorization of all search results_mean 359 ns 352 ns 10
Short replace const symbols with string expressions and memorization of all search results_median 359 ns 352 ns 10
Short replace const symbols with string expressions and memorization of all search results_stddev 12.2 ns 9.21 ns 10
Short replace const symbols with string expressions and memorization of all search results_cv 3.41 % 2.61 % 10
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 251 ns 247 ns 10
replace bb to ---- in std::string|64_median 250 ns 248 ns 10
replace bb to ---- in std::string|64_stddev 10.6 ns 8.74 ns 10
replace bb to ---- in std::string|64_cv 4.24 % 3.54 % 10
replace bb to ---- in std::string|256_mean 825 ns 814 ns 10
replace bb to ---- in std::string|256_median 835 ns 802 ns 10
replace bb to ---- in std::string|256_stddev 29.2 ns 26.1 ns 10
replace bb to ---- in std::string|256_cv 3.54 % 3.20 % 10
replace bb to ---- in std::string|512_mean 1501 ns 1482 ns 10
replace bb to ---- in std::string|512_median 1483 ns 1475 ns 10
replace bb to ---- in std::string|512_stddev 55.0 ns 32.4 ns 10
replace bb to ---- in std::string|512_cv 3.67 % 2.19 % 10
replace bb to ---- in std::string|1024_mean 3319 ns 3289 ns 10
replace bb to ---- in std::string|1024_median 3344 ns 3333 ns 10
replace bb to ---- in std::string|1024_stddev 93.5 ns 94.2 ns 10
replace bb to ---- in std::string|1024_cv 2.82 % 2.87 % 10
replace bb to ---- in std::string|2048_mean 8393 ns 8119 ns 10
replace bb to ---- in std::string|2048_median 8442 ns 8161 ns 10
replace bb to ---- in std::string|2048_stddev 245 ns 276 ns 10
replace bb to ---- in std::string|2048_cv 2.92 % 3.39 % 10
replace bb to ---- in lstringa<8>|64_mean 330 ns 325 ns 10
replace bb to ---- in lstringa<8>|64_median 329 ns 326 ns 10
replace bb to ---- in lstringa<8>|64_stddev 7.25 ns 5.12 ns 10
replace bb to ---- in lstringa<8>|64_cv 2.20 % 1.57 % 10
replace bb to ---- in lstringa<8>|256_mean 692 ns 681 ns 10
replace bb to ---- in lstringa<8>|256_median 694 ns 677 ns 10
replace bb to ---- in lstringa<8>|256_stddev 33.0 ns 31.4 ns 10
replace bb to ---- in lstringa<8>|256_cv 4.78 % 4.61 % 10
replace bb to ---- in lstringa<8>|512_mean 1154 ns 1133 ns 10
replace bb to ---- in lstringa<8>|512_median 1142 ns 1123 ns 10
replace bb to ---- in lstringa<8>|512_stddev 32.8 ns 12.6 ns 10
replace bb to ---- in lstringa<8>|512_cv 2.84 % 1.11 % 10
replace bb to ---- in lstringa<8>|1024_mean 2102 ns 2049 ns 10
replace bb to ---- in lstringa<8>|1024_median 2110 ns 2018 ns 10
replace bb to ---- in lstringa<8>|1024_stddev 83.2 ns 66.9 ns 10
replace bb to ---- in lstringa<8>|1024_cv 3.96 % 3.26 % 10
replace bb to ---- in lstringa<8>|2048_mean 3939 ns 3884 ns 10
replace bb to ---- in lstringa<8>|2048_median 3968 ns 3934 ns 10
replace bb to ---- in lstringa<8>|2048_stddev 92.9 ns 90.0 ns 10
replace bb to ---- in lstringa<8>|2048_cv 2.36 % 2.32 % 10
replace bb to ---- by init stringa|64_mean 209 ns 206 ns 10
replace bb to ---- by init stringa|64_median 208 ns 205 ns 10
replace bb to ---- by init stringa|64_stddev 9.63 ns 7.56 ns 10
replace bb to ---- by init stringa|64_cv 4.60 % 3.67 % 10
replace bb to ---- by init stringa|256_mean 485 ns 477 ns 10
replace bb to ---- by init stringa|256_median 485 ns 470 ns 10
replace bb to ---- by init stringa|256_stddev 14.8 ns 18.7 ns 10
replace bb to ---- by init stringa|256_cv 3.05 % 3.92 % 10
replace bb to ---- by init stringa|512_mean 1086 ns 1078 ns 10
replace bb to ---- by init stringa|512_median 1076 ns 1078 ns 10
replace bb to ---- by init stringa|512_stddev 17.4 ns 28.3 ns 10
replace bb to ---- by init stringa|512_cv 1.60 % 2.63 % 10
replace bb to ---- by init stringa|1024_mean 2232 ns 2226 ns 10
replace bb to ---- by init stringa|1024_median 2210 ns 2222 ns 10
replace bb to ---- by init stringa|1024_stddev 51.5 ns 49.9 ns 10
replace bb to ---- by init stringa|1024_cv 2.31 % 2.24 % 10
replace bb to ---- by init stringa|2048_mean 4615 ns 4541 ns 10
replace bb to ---- by init stringa|2048_median 4603 ns 4551 ns 10
replace bb to ---- by init stringa|2048_stddev 99.7 ns 121 ns 10
replace bb to ---- by init stringa|2048_cv 2.16 % 2.67 % 10
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 209 ns 207 ns 10
replace bb to -- in std::string|64_median 206 ns 207 ns 10
replace bb to -- in std::string|64_stddev 6.33 ns 4.45 ns 10
replace bb to -- in std::string|64_cv 3.04 % 2.15 % 10
replace bb to -- in std::string|256_mean 553 ns 548 ns 10
replace bb to -- in std::string|256_median 530 ns 530 ns 10
replace bb to -- in std::string|256_stddev 61.0 ns 55.0 ns 10
replace bb to -- in std::string|256_cv 11.03 % 10.04 % 10
replace bb to -- in std::string|512_mean 975 ns 971 ns 10
replace bb to -- in std::string|512_median 971 ns 963 ns 10
replace bb to -- in std::string|512_stddev 24.3 ns 26.5 ns 10
replace bb to -- in std::string|512_cv 2.50 % 2.73 % 10
replace bb to -- in std::string|1024_mean 1826 ns 1807 ns 10
replace bb to -- in std::string|1024_median 1812 ns 1803 ns 10
replace bb to -- in std::string|1024_stddev 36.9 ns 38.2 ns 10
replace bb to -- in std::string|1024_cv 2.02 % 2.11 % 10
replace bb to -- in std::string|2048_mean 3547 ns 3489 ns 10
replace bb to -- in std::string|2048_median 3532 ns 3449 ns 10
replace bb to -- in std::string|2048_stddev 60.2 ns 86.6 ns 10
replace bb to -- in std::string|2048_cv 1.70 % 2.48 % 10
replace bb to -- in lstringa<8>|64_mean 189 ns 189 ns 10
replace bb to -- in lstringa<8>|64_median 189 ns 188 ns 10
replace bb to -- in lstringa<8>|64_stddev 1.39 ns 3.09 ns 10
replace bb to -- in lstringa<8>|64_cv 0.73 % 1.64 % 10
replace bb to -- in lstringa<8>|256_mean 470 ns 464 ns 10
replace bb to -- in lstringa<8>|256_median 461 ns 460 ns 10
replace bb to -- in lstringa<8>|256_stddev 18.8 ns 18.1 ns 10
replace bb to -- in lstringa<8>|256_cv 4.00 % 3.90 % 10
replace bb to -- in lstringa<8>|512_mean 807 ns 802 ns 10
replace bb to -- in lstringa<8>|512_median 807 ns 802 ns 10
replace bb to -- in lstringa<8>|512_stddev 11.3 ns 16.4 ns 10
replace bb to -- in lstringa<8>|512_cv 1.40 % 2.05 % 10
replace bb to -- in lstringa<8>|1024_mean 1515 ns 1489 ns 10
replace bb to -- in lstringa<8>|1024_median 1490 ns 1500 ns 10
replace bb to -- in lstringa<8>|1024_stddev 62.7 ns 43.7 ns 10
replace bb to -- in lstringa<8>|1024_cv 4.14 % 2.93 % 10
replace bb to -- in lstringa<8>|2048_mean 2967 ns 2929 ns 10
replace bb to -- in lstringa<8>|2048_median 2937 ns 2883 ns 10
replace bb to -- in lstringa<8>|2048_stddev 134 ns 128 ns 10
replace bb to -- in lstringa<8>|2048_cv 4.53 % 4.37 % 10
replace bb to -- by init stringa|64_mean 179 ns 176 ns 10
replace bb to -- by init stringa|64_median 178 ns 176 ns 10
replace bb to -- by init stringa|64_stddev 3.89 ns 3.36 ns 10
replace bb to -- by init stringa|64_cv 2.18 % 1.91 % 10
replace bb to -- by init stringa|256_mean 392 ns 385 ns 10
replace bb to -- by init stringa|256_median 391 ns 385 ns 10
replace bb to -- by init stringa|256_stddev 13.1 ns 8.82 ns 10
replace bb to -- by init stringa|256_cv 3.34 % 2.29 % 10
replace bb to -- by init stringa|512_mean 642 ns 633 ns 10
replace bb to -- by init stringa|512_median 643 ns 635 ns 10
replace bb to -- by init stringa|512_stddev 21.2 ns 13.5 ns 10
replace bb to -- by init stringa|512_cv 3.30 % 2.13 % 10
replace bb to -- by init stringa|1024_mean 1151 ns 1138 ns 10
replace bb to -- by init stringa|1024_median 1144 ns 1144 ns 10
replace bb to -- by init stringa|1024_stddev 26.9 ns 34.3 ns 10
replace bb to -- by init stringa|1024_cv 2.34 % 3.01 % 10
replace bb to -- by init stringa|2048_mean 2264 ns 2223 ns 10
replace bb to -- by init stringa|2048_median 2276 ns 2197 ns 10
replace bb to -- by init stringa|2048_stddev 52.5 ns 37.0 ns 10
replace bb to -- by init stringa|2048_cv 2.32 % 1.66 % 10
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 4203983 ns 4208984 ns 10
hashStrMapA<size_t> emplace & find stringa;_median 4228262 ns 4199219 ns 10
hashStrMapA<size_t> emplace & find stringa;_stddev 226508 ns 222928 ns 10
hashStrMapA<size_t> emplace & find stringa;_cv 5.39 % 5.30 % 10
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 5344121 ns 5281250 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_median 5268283 ns 5312500 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 149555 ns 123252 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 2.80 % 2.33 % 10
hashStrMapA<size_t> emplace & find ssa;_mean 4011248 ns 3928073 ns 10
hashStrMapA<size_t> emplace & find ssa;_median 4025866 ns 3928073 ns 10
hashStrMapA<size_t> emplace & find ssa;_stddev 92509 ns 130125 ns 10
hashStrMapA<size_t> emplace & find ssa;_cv 2.31 % 3.31 % 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 6304499 ns 6236049 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 6292092 ns 6208147 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 163281 ns 114854 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 2.59 % 1.84 % 10
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 1645 ns 1627 ns 10
Build func full name std::string;_median 1625 ns 1611 ns 10
Build func full name std::string;_stddev 59.7 ns 41.2 ns 10
Build func full name std::string;_cv 3.63 % 2.54 % 10
Build func full name std::string 1;_mean 1711 ns 1692 ns 10
Build func full name std::string 1;_median 1687 ns 1669 ns 10
Build func full name std::string 1;_stddev 73.4 ns 73.4 ns 10
Build func full name std::string 1;_cv 4.29 % 4.34 % 10
Build func full name std::stream;_mean 10110 ns 10128 ns 10
Build func full name std::stream;_median 9848 ns 9835 ns 10
Build func full name std::stream;_stddev 970 ns 932 ns 10
Build func full name std::stream;_cv 9.59 % 9.20 % 10
Build func full name stringa;_mean 924 ns 910 ns 10
Build func full name stringa;_median 906 ns 902 ns 10
Build func full name stringa;_stddev 43.8 ns 24.8 ns 10
Build func full name stringa;_cv 4.74 % 2.73 % 10
Build func full name stringa 1;_mean 1020 ns 1002 ns 10
Build func full name stringa 1;_median 1020 ns 1004 ns 10
Build func full name stringa 1;_stddev 29.0 ns 23.0 ns 10
Build func full name stringa 1;_cv 2.85 % 2.30 % 10

View File

@ -1,870 +0,0 @@
Run on (32 X 2513.96 MHz CPU s)
Firefox: 146.0.1.60 webasm
--------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------
----- Concatenate string + Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and number by std to std::string_mean 925 ns 925 ns 10
Concat std::string and number by std to std::string_median 933 ns 933 ns 10
Concat std::string and number by std to std::string_stddev 46.4 ns 46.4 ns 10
Concat std::string and number by std to std::string_cv 5.01 % 5.01 % 10
Concat std::string and number by StrExpr to std::string_mean 415 ns 415 ns 10
Concat std::string and number by StrExpr to std::string_median 418 ns 418 ns 10
Concat std::string and number by StrExpr to std::string_stddev 14.1 ns 14.1 ns 10
Concat std::string and number by StrExpr to std::string_cv 3.39 % 3.39 % 10
Concat stringa and number by StrExpr to simstr::stringa_mean 211 ns 211 ns 10
Concat stringa and number by StrExpr to simstr::stringa_median 213 ns 213 ns 10
Concat stringa and number by StrExpr to simstr::stringa_stddev 11.8 ns 11.8 ns 10
Concat stringa and number by StrExpr to simstr::stringa_cv 5.56 % 5.56 % 10
----- Concatenate string + Hex Number + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string and hex number by std to std::string_mean 1446 ns 1446 ns 10
Concat std::string and hex number by std to std::string_median 1429 ns 1429 ns 10
Concat std::string and hex number by std to std::string_stddev 81.6 ns 81.6 ns 10
Concat std::string and hex number by std to std::string_cv 5.64 % 5.64 % 10
Concat std::string and hex number by StrExpr to std::string_mean 365 ns 365 ns 10
Concat std::string and hex number by StrExpr to std::string_median 367 ns 367 ns 10
Concat std::string and hex number by StrExpr to std::string_stddev 17.7 ns 17.7 ns 10
Concat std::string and hex number by StrExpr to std::string_cv 4.87 % 4.87 % 10
Concat stringa and hex number by StrExpr to simstr::stringa_mean 196 ns 196 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_median 188 ns 188 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_stddev 17.3 ns 17.3 ns 10
Concat stringa and hex number by StrExpr to simstr::stringa_cv 8.84 % 8.84 % 10
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 111 ns 111 ns 10
Concat std::string by std to std::string_median 109 ns 109 ns 10
Concat std::string by std to std::string_stddev 4.84 ns 4.84 ns 10
Concat std::string by std to std::string_cv 4.37 % 4.37 % 10
Concat std::string by StrExpr to std::string_mean 113 ns 113 ns 10
Concat std::string by StrExpr to std::string_median 113 ns 113 ns 10
Concat std::string by StrExpr to std::string_stddev 5.81 ns 5.80 ns 10
Concat std::string by StrExpr to std::string_cv 5.13 % 5.13 % 10
Concat stringa by StrExpr to stringa_mean 95.9 ns 95.9 ns 10
Concat stringa by StrExpr to stringa_median 95.0 ns 95.0 ns 10
Concat stringa by StrExpr to stringa_stddev 6.99 ns 6.99 ns 10
Concat stringa by StrExpr to stringa_cv 7.29 % 7.29 % 10
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 178 ns 178 ns 10
Find concat three std::string_median 174 ns 174 ns 10
Find concat three std::string_stddev 11.0 ns 11.0 ns 10
Find concat three std::string_cv 6.19 % 6.19 % 10
Find concat three strexpr_mean 106 ns 106 ns 10
Find concat three strexpr_median 105 ns 105 ns 10
Find concat three strexpr_stddev 3.62 ns 3.62 ns 10
Find concat three strexpr_cv 3.42 % 3.43 % 10
Find concat three simstr_mean 73.7 ns 73.7 ns 10
Find concat three simstr_median 73.7 ns 73.7 ns 10
Find concat three simstr_stddev 2.09 ns 2.08 ns 10
Find concat three simstr_cv 2.83 % 2.83 % 10
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 18.2 ns 18.2 ns 10
BuildTypeNameStr 0/0_median 18.5 ns 18.5 ns 10
BuildTypeNameStr 0/0_stddev 1.29 ns 1.29 ns 10
BuildTypeNameStr 0/0_cv 7.06 % 7.06 % 10
BuildTypeNameExp 0/0_mean 17.0 ns 17.0 ns 10
BuildTypeNameExp 0/0_median 17.1 ns 17.1 ns 10
BuildTypeNameExp 0/0_stddev 0.847 ns 0.847 ns 10
BuildTypeNameExp 0/0_cv 4.98 % 4.98 % 10
BuildTypeNameSim 0/0_mean 17.0 ns 17.0 ns 10
BuildTypeNameSim 0/0_median 16.7 ns 16.7 ns 10
BuildTypeNameSim 0/0_stddev 1.17 ns 1.17 ns 10
BuildTypeNameSim 0/0_cv 6.90 % 6.90 % 10
BuildTypeNameStr 10/10_mean 275 ns 275 ns 10
BuildTypeNameStr 10/10_median 276 ns 276 ns 10
BuildTypeNameStr 10/10_stddev 13.0 ns 13.0 ns 10
BuildTypeNameStr 10/10_cv 4.72 % 4.72 % 10
BuildTypeNameExp 10/10_mean 99.6 ns 99.6 ns 10
BuildTypeNameExp 10/10_median 101 ns 101 ns 10
BuildTypeNameExp 10/10_stddev 6.85 ns 6.85 ns 10
BuildTypeNameExp 10/10_cv 6.88 % 6.88 % 10
BuildTypeNameSim 10/10_mean 71.2 ns 71.2 ns 10
BuildTypeNameSim 10/10_median 69.2 ns 69.2 ns 10
BuildTypeNameSim 10/10_stddev 6.72 ns 6.72 ns 10
BuildTypeNameSim 10/10_cv 9.44 % 9.44 % 10
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 451 ns 451 ns 10
Concat with replace str_median 450 ns 450 ns 10
Concat with replace str_stddev 36.0 ns 36.0 ns 10
Concat with replace str_cv 7.98 % 7.98 % 10
Concat with replace exp_mean 248 ns 248 ns 10
Concat with replace exp_median 246 ns 246 ns 10
Concat with replace exp_stddev 15.1 ns 15.1 ns 10
Concat with replace exp_cv 6.07 % 6.07 % 10
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 2.18 ns 2.18 ns 10
std::string e;_median 2.18 ns 2.18 ns 10
std::string e;_stddev 0.025 ns 0.025 ns 10
std::string e;_cv 1.16 % 1.16 % 10
std::string_view e;_mean 0.993 ns 0.993 ns 10
std::string_view e;_median 0.994 ns 0.994 ns 10
std::string_view e;_stddev 0.012 ns 0.012 ns 10
std::string_view e;_cv 1.18 % 1.18 % 10
ssa e;_mean 0.952 ns 0.952 ns 10
ssa e;_median 0.952 ns 0.952 ns 10
ssa e;_stddev 0.008 ns 0.008 ns 10
ssa e;_cv 0.85 % 0.85 % 10
stringa e;_mean 2.19 ns 2.19 ns 10
stringa e;_median 2.18 ns 2.18 ns 10
stringa e;_stddev 0.048 ns 0.048 ns 10
stringa e;_cv 2.19 % 2.19 % 10
lstringa<20> e;_mean 2.26 ns 2.26 ns 10
lstringa<20> e;_median 2.27 ns 2.27 ns 10
lstringa<20> e;_stddev 0.039 ns 0.039 ns 10
lstringa<20> e;_cv 1.74 % 1.74 % 10
lstringa<40> e;_mean 2.60 ns 2.60 ns 10
lstringa<40> e;_median 2.60 ns 2.60 ns 10
lstringa<40> e;_stddev 0.032 ns 0.032 ns 10
lstringa<40> e;_cv 1.22 % 1.22 % 10
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 2.37 ns 2.37 ns 10
std::string e = "Test text";_median 2.37 ns 2.37 ns 10
std::string e = "Test text";_stddev 0.060 ns 0.060 ns 10
std::string e = "Test text";_cv 2.54 % 2.54 % 10
std::string_view e = "Test text";_mean 1.29 ns 1.29 ns 10
std::string_view e = "Test text";_median 1.27 ns 1.27 ns 10
std::string_view e = "Test text";_stddev 0.057 ns 0.057 ns 10
std::string_view e = "Test text";_cv 4.41 % 4.41 % 10
ssa e = "Test text";_mean 1.01 ns 1.01 ns 10
ssa e = "Test text";_median 1.00 ns 1.00 ns 10
ssa e = "Test text";_stddev 0.034 ns 0.034 ns 10
ssa e = "Test text";_cv 3.32 % 3.32 % 10
stringa e = "Test text";_mean 2.63 ns 2.63 ns 10
stringa e = "Test text";_median 2.63 ns 2.63 ns 10
stringa e = "Test text";_stddev 0.059 ns 0.059 ns 10
stringa e = "Test text";_cv 2.24 % 2.24 % 10
lstringa<20> e = "Test text";_mean 2.77 ns 2.77 ns 10
lstringa<20> e = "Test text";_median 2.77 ns 2.77 ns 10
lstringa<20> e = "Test text";_stddev 0.092 ns 0.092 ns 10
lstringa<20> e = "Test text";_cv 3.31 % 3.31 % 10
lstringa<40> e = "Test text";_mean 2.78 ns 2.78 ns 10
lstringa<40> e = "Test text";_median 2.78 ns 2.78 ns 10
lstringa<40> e = "Test text";_stddev 0.038 ns 0.038 ns 10
lstringa<40> e = "Test text";_cv 1.37 % 1.37 % 10
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 16.5 ns 16.5 ns 10
std::string e = "123456789012345678901234567890";_median 16.6 ns 16.6 ns 10
std::string e = "123456789012345678901234567890";_stddev 0.412 ns 0.412 ns 10
std::string e = "123456789012345678901234567890";_cv 2.50 % 2.50 % 10
std::string_view e = "123456789012345678901234567890";_mean 1.26 ns 1.26 ns 10
std::string_view e = "123456789012345678901234567890";_median 1.27 ns 1.27 ns 10
std::string_view e = "123456789012345678901234567890";_stddev 0.034 ns 0.034 ns 10
std::string_view e = "123456789012345678901234567890";_cv 2.66 % 2.66 % 10
ssa e = "123456789012345678901234567890";_mean 1.01 ns 1.01 ns 10
ssa e = "123456789012345678901234567890";_median 1.01 ns 1.01 ns 10
ssa e = "123456789012345678901234567890";_stddev 0.030 ns 0.030 ns 10
ssa e = "123456789012345678901234567890";_cv 3.03 % 3.03 % 10
stringa e = "123456789012345678901234567890";_mean 2.67 ns 2.67 ns 10
stringa e = "123456789012345678901234567890";_median 2.66 ns 2.66 ns 10
stringa e = "123456789012345678901234567890";_stddev 0.058 ns 0.058 ns 10
stringa e = "123456789012345678901234567890";_cv 2.15 % 2.15 % 10
lstringa<20> e = "123456789012345678901234567890";_mean 16.9 ns 16.9 ns 10
lstringa<20> e = "123456789012345678901234567890";_median 17.0 ns 17.0 ns 10
lstringa<20> e = "123456789012345678901234567890";_stddev 0.396 ns 0.395 ns 10
lstringa<20> e = "123456789012345678901234567890";_cv 2.34 % 2.33 % 10
lstringa<40> e = "123456789012345678901234567890";_mean 3.01 ns 3.01 ns 10
lstringa<40> e = "123456789012345678901234567890";_median 3.02 ns 3.02 ns 10
lstringa<40> e = "123456789012345678901234567890";_stddev 0.056 ns 0.056 ns 10
lstringa<40> e = "123456789012345678901234567890";_cv 1.85 % 1.85 % 10
----- Create copy of Str with 9 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text"; auto c{e};_mean 2.27 ns 2.27 ns 10
std::string e = "Test text"; auto c{e};_median 2.25 ns 2.25 ns 10
std::string e = "Test text"; auto c{e};_stddev 0.050 ns 0.050 ns 10
std::string e = "Test text"; auto c{e};_cv 2.19 % 2.19 % 10
std::string_view e = "Test text"; auto c{e};_mean 1.26 ns 1.26 ns 10
std::string_view e = "Test text"; auto c{e};_median 1.25 ns 1.25 ns 10
std::string_view e = "Test text"; auto c{e};_stddev 0.035 ns 0.035 ns 10
std::string_view e = "Test text"; auto c{e};_cv 2.77 % 2.77 % 10
ssa e = "Test text"; auto c{e};_mean 1.27 ns 1.27 ns 10
ssa e = "Test text"; auto c{e};_median 1.26 ns 1.26 ns 10
ssa e = "Test text"; auto c{e};_stddev 0.042 ns 0.042 ns 10
ssa e = "Test text"; auto c{e};_cv 3.31 % 3.31 % 10
stringa e = "Test text"; auto c{e};_mean 2.64 ns 2.64 ns 10
stringa e = "Test text"; auto c{e};_median 2.64 ns 2.64 ns 10
stringa e = "Test text"; auto c{e};_stddev 0.056 ns 0.056 ns 10
stringa e = "Test text"; auto c{e};_cv 2.12 % 2.12 % 10
lstringa<20> e = "Test text"; auto c{e};_mean 14.1 ns 14.1 ns 10
lstringa<20> e = "Test text"; auto c{e};_median 14.0 ns 14.0 ns 10
lstringa<20> e = "Test text"; auto c{e};_stddev 0.634 ns 0.634 ns 10
lstringa<20> e = "Test text"; auto c{e};_cv 4.49 % 4.49 % 10
lstringa<40> e = "Test text"; auto c{e};_mean 14.2 ns 14.2 ns 10
lstringa<40> e = "Test text"; auto c{e};_median 14.3 ns 14.3 ns 10
lstringa<40> e = "Test text"; auto c{e};_stddev 0.671 ns 0.671 ns 10
lstringa<40> e = "Test text"; auto c{e};_cv 4.73 % 4.73 % 10
----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890"; auto c{e};_mean 34.3 ns 34.3 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_median 34.4 ns 34.4 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 2.04 ns 2.04 ns 10
std::string e = "123456789012345678901234567890"; auto c{e};_cv 5.95 % 5.95 % 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 1.25 ns 1.25 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 1.24 ns 1.24 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.021 ns 0.021 ns 10
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.68 % 1.68 % 10
ssa e = "123456789012345678901234567890"; auto c{e};_mean 1.01 ns 1.01 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_median 1.01 ns 1.01 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.018 ns 0.018 ns 10
ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.78 % 1.78 % 10
stringa e = "123456789012345678901234567890"; auto c{e};_mean 2.66 ns 2.66 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_median 2.66 ns 2.66 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.041 ns 0.041 ns 10
stringa e = "123456789012345678901234567890"; auto c{e};_cv 1.53 % 1.53 % 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 17.2 ns 17.2 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 17.3 ns 17.3 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.371 ns 0.371 ns 10
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.15 % 2.15 % 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 13.9 ns 13.9 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 13.7 ns 13.7 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 1.21 ns 1.21 ns 10
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 8.68 % 8.68 % 10
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find;_mean 54.3 ns 54.3 ns 10
std::string::find;_median 54.4 ns 54.4 ns 10
std::string::find;_stddev 1.00 ns 1.00 ns 10
std::string::find;_cv 1.85 % 1.85 % 10
std::string_view::find;_mean 53.4 ns 53.4 ns 10
std::string_view::find;_median 53.3 ns 53.3 ns 10
std::string_view::find;_stddev 0.764 ns 0.764 ns 10
std::string_view::find;_cv 1.43 % 1.43 % 10
ssa::find;_mean 52.7 ns 52.7 ns 10
ssa::find;_median 52.9 ns 52.9 ns 10
ssa::find;_stddev 0.944 ns 0.944 ns 10
ssa::find;_cv 1.79 % 1.79 % 10
stringa::find;_mean 53.8 ns 53.8 ns 10
stringa::find;_median 53.7 ns 53.7 ns 10
stringa::find;_stddev 1.24 ns 1.24 ns 10
stringa::find;_cv 2.30 % 2.30 % 10
lstringa<20>::find;_mean 52.5 ns 52.5 ns 10
lstringa<20>::find;_median 52.3 ns 52.3 ns 10
lstringa<20>::find;_stddev 1.02 ns 1.02 ns 10
lstringa<20>::find;_cv 1.94 % 1.94 % 10
lstringa<40>::find;_mean 52.6 ns 52.6 ns 10
lstringa<40>::find;_median 52.8 ns 52.8 ns 10
lstringa<40>::find;_stddev 0.944 ns 0.944 ns 10
lstringa<40>::find;_cv 1.79 % 1.79 % 10
------- 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 35.9 ns 35.9 ns 10
std::string copy{str_with_len_N};/15_median 35.7 ns 35.7 ns 10
std::string copy{str_with_len_N};/15_stddev 2.19 ns 2.19 ns 10
std::string copy{str_with_len_N};/15_cv 6.10 % 6.10 % 10
std::string copy{str_with_len_N};/16_mean 35.4 ns 35.4 ns 10
std::string copy{str_with_len_N};/16_median 35.0 ns 35.0 ns 10
std::string copy{str_with_len_N};/16_stddev 2.38 ns 2.38 ns 10
std::string copy{str_with_len_N};/16_cv 6.72 % 6.72 % 10
std::string copy{str_with_len_N};/23_mean 36.3 ns 36.3 ns 10
std::string copy{str_with_len_N};/23_median 36.1 ns 36.1 ns 10
std::string copy{str_with_len_N};/23_stddev 2.00 ns 2.00 ns 10
std::string copy{str_with_len_N};/23_cv 5.51 % 5.51 % 10
std::string copy{str_with_len_N};/24_mean 35.6 ns 35.6 ns 10
std::string copy{str_with_len_N};/24_median 36.2 ns 36.2 ns 10
std::string copy{str_with_len_N};/24_stddev 2.33 ns 2.33 ns 10
std::string copy{str_with_len_N};/24_cv 6.53 % 6.53 % 10
std::string copy{str_with_len_N};/32_mean 39.4 ns 39.4 ns 10
std::string copy{str_with_len_N};/32_median 38.5 ns 38.5 ns 10
std::string copy{str_with_len_N};/32_stddev 3.37 ns 3.37 ns 10
std::string copy{str_with_len_N};/32_cv 8.55 % 8.55 % 10
std::string copy{str_with_len_N};/64_mean 39.6 ns 39.6 ns 10
std::string copy{str_with_len_N};/64_median 38.5 ns 38.5 ns 10
std::string copy{str_with_len_N};/64_stddev 3.59 ns 3.59 ns 10
std::string copy{str_with_len_N};/64_cv 9.06 % 9.06 % 10
std::string copy{str_with_len_N};/128_mean 41.3 ns 41.3 ns 10
std::string copy{str_with_len_N};/128_median 41.4 ns 41.4 ns 10
std::string copy{str_with_len_N};/128_stddev 2.50 ns 2.50 ns 10
std::string copy{str_with_len_N};/128_cv 6.05 % 6.05 % 10
std::string copy{str_with_len_N};/256_mean 58.6 ns 58.6 ns 10
std::string copy{str_with_len_N};/256_median 64.1 ns 64.1 ns 10
std::string copy{str_with_len_N};/256_stddev 13.0 ns 13.0 ns 10
std::string copy{str_with_len_N};/256_cv 22.24 % 22.24 % 10
std::string copy{str_with_len_N};/512_mean 53.9 ns 53.9 ns 10
std::string copy{str_with_len_N};/512_median 53.5 ns 53.5 ns 10
std::string copy{str_with_len_N};/512_stddev 11.7 ns 11.7 ns 10
std::string copy{str_with_len_N};/512_cv 21.69 % 21.69 % 10
std::string copy{str_with_len_N};/1024_mean 53.1 ns 53.1 ns 10
std::string copy{str_with_len_N};/1024_median 51.3 ns 51.3 ns 10
std::string copy{str_with_len_N};/1024_stddev 7.15 ns 7.15 ns 10
std::string copy{str_with_len_N};/1024_cv 13.46 % 13.46 % 10
std::string copy{str_with_len_N};/2048_mean 77.9 ns 77.9 ns 10
std::string copy{str_with_len_N};/2048_median 77.8 ns 77.8 ns 10
std::string copy{str_with_len_N};/2048_stddev 3.38 ns 3.38 ns 10
std::string copy{str_with_len_N};/2048_cv 4.34 % 4.34 % 10
std::string copy{str_with_len_N};/4096_mean 130 ns 130 ns 10
std::string copy{str_with_len_N};/4096_median 132 ns 132 ns 10
std::string copy{str_with_len_N};/4096_stddev 7.79 ns 7.79 ns 10
std::string copy{str_with_len_N};/4096_cv 5.99 % 5.99 % 10
stringa copy{str_with_len_N};/15_mean 2.64 ns 2.64 ns 10
stringa copy{str_with_len_N};/15_median 2.63 ns 2.63 ns 10
stringa copy{str_with_len_N};/15_stddev 0.060 ns 0.060 ns 10
stringa copy{str_with_len_N};/15_cv 2.26 % 2.27 % 10
stringa copy{str_with_len_N};/16_mean 4.98 ns 4.98 ns 10
stringa copy{str_with_len_N};/16_median 5.00 ns 5.00 ns 10
stringa copy{str_with_len_N};/16_stddev 0.113 ns 0.113 ns 10
stringa copy{str_with_len_N};/16_cv 2.27 % 2.27 % 10
stringa copy{str_with_len_N};/23_mean 5.00 ns 5.00 ns 10
stringa copy{str_with_len_N};/23_median 4.95 ns 4.95 ns 10
stringa copy{str_with_len_N};/23_stddev 0.234 ns 0.234 ns 10
stringa copy{str_with_len_N};/23_cv 4.68 % 4.68 % 10
stringa copy{str_with_len_N};/24_mean 5.02 ns 5.02 ns 10
stringa copy{str_with_len_N};/24_median 4.98 ns 4.98 ns 10
stringa copy{str_with_len_N};/24_stddev 0.122 ns 0.122 ns 10
stringa copy{str_with_len_N};/24_cv 2.43 % 2.43 % 10
stringa copy{str_with_len_N};/32_mean 4.98 ns 4.98 ns 10
stringa copy{str_with_len_N};/32_median 4.92 ns 4.92 ns 10
stringa copy{str_with_len_N};/32_stddev 0.146 ns 0.146 ns 10
stringa copy{str_with_len_N};/32_cv 2.93 % 2.93 % 10
stringa copy{str_with_len_N};/64_mean 4.94 ns 4.94 ns 10
stringa copy{str_with_len_N};/64_median 4.97 ns 4.97 ns 10
stringa copy{str_with_len_N};/64_stddev 0.094 ns 0.092 ns 10
stringa copy{str_with_len_N};/64_cv 1.90 % 1.87 % 10
stringa copy{str_with_len_N};/128_mean 4.99 ns 4.99 ns 10
stringa copy{str_with_len_N};/128_median 4.98 ns 4.98 ns 10
stringa copy{str_with_len_N};/128_stddev 0.139 ns 0.139 ns 10
stringa copy{str_with_len_N};/128_cv 2.79 % 2.79 % 10
stringa copy{str_with_len_N};/256_mean 4.90 ns 4.90 ns 10
stringa copy{str_with_len_N};/256_median 4.90 ns 4.90 ns 10
stringa copy{str_with_len_N};/256_stddev 0.092 ns 0.092 ns 10
stringa copy{str_with_len_N};/256_cv 1.89 % 1.89 % 10
stringa copy{str_with_len_N};/512_mean 5.01 ns 5.01 ns 10
stringa copy{str_with_len_N};/512_median 5.00 ns 5.00 ns 10
stringa copy{str_with_len_N};/512_stddev 0.119 ns 0.119 ns 10
stringa copy{str_with_len_N};/512_cv 2.37 % 2.37 % 10
stringa copy{str_with_len_N};/1024_mean 5.07 ns 5.07 ns 10
stringa copy{str_with_len_N};/1024_median 5.06 ns 5.06 ns 10
stringa copy{str_with_len_N};/1024_stddev 0.146 ns 0.146 ns 10
stringa copy{str_with_len_N};/1024_cv 2.87 % 2.87 % 10
stringa copy{str_with_len_N};/2048_mean 5.01 ns 5.01 ns 10
stringa copy{str_with_len_N};/2048_median 5.00 ns 5.00 ns 10
stringa copy{str_with_len_N};/2048_stddev 0.095 ns 0.095 ns 10
stringa copy{str_with_len_N};/2048_cv 1.91 % 1.91 % 10
stringa copy{str_with_len_N};/4096_mean 4.92 ns 4.92 ns 10
stringa copy{str_with_len_N};/4096_median 4.89 ns 4.89 ns 10
stringa copy{str_with_len_N};/4096_stddev 0.137 ns 0.137 ns 10
stringa copy{str_with_len_N};/4096_cv 2.80 % 2.80 % 10
lstringa<16> copy{str_with_len_N};/15_mean 14.1 ns 14.1 ns 10
lstringa<16> copy{str_with_len_N};/15_median 14.2 ns 14.2 ns 10
lstringa<16> copy{str_with_len_N};/15_stddev 0.738 ns 0.738 ns 10
lstringa<16> copy{str_with_len_N};/15_cv 5.24 % 5.24 % 10
lstringa<16> copy{str_with_len_N};/16_mean 14.6 ns 14.6 ns 10
lstringa<16> copy{str_with_len_N};/16_median 14.7 ns 14.7 ns 10
lstringa<16> copy{str_with_len_N};/16_stddev 0.858 ns 0.858 ns 10
lstringa<16> copy{str_with_len_N};/16_cv 5.88 % 5.88 % 10
lstringa<16> copy{str_with_len_N};/23_mean 31.6 ns 31.6 ns 10
lstringa<16> copy{str_with_len_N};/23_median 31.4 ns 31.4 ns 10
lstringa<16> copy{str_with_len_N};/23_stddev 1.59 ns 1.59 ns 10
lstringa<16> copy{str_with_len_N};/23_cv 5.04 % 5.04 % 10
lstringa<16> copy{str_with_len_N};/24_mean 30.9 ns 30.9 ns 10
lstringa<16> copy{str_with_len_N};/24_median 31.3 ns 31.3 ns 10
lstringa<16> copy{str_with_len_N};/24_stddev 0.895 ns 0.895 ns 10
lstringa<16> copy{str_with_len_N};/24_cv 2.89 % 2.89 % 10
lstringa<16> copy{str_with_len_N};/32_mean 35.1 ns 35.1 ns 10
lstringa<16> copy{str_with_len_N};/32_median 35.5 ns 35.5 ns 10
lstringa<16> copy{str_with_len_N};/32_stddev 1.74 ns 1.74 ns 10
lstringa<16> copy{str_with_len_N};/32_cv 4.96 % 4.96 % 10
lstringa<16> copy{str_with_len_N};/64_mean 34.9 ns 34.9 ns 10
lstringa<16> copy{str_with_len_N};/64_median 34.9 ns 34.9 ns 10
lstringa<16> copy{str_with_len_N};/64_stddev 1.80 ns 1.80 ns 10
lstringa<16> copy{str_with_len_N};/64_cv 5.16 % 5.16 % 10
lstringa<16> copy{str_with_len_N};/128_mean 35.5 ns 35.5 ns 10
lstringa<16> copy{str_with_len_N};/128_median 34.9 ns 34.9 ns 10
lstringa<16> copy{str_with_len_N};/128_stddev 2.20 ns 2.20 ns 10
lstringa<16> copy{str_with_len_N};/128_cv 6.19 % 6.19 % 10
lstringa<16> copy{str_with_len_N};/256_mean 54.3 ns 54.3 ns 10
lstringa<16> copy{str_with_len_N};/256_median 60.1 ns 60.1 ns 10
lstringa<16> copy{str_with_len_N};/256_stddev 13.2 ns 13.2 ns 10
lstringa<16> copy{str_with_len_N};/256_cv 24.32 % 24.32 % 10
lstringa<16> copy{str_with_len_N};/512_mean 48.8 ns 48.8 ns 10
lstringa<16> copy{str_with_len_N};/512_median 48.2 ns 48.2 ns 10
lstringa<16> copy{str_with_len_N};/512_stddev 12.5 ns 12.5 ns 10
lstringa<16> copy{str_with_len_N};/512_cv 25.63 % 25.63 % 10
lstringa<16> copy{str_with_len_N};/1024_mean 48.6 ns 48.6 ns 10
lstringa<16> copy{str_with_len_N};/1024_median 44.8 ns 44.8 ns 10
lstringa<16> copy{str_with_len_N};/1024_stddev 9.55 ns 9.55 ns 10
lstringa<16> copy{str_with_len_N};/1024_cv 19.65 % 19.65 % 10
lstringa<16> copy{str_with_len_N};/2048_mean 71.5 ns 71.5 ns 10
lstringa<16> copy{str_with_len_N};/2048_median 72.0 ns 72.0 ns 10
lstringa<16> copy{str_with_len_N};/2048_stddev 2.92 ns 2.92 ns 10
lstringa<16> copy{str_with_len_N};/2048_cv 4.09 % 4.09 % 10
lstringa<16> copy{str_with_len_N};/4096_mean 118 ns 118 ns 10
lstringa<16> copy{str_with_len_N};/4096_median 119 ns 119 ns 10
lstringa<16> copy{str_with_len_N};/4096_stddev 4.85 ns 4.85 ns 10
lstringa<16> copy{str_with_len_N};/4096_cv 4.12 % 4.12 % 10
lstringa<512> copy{str_with_len_N};/15_mean 15.2 ns 15.2 ns 10
lstringa<512> copy{str_with_len_N};/15_median 15.5 ns 15.5 ns 10
lstringa<512> copy{str_with_len_N};/15_stddev 0.706 ns 0.706 ns 10
lstringa<512> copy{str_with_len_N};/15_cv 4.63 % 4.63 % 10
lstringa<512> copy{str_with_len_N};/16_mean 15.3 ns 15.3 ns 10
lstringa<512> copy{str_with_len_N};/16_median 15.2 ns 15.2 ns 10
lstringa<512> copy{str_with_len_N};/16_stddev 1.27 ns 1.27 ns 10
lstringa<512> copy{str_with_len_N};/16_cv 8.27 % 8.27 % 10
lstringa<512> copy{str_with_len_N};/23_mean 14.6 ns 14.6 ns 10
lstringa<512> copy{str_with_len_N};/23_median 14.5 ns 14.5 ns 10
lstringa<512> copy{str_with_len_N};/23_stddev 1.07 ns 1.07 ns 10
lstringa<512> copy{str_with_len_N};/23_cv 7.30 % 7.30 % 10
lstringa<512> copy{str_with_len_N};/24_mean 15.2 ns 15.2 ns 10
lstringa<512> copy{str_with_len_N};/24_median 15.0 ns 15.0 ns 10
lstringa<512> copy{str_with_len_N};/24_stddev 0.835 ns 0.835 ns 10
lstringa<512> copy{str_with_len_N};/24_cv 5.50 % 5.50 % 10
lstringa<512> copy{str_with_len_N};/32_mean 17.8 ns 17.8 ns 10
lstringa<512> copy{str_with_len_N};/32_median 18.1 ns 18.1 ns 10
lstringa<512> copy{str_with_len_N};/32_stddev 0.989 ns 0.989 ns 10
lstringa<512> copy{str_with_len_N};/32_cv 5.55 % 5.55 % 10
lstringa<512> copy{str_with_len_N};/64_mean 18.3 ns 18.3 ns 10
lstringa<512> copy{str_with_len_N};/64_median 18.5 ns 18.5 ns 10
lstringa<512> copy{str_with_len_N};/64_stddev 0.865 ns 0.864 ns 10
lstringa<512> copy{str_with_len_N};/64_cv 4.72 % 4.72 % 10
lstringa<512> copy{str_with_len_N};/128_mean 18.8 ns 18.8 ns 10
lstringa<512> copy{str_with_len_N};/128_median 18.3 ns 18.3 ns 10
lstringa<512> copy{str_with_len_N};/128_stddev 1.22 ns 1.22 ns 10
lstringa<512> copy{str_with_len_N};/128_cv 6.45 % 6.45 % 10
lstringa<512> copy{str_with_len_N};/256_mean 20.1 ns 20.1 ns 10
lstringa<512> copy{str_with_len_N};/256_median 19.9 ns 19.9 ns 10
lstringa<512> copy{str_with_len_N};/256_stddev 1.24 ns 1.24 ns 10
lstringa<512> copy{str_with_len_N};/256_cv 6.16 % 6.16 % 10
lstringa<512> copy{str_with_len_N};/512_mean 26.9 ns 26.9 ns 10
lstringa<512> copy{str_with_len_N};/512_median 26.8 ns 26.8 ns 10
lstringa<512> copy{str_with_len_N};/512_stddev 0.929 ns 0.929 ns 10
lstringa<512> copy{str_with_len_N};/512_cv 3.45 % 3.45 % 10
lstringa<512> copy{str_with_len_N};/1024_mean 48.0 ns 48.0 ns 10
lstringa<512> copy{str_with_len_N};/1024_median 44.6 ns 44.6 ns 10
lstringa<512> copy{str_with_len_N};/1024_stddev 7.96 ns 7.96 ns 10
lstringa<512> copy{str_with_len_N};/1024_cv 16.59 % 16.59 % 10
lstringa<512> copy{str_with_len_N};/2048_mean 71.3 ns 71.3 ns 10
lstringa<512> copy{str_with_len_N};/2048_median 71.0 ns 71.0 ns 10
lstringa<512> copy{str_with_len_N};/2048_stddev 3.84 ns 3.84 ns 10
lstringa<512> copy{str_with_len_N};/2048_cv 5.38 % 5.38 % 10
lstringa<512> copy{str_with_len_N};/4096_mean 120 ns 120 ns 10
lstringa<512> copy{str_with_len_N};/4096_median 122 ns 122 ns 10
lstringa<512> copy{str_with_len_N};/4096_stddev 5.12 ns 5.12 ns 10
lstringa<512> copy{str_with_len_N};/4096_cv 4.27 % 4.27 % 10
----- 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 69.5 ns 69.5 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 69.6 ns 69.6 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 2.36 ns 2.36 ns 10
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 3.39 % 3.39 % 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 28.4 ns 28.4 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 28.0 ns 28.0 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.994 ns 0.994 ns 10
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 3.51 % 3.51 % 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 19.0 ns 19.0 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 19.0 ns 19.0 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.550 ns 0.550 ns 10
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 2.89 % 2.89 % 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 17.3 ns 17.3 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 17.2 ns 17.2 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.520 ns 0.520 ns 10
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 3.00 % 3.00 % 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 17.4 ns 17.4 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 17.4 ns 17.4 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.349 ns 0.349 ns 10
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 2.00 % 2.00 % 10
----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 54.6 ns 54.6 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 54.5 ns 54.5 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 1.46 ns 1.46 ns 10
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 2.67 % 2.67 % 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 30.6 ns 30.6 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 30.6 ns 30.6 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.742 ns 0.742 ns 10
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 2.43 % 2.43 % 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 17.9 ns 17.9 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 18.0 ns 18.0 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.451 ns 0.451 ns 10
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 2.51 % 2.51 % 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 16.8 ns 16.8 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 16.8 ns 16.8 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.368 ns 0.368 ns 10
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 2.19 % 2.19 % 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 16.8 ns 16.8 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 16.8 ns 16.8 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.494 ns 0.494 ns 10
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 2.94 % 2.94 % 10
----- 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 74.6 ns 74.6 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 74.7 ns 74.7 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.85 ns 1.85 ns 10
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 2.48 % 2.48 % 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 25.4 ns 25.4 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 25.3 ns 25.3 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.670 ns 0.670 ns 10
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 2.64 % 2.64 % 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 23.4 ns 23.4 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 23.3 ns 23.3 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.974 ns 0.974 ns 10
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 4.15 % 4.15 % 10
----- 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 200 ns 200 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 200 ns 200 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 3.85 ns 3.85 ns 10
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.93 % 1.93 % 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 111 ns 111 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 112 ns 112 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 2.42 ns 2.42 ns 10
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.17 % 2.17 % 10
ssa s = "1234.567e10"; double res = *s.to_double()_mean 43.1 ns 43.1 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_median 43.3 ns 43.3 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.975 ns 0.975 ns 10
ssa s = "1234.567e10"; double res = *s.to_double()_cv 2.26 % 2.26 % 10
-- 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 4383 ns 4383 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_median 4377 ns 4377 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 152 ns 152 ns 10
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 3.46 % 3.46 % 10
std::string str; ... str += "abbaabbaabbaabba";_mean 587 ns 587 ns 10
std::string str; ... str += "abbaabbaabbaabba";_median 587 ns 587 ns 10
std::string str; ... str += "abbaabbaabbaabba";_stddev 25.0 ns 25.0 ns 10
std::string str; ... str += "abbaabbaabbaabba";_cv 4.25 % 4.25 % 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 704 ns 704 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 696 ns 696 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 32.7 ns 32.7 ns 10
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 4.65 % 4.65 % 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 569 ns 569 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 564 ns 564 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 27.9 ns 27.9 ns 10
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 4.90 % 4.90 % 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 516 ns 516 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 521 ns 521 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 20.9 ns 20.9 ns 10
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 4.05 % 4.05 % 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 403 ns 403 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 400 ns 400 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 11.2 ns 11.2 ns 10
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.77 % 2.77 % 10
-- 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 4402 ns 4402 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 4457 ns 4457 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 133 ns 133 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 3.02 % 3.02 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 1940 ns 1940 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 1930 ns 1930 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 97.4 ns 97.4 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 5.02 % 5.02 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 834 ns 834 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 817 ns 817 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 59.4 ns 59.4 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 7.12 % 7.12 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 698 ns 698 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 718 ns 718 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 46.3 ns 46.3 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 6.62 % 6.62 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 592 ns 592 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 594 ns 594 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 26.6 ns 26.6 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 4.49 % 4.49 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 546 ns 546 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 541 ns 541 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 30.4 ns 30.4 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 5.56 % 5.56 % 10
-- 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 227747 ns 227748 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 227780 ns 227780 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 7201 ns 7203 ns 10
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 3.16 % 3.16 % 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 107590 ns 107591 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 109011 ns 109011 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 4697 ns 4696 ns 10
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 4.37 % 4.37 % 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 39528 ns 39528 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 38718 ns 38718 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2165 ns 2165 ns 10
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.48 % 5.48 % 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 38289 ns 38289 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 38168 ns 38168 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 3141 ns 3141 ns 10
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 8.20 % 8.20 % 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 39586 ns 39586 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 39363 ns 39363 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2349 ns 2349 ns 10
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.93 % 5.93 % 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 38827 ns 38828 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 38977 ns 38977 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2031 ns 2031 ns 10
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 5.23 % 5.23 % 10
-- 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 4714 ns 4714 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_median 4708 ns 4708 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_stddev 244 ns 244 ns 10
std::stringstream str; ... str << str_var1 << str_var2;_cv 5.18 % 5.18 % 10
std::string str; ... str += str_var1 + str_var2;_mean 2421 ns 2421 ns 10
std::string str; ... str += str_var1 + str_var2;_median 2435 ns 2435 ns 10
std::string str; ... str += str_var1 + str_var2;_stddev 152 ns 152 ns 10
std::string str; ... str += str_var1 + str_var2;_cv 6.28 % 6.28 % 10
lstringa<16> str; ... str += str_var1 + str_var2;_mean 1187 ns 1187 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_median 1189 ns 1189 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 55.5 ns 55.5 ns 10
lstringa<16> str; ... str += str_var1 + str_var2;_cv 4.68 % 4.68 % 10
lstringa<128> str; ... str += str_var1 + str_var2;_mean 1062 ns 1062 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_median 1057 ns 1057 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 70.9 ns 70.9 ns 10
lstringa<128> str; ... str += str_var1 + str_var2;_cv 6.68 % 6.68 % 10
lstringa<512> str; ... str += str_var1 + str_var2;_mean 907 ns 907 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_median 916 ns 916 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 60.9 ns 60.9 ns 10
lstringa<512> str; ... str += str_var1 + str_var2;_cv 6.72 % 6.72 % 10
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 856 ns 856 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_median 833 ns 833 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 61.9 ns 61.9 ns 10
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 7.23 % 7.23 % 10
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 6369 ns 6369 ns 10
std::stringstream str; str << "test = " << k << " times";_median 6276 ns 6276 ns 10
std::stringstream str; str << "test = " << k << " times";_stddev 289 ns 289 ns 10
std::stringstream str; str << "test = " << k << " times";_cv 4.54 % 4.54 % 10
std::string str = "test = " + std::to_string(k) + " times";_mean 1655 ns 1655 ns 10
std::string str = "test = " + std::to_string(k) + " times";_median 1661 ns 1661 ns 10
std::string str = "test = " + std::to_string(k) + " times";_stddev 74.1 ns 74.2 ns 10
std::string str = "test = " + std::to_string(k) + " times";_cv 4.48 % 4.48 % 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2916 ns 2916 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2922 ns 2922 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 76.1 ns 76.1 ns 10
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.61 % 2.61 % 10
std::string str = std::format("test = {} times", k);_mean 2078 ns 2078 ns 10
std::string str = std::format("test = {} times", k);_median 2061 ns 2061 ns 10
std::string str = std::format("test = {} times", k);_stddev 65.7 ns 65.7 ns 10
std::string str = std::format("test = {} times", k);_cv 3.16 % 3.16 % 10
lstringa<8> str; str.format("test = {} times", k);_mean 3396 ns 3396 ns 10
lstringa<8> str; str.format("test = {} times", k);_median 3379 ns 3379 ns 10
lstringa<8> str; str.format("test = {} times", k);_stddev 168 ns 168 ns 10
lstringa<8> str; str.format("test = {} times", k);_cv 4.93 % 4.93 % 10
lstringa<32> str; str.format("test = {} times", k);_mean 2581 ns 2581 ns 10
lstringa<32> str; str.format("test = {} times", k);_median 2579 ns 2579 ns 10
lstringa<32> str; str.format("test = {} times", k);_stddev 62.8 ns 62.8 ns 10
lstringa<32> str; str.format("test = {} times", k);_cv 2.43 % 2.43 % 10
lstringa<8> str = "test = " + k + " times";_mean 610 ns 610 ns 10
lstringa<8> str = "test = " + k + " times";_median 613 ns 613 ns 10
lstringa<8> str = "test = " + k + " times";_stddev 30.4 ns 30.4 ns 10
lstringa<8> str = "test = " + k + " times";_cv 4.99 % 4.99 % 10
lstringa<32> str = "test = " + k + " times";_mean 342 ns 342 ns 10
lstringa<32> str = "test = " + k + " times";_median 345 ns 345 ns 10
lstringa<32> str = "test = " + k + " times";_stddev 26.2 ns 26.2 ns 10
lstringa<32> str = "test = " + k + " times";_cv 7.68 % 7.68 % 10
stringa str = "test = " + k + " times";_mean 562 ns 562 ns 10
stringa str = "test = " + k + " times";_median 563 ns 563 ns 10
stringa str = "test = " + k + " times";_stddev 23.1 ns 23.1 ns 10
stringa str = "test = " + k + " times";_cv 4.11 % 4.11 % 10
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 651 ns 651 ns 10
std::string::find + substr + std::strtol_median 654 ns 654 ns 10
std::string::find + substr + std::strtol_stddev 41.4 ns 41.4 ns 10
std::string::find + substr + std::strtol_cv 6.36 % 6.36 % 10
ssa::splitter + ssa::as_int_mean 279 ns 279 ns 10
ssa::splitter + ssa::as_int_median 275 ns 275 ns 10
ssa::splitter + ssa::as_int_stddev 11.4 ns 11.4 ns 10
ssa::splitter + ssa::as_int_cv 4.09 % 4.09 % 10
ssa::splitf + functor_mean 346 ns 346 ns 10
ssa::splitf + functor_median 346 ns 346 ns 10
ssa::splitf + functor_stddev 5.25 ns 5.25 ns 10
ssa::splitf + functor_cv 1.52 % 1.51 % 10
-- 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 3588 ns 3588 ns 10
Naive (and wrong) replace symbols with std::string find + replace_median 3598 ns 3598 ns 10
Naive (and wrong) replace symbols with std::string find + replace_stddev 118 ns 118 ns 10
Naive (and wrong) replace symbols with std::string find + replace_cv 3.28 % 3.28 % 10
replace symbols with std::string find_first_of + replace_mean 4762 ns 4762 ns 10
replace symbols with std::string find_first_of + replace_median 4760 ns 4760 ns 10
replace symbols with std::string find_first_of + replace_stddev 186 ns 186 ns 10
replace symbols with std::string find_first_of + replace_cv 3.90 % 3.90 % 10
replace symbols with std::string_view find_first_of + copy_mean 3410 ns 3410 ns 10
replace symbols with std::string_view find_first_of + copy_median 3378 ns 3378 ns 10
replace symbols with std::string_view find_first_of + copy_stddev 157 ns 157 ns 10
replace symbols with std::string_view find_first_of + copy_cv 4.62 % 4.62 % 10
replace runtime symbols with string expressions and without remembering all search results_mean 3466 ns 3466 ns 10
replace runtime symbols with string expressions and without remembering all search results_median 3401 ns 3401 ns 10
replace runtime symbols with string expressions and without remembering all search results_stddev 160 ns 160 ns 10
replace runtime symbols with string expressions and without remembering all search results_cv 4.62 % 4.62 % 10
replace runtime symbols with simstr and memorization of all search results_mean 3059 ns 3059 ns 10
replace runtime symbols with simstr and memorization of all search results_median 3055 ns 3055 ns 10
replace runtime symbols with simstr and memorization of all search results_stddev 133 ns 133 ns 10
replace runtime symbols with simstr and memorization of all search results_cv 4.35 % 4.35 % 10
replace const symbols with string expressions and without remembering all search results_mean 2820 ns 2820 ns 10
replace const symbols with string expressions and without remembering all search results_median 2814 ns 2814 ns 10
replace const symbols with string expressions and without remembering all search results_stddev 135 ns 135 ns 10
replace const symbols with string expressions and without remembering all search results_cv 4.77 % 4.78 % 10
replace const symbols with string expressions and memorization of all search results_mean 2715 ns 2715 ns 10
replace const symbols with string expressions and memorization of all search results_median 2703 ns 2703 ns 10
replace const symbols with string expressions and memorization of all search results_stddev 105 ns 105 ns 10
replace const symbols with string expressions and memorization of all search results_cv 3.89 % 3.89 % 10
-- 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 475 ns 475 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_median 469 ns 469 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 21.6 ns 21.6 ns 10
Short Naive (and wrong) replace symbols with std::string find + replace_cv 4.55 % 4.55 % 10
Short replace symbols with std::string find_first_of + replace_mean 518 ns 518 ns 10
Short replace symbols with std::string find_first_of + replace_median 511 ns 511 ns 10
Short replace symbols with std::string find_first_of + replace_stddev 19.0 ns 19.0 ns 10
Short replace symbols with std::string find_first_of + replace_cv 3.68 % 3.68 % 10
Short replace symbols with std::string_view find_first_of + copy_mean 391 ns 391 ns 10
Short replace symbols with std::string_view find_first_of + copy_median 389 ns 389 ns 10
Short replace symbols with std::string_view find_first_of + copy_stddev 12.7 ns 12.7 ns 10
Short replace symbols with std::string_view find_first_of + copy_cv 3.26 % 3.26 % 10
Short replace runtime symbols with string expressions and without remembering all search results_mean 397 ns 397 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_median 393 ns 393 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_stddev 19.6 ns 19.6 ns 10
Short replace runtime symbols with string expressions and without remembering all search results_cv 4.93 % 4.93 % 10
Short replace runtime symbols with simstr and memorization of all search results_mean 405 ns 405 ns 10
Short replace runtime symbols with simstr and memorization of all search results_median 405 ns 405 ns 10
Short replace runtime symbols with simstr and memorization of all search results_stddev 18.7 ns 18.7 ns 10
Short replace runtime symbols with simstr and memorization of all search results_cv 4.61 % 4.61 % 10
Short replace const symbols with string expressions and without remembering all search results_mean 250 ns 250 ns 10
Short replace const symbols with string expressions and without remembering all search results_median 249 ns 249 ns 10
Short replace const symbols with string expressions and without remembering all search results_stddev 13.6 ns 13.6 ns 10
Short replace const symbols with string expressions and without remembering all search results_cv 5.44 % 5.44 % 10
Short replace const symbols with string expressions and memorization of all search results_mean 297 ns 297 ns 10
Short replace const symbols with string expressions and memorization of all search results_median 295 ns 295 ns 10
Short replace const symbols with string expressions and memorization of all search results_stddev 11.4 ns 11.4 ns 10
Short replace const symbols with string expressions and memorization of all search results_cv 3.84 % 3.84 % 10
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 382 ns 382 ns 10
replace bb to ---- in std::string|64_median 383 ns 383 ns 10
replace bb to ---- in std::string|64_stddev 15.2 ns 15.2 ns 10
replace bb to ---- in std::string|64_cv 3.99 % 3.99 % 10
replace bb to ---- in std::string|256_mean 1410 ns 1410 ns 10
replace bb to ---- in std::string|256_median 1390 ns 1390 ns 10
replace bb to ---- in std::string|256_stddev 82.5 ns 82.5 ns 10
replace bb to ---- in std::string|256_cv 5.85 % 5.85 % 10
replace bb to ---- in std::string|512_mean 2725 ns 2725 ns 10
replace bb to ---- in std::string|512_median 2729 ns 2729 ns 10
replace bb to ---- in std::string|512_stddev 113 ns 113 ns 10
replace bb to ---- in std::string|512_cv 4.16 % 4.16 % 10
replace bb to ---- in std::string|1024_mean 5829 ns 5829 ns 10
replace bb to ---- in std::string|1024_median 5693 ns 5693 ns 10
replace bb to ---- in std::string|1024_stddev 352 ns 352 ns 10
replace bb to ---- in std::string|1024_cv 6.04 % 6.04 % 10
replace bb to ---- in std::string|2048_mean 12920 ns 12920 ns 10
replace bb to ---- in std::string|2048_median 12631 ns 12631 ns 10
replace bb to ---- in std::string|2048_stddev 610 ns 610 ns 10
replace bb to ---- in std::string|2048_cv 4.72 % 4.72 % 10
replace bb to ---- in lstringa<8>|64_mean 339 ns 339 ns 10
replace bb to ---- in lstringa<8>|64_median 337 ns 337 ns 10
replace bb to ---- in lstringa<8>|64_stddev 19.7 ns 19.7 ns 10
replace bb to ---- in lstringa<8>|64_cv 5.82 % 5.82 % 10
replace bb to ---- in lstringa<8>|256_mean 1065 ns 1065 ns 10
replace bb to ---- in lstringa<8>|256_median 1068 ns 1068 ns 10
replace bb to ---- in lstringa<8>|256_stddev 44.3 ns 44.3 ns 10
replace bb to ---- in lstringa<8>|256_cv 4.16 % 4.16 % 10
replace bb to ---- in lstringa<8>|512_mean 1968 ns 1968 ns 10
replace bb to ---- in lstringa<8>|512_median 1941 ns 1941 ns 10
replace bb to ---- in lstringa<8>|512_stddev 116 ns 116 ns 10
replace bb to ---- in lstringa<8>|512_cv 5.89 % 5.89 % 10
replace bb to ---- in lstringa<8>|1024_mean 3761 ns 3761 ns 10
replace bb to ---- in lstringa<8>|1024_median 3764 ns 3764 ns 10
replace bb to ---- in lstringa<8>|1024_stddev 154 ns 154 ns 10
replace bb to ---- in lstringa<8>|1024_cv 4.09 % 4.09 % 10
replace bb to ---- in lstringa<8>|2048_mean 7335 ns 7335 ns 10
replace bb to ---- in lstringa<8>|2048_median 7333 ns 7333 ns 10
replace bb to ---- in lstringa<8>|2048_stddev 313 ns 313 ns 10
replace bb to ---- in lstringa<8>|2048_cv 4.27 % 4.27 % 10
replace bb to ---- by init stringa|64_mean 220 ns 220 ns 10
replace bb to ---- by init stringa|64_median 217 ns 217 ns 10
replace bb to ---- by init stringa|64_stddev 10.4 ns 10.4 ns 10
replace bb to ---- by init stringa|64_cv 4.75 % 4.75 % 10
replace bb to ---- by init stringa|256_mean 738 ns 738 ns 10
replace bb to ---- by init stringa|256_median 734 ns 734 ns 10
replace bb to ---- by init stringa|256_stddev 43.6 ns 43.6 ns 10
replace bb to ---- by init stringa|256_cv 5.90 % 5.90 % 10
replace bb to ---- by init stringa|512_mean 1733 ns 1733 ns 10
replace bb to ---- by init stringa|512_median 1728 ns 1728 ns 10
replace bb to ---- by init stringa|512_stddev 54.1 ns 54.1 ns 10
replace bb to ---- by init stringa|512_cv 3.12 % 3.12 % 10
replace bb to ---- by init stringa|1024_mean 3695 ns 3695 ns 10
replace bb to ---- by init stringa|1024_median 3717 ns 3717 ns 10
replace bb to ---- by init stringa|1024_stddev 156 ns 156 ns 10
replace bb to ---- by init stringa|1024_cv 4.22 % 4.22 % 10
replace bb to ---- by init stringa|2048_mean 7436 ns 7436 ns 10
replace bb to ---- by init stringa|2048_median 7389 ns 7389 ns 10
replace bb to ---- by init stringa|2048_stddev 246 ns 246 ns 10
replace bb to ---- by init stringa|2048_cv 3.31 % 3.31 % 10
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 270 ns 270 ns 10
replace bb to -- in std::string|64_median 272 ns 272 ns 10
replace bb to -- in std::string|64_stddev 14.2 ns 14.2 ns 10
replace bb to -- in std::string|64_cv 5.28 % 5.28 % 10
replace bb to -- in std::string|256_mean 1011 ns 1011 ns 10
replace bb to -- in std::string|256_median 1008 ns 1008 ns 10
replace bb to -- in std::string|256_stddev 41.5 ns 41.4 ns 10
replace bb to -- in std::string|256_cv 4.10 % 4.10 % 10
replace bb to -- in std::string|512_mean 1878 ns 1878 ns 10
replace bb to -- in std::string|512_median 1887 ns 1887 ns 10
replace bb to -- in std::string|512_stddev 27.8 ns 27.8 ns 10
replace bb to -- in std::string|512_cv 1.48 % 1.48 % 10
replace bb to -- in std::string|1024_mean 3626 ns 3626 ns 10
replace bb to -- in std::string|1024_median 3596 ns 3596 ns 10
replace bb to -- in std::string|1024_stddev 115 ns 115 ns 10
replace bb to -- in std::string|1024_cv 3.18 % 3.18 % 10
replace bb to -- in std::string|2048_mean 7194 ns 7194 ns 10
replace bb to -- in std::string|2048_median 7224 ns 7224 ns 10
replace bb to -- in std::string|2048_stddev 254 ns 254 ns 10
replace bb to -- in std::string|2048_cv 3.54 % 3.54 % 10
replace bb to -- in lstringa<8>|64_mean 222 ns 222 ns 10
replace bb to -- in lstringa<8>|64_median 223 ns 223 ns 10
replace bb to -- in lstringa<8>|64_stddev 7.12 ns 7.12 ns 10
replace bb to -- in lstringa<8>|64_cv 3.21 % 3.21 % 10
replace bb to -- in lstringa<8>|256_mean 775 ns 775 ns 10
replace bb to -- in lstringa<8>|256_median 778 ns 778 ns 10
replace bb to -- in lstringa<8>|256_stddev 33.2 ns 33.2 ns 10
replace bb to -- in lstringa<8>|256_cv 4.28 % 4.28 % 10
replace bb to -- in lstringa<8>|512_mean 1461 ns 1461 ns 10
replace bb to -- in lstringa<8>|512_median 1458 ns 1458 ns 10
replace bb to -- in lstringa<8>|512_stddev 65.3 ns 65.3 ns 10
replace bb to -- in lstringa<8>|512_cv 4.47 % 4.47 % 10
replace bb to -- in lstringa<8>|1024_mean 2776 ns 2776 ns 10
replace bb to -- in lstringa<8>|1024_median 2772 ns 2772 ns 10
replace bb to -- in lstringa<8>|1024_stddev 95.9 ns 95.9 ns 10
replace bb to -- in lstringa<8>|1024_cv 3.46 % 3.46 % 10
replace bb to -- in lstringa<8>|2048_mean 5522 ns 5522 ns 10
replace bb to -- in lstringa<8>|2048_median 5632 ns 5632 ns 10
replace bb to -- in lstringa<8>|2048_stddev 267 ns 267 ns 10
replace bb to -- in lstringa<8>|2048_cv 4.84 % 4.84 % 10
replace bb to -- by init stringa|64_mean 180 ns 180 ns 10
replace bb to -- by init stringa|64_median 180 ns 180 ns 10
replace bb to -- by init stringa|64_stddev 7.12 ns 7.12 ns 10
replace bb to -- by init stringa|64_cv 3.97 % 3.97 % 10
replace bb to -- by init stringa|256_mean 646 ns 646 ns 10
replace bb to -- by init stringa|256_median 639 ns 639 ns 10
replace bb to -- by init stringa|256_stddev 40.9 ns 40.9 ns 10
replace bb to -- by init stringa|256_cv 6.33 % 6.33 % 10
replace bb to -- by init stringa|512_mean 1220 ns 1220 ns 10
replace bb to -- by init stringa|512_median 1197 ns 1197 ns 10
replace bb to -- by init stringa|512_stddev 51.8 ns 51.8 ns 10
replace bb to -- by init stringa|512_cv 4.25 % 4.25 % 10
replace bb to -- by init stringa|1024_mean 2371 ns 2371 ns 10
replace bb to -- by init stringa|1024_median 2376 ns 2376 ns 10
replace bb to -- by init stringa|1024_stddev 86.3 ns 86.3 ns 10
replace bb to -- by init stringa|1024_cv 3.64 % 3.64 % 10
replace bb to -- by init stringa|2048_mean 4604 ns 4604 ns 10
replace bb to -- by init stringa|2048_median 4626 ns 4626 ns 10
replace bb to -- by init stringa|2048_stddev 139 ns 139 ns 10
replace bb to -- by init stringa|2048_cv 3.03 % 3.03 % 10
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3162304 ns 3162341 ns 10
hashStrMapA<size_t> emplace & find stringa;_median 3150599 ns 3150645 ns 10
hashStrMapA<size_t> emplace & find stringa;_stddev 88906 ns 88929 ns 10
hashStrMapA<size_t> emplace & find stringa;_cv 2.81 % 2.81 % 10
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3370915 ns 3370945 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3347562 ns 3347612 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 63254 ns 63239 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 1.88 % 1.88 % 10
hashStrMapA<size_t> emplace & find ssa;_mean 3151333 ns 3151360 ns 10
hashStrMapA<size_t> emplace & find ssa;_median 3141930 ns 3141974 ns 10
hashStrMapA<size_t> emplace & find ssa;_stddev 51278 ns 51255 ns 10
hashStrMapA<size_t> emplace & find ssa;_cv 1.63 % 1.63 % 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 3797453 ns 3797464 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 3810615 ns 3810615 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 66726 ns 66718 ns 10
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 1.76 % 1.76 % 10
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 2652 ns 2652 ns 10
Build func full name std::string;_median 2680 ns 2680 ns 10
Build func full name std::string;_stddev 80.1 ns 80.1 ns 10
Build func full name std::string;_cv 3.02 % 3.02 % 10
Build func full name std::string 1;_mean 2955 ns 2955 ns 10
Build func full name std::string 1;_median 2931 ns 2931 ns 10
Build func full name std::string 1;_stddev 128 ns 128 ns 10
Build func full name std::string 1;_cv 4.33 % 4.33 % 10
Build func full name std::stream;_mean 6584 ns 6584 ns 10
Build func full name std::stream;_median 6562 ns 6562 ns 10
Build func full name std::stream;_stddev 143 ns 143 ns 10
Build func full name std::stream;_cv 2.17 % 2.17 % 10
Build func full name stringa;_mean 1274 ns 1274 ns 10
Build func full name stringa;_median 1274 ns 1274 ns 10
Build func full name stringa;_stddev 82.4 ns 82.4 ns 10
Build func full name stringa;_cv 6.47 % 6.47 % 10
Build func full name stringa 1;_mean 1576 ns 1576 ns 10
Build func full name stringa 1;_median 1547 ns 1547 ns 10
Build func full name stringa 1;_stddev 85.2 ns 85.2 ns 10
Build func full name stringa 1;_cv 5.40 % 5.40 % 10

View File

@ -0,0 +1,987 @@
Benchmarks of simstr, version 1.8.1
Sources: https://github.com/orefkov/simstr
Results: https://orefkov.github.io/simstr/results.html
Compiler MSVC 19.44.35213.0
2026-03-22T13:57:22+03:00
Running benchStr.exe
Run on (32 X 2494 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)
--------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------
----- Concatenate email ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat email std::format_mean 256 ns 255 ns 4
Concat email std::format_median 256 ns 257 ns 4
Concat email std::format_stddev 5.69 ns 2.79 ns 4
Concat email std::format_cv 2.22 % 1.09 % 4
Concat email std::stringstream_mean 940 ns 942 ns 4
Concat email std::stringstream_median 934 ns 942 ns 4
Concat email std::stringstream_stddev 17.4 ns 14.2 ns 4
Concat email std::stringstream_cv 1.85 % 1.51 % 4
Concat email stringzilla append_mean 287 ns 286 ns 4
Concat email stringzilla append_median 286 ns 289 ns 4
Concat email stringzilla append_stddev 22.9 ns 21.4 ns 4
Concat email stringzilla append_cv 7.97 % 7.51 % 4
Concat email stringzilla concat_mean 134 ns 135 ns 4
Concat email stringzilla concat_median 134 ns 135 ns 4
Concat email stringzilla concat_stddev 5.29 ns 5.75 ns 4
Concat email stringzilla concat_cv 3.94 % 4.27 % 4
Concat email std::string append_mean 200 ns 201 ns 4
Concat email std::string append_median 201 ns 202 ns 4
Concat email std::string append_stddev 4.82 ns 4.34 ns 4
Concat email std::string append_cv 2.41 % 2.16 % 4
Concat email std::string by strexpr_mean 113 ns 114 ns 4
Concat email std::string by strexpr_median 114 ns 114 ns 4
Concat email std::string by strexpr_stddev 3.52 ns 3.57 ns 4
Concat email std::string by strexpr_cv 3.10 % 3.15 % 4
Concat email stringa_mean 106 ns 106 ns 4
Concat email stringa_median 102 ns 103 ns 4
Concat email stringa_stddev 8.27 ns 6.28 ns 4
Concat email stringa_cv 7.77 % 5.94 % 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 333 ns 333 ns 4
Concat std::string and number by std to std::string_median 333 ns 333 ns 4
Concat std::string and number by std to std::string_stddev 3.36 ns 4.23 ns 4
Concat std::string and number by std to std::string_cv 1.01 % 1.27 % 4
Concat std::string and number by StrExpr to std::string_mean 219 ns 217 ns 4
Concat std::string and number by StrExpr to std::string_median 220 ns 213 ns 4
Concat std::string and number by StrExpr to std::string_stddev 3.90 ns 6.80 ns 4
Concat std::string and number by StrExpr to std::string_cv 1.78 % 3.14 % 4
Concat stringa and number by StrExpr to simstr::stringa_mean 109 ns 109 ns 4
Concat stringa and number by StrExpr to simstr::stringa_median 109 ns 109 ns 4
Concat stringa and number by StrExpr to simstr::stringa_stddev 2.59 ns 2.34 ns 4
Concat stringa and number by StrExpr to simstr::stringa_cv 2.37 % 2.14 % 4
Concat stringa and number by e_concat to simstr::stringa_mean 121 ns 121 ns 4
Concat stringa and number by e_concat to simstr::stringa_median 122 ns 121 ns 4
Concat stringa and number by e_concat to simstr::stringa_stddev 1.61 ns 2.34 ns 4
Concat stringa and number by e_concat to simstr::stringa_cv 1.33 % 1.92 % 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 1030 ns 1031 ns 4
Concat std::string and format hex number and literal to std::string_median 1029 ns 1025 ns 4
Concat std::string and format hex number and literal to std::string_stddev 9.52 ns 10.5 ns 4
Concat std::string and format hex number and literal to std::string_cv 0.92 % 1.02 % 4
std::format std::string and hex number by literal to std::string_mean 1872 ns 1862 ns 4
std::format std::string and hex number by literal to std::string_median 1870 ns 1862 ns 4
std::format std::string and hex number by literal to std::string_stddev 44.1 ns 54.0 ns 4
std::format std::string and hex number by literal to std::string_cv 2.35 % 2.90 % 4
Concat std::string and std::to_chars and string to std::string_mean 252 ns 253 ns 4
Concat std::string and std::to_chars and string to std::string_median 252 ns 251 ns 4
Concat std::string and std::to_chars and string to std::string_stddev 2.77 ns 2.79 ns 4
Concat std::string and std::to_chars and string to std::string_cv 1.10 % 1.10 % 4
Concat std::string and hex number and literal by StrExpr to std::string_mean 115 ns 115 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_median 115 ns 116 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_stddev 3.10 ns 3.45 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_cv 2.71 % 3.01 % 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 101 ns 101 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 102 ns 103 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 2.17 ns 2.09 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 2.14 % 2.06 % 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 108 ns 107 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_median 108 ns 107 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 1.81 ns 1.99 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.68 % 1.86 % 4
Subst stringa and hex number by e_subst literal to simstr::stringa_mean 173 ns 172 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_median 171 ns 171 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 4.43 ns 2.44 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_cv 2.57 % 1.42 % 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 361 ns 361 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 362 ns 361 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 5.97 ns 6.55 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 1.66 % 1.81 % 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 702 ns 702 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 704 ns 706 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 15.7 ns 16.7 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 2.23 % 2.38 % 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 810 ns 802 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 808 ns 802 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 12.5 ns 14.2 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 1.55 % 1.77 % 4
e_vsubst(pattern, i / 0x8a010_fmt)_mean 1144 ns 1144 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_median 1148 ns 1144 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_stddev 12.7 ns 22.8 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_cv 1.11 % 1.99 % 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 1583 ns 1569 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 1577 ns 1569 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 19.1 ns 28.5 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 1.21 % 1.81 % 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 1596 ns 1587 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 1597 ns 1587 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 35.4 ns 45.0 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 2.22 % 2.84 % 4
std::format("abcdefghihklmopqr {:#010o} end", i)_mean 1946 ns 1916 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_median 1941 ns 1904 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 30.6 ns 22.7 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_cv 1.57 % 1.18 % 4
std::vformat(pattern, std::make_format_args(i))_mean 1990 ns 1978 ns 4
std::vformat(pattern, std::make_format_args(i))_median 1972 ns 1967 ns 4
std::vformat(pattern, std::make_format_args(i))_stddev 63.3 ns 62.8 ns 4
std::vformat(pattern, std::make_format_args(i))_cv 3.18 % 3.17 % 4
std::format with std::formatted_size_mean 2922 ns 2932 ns 4
std::format with std::formatted_size_median 2925 ns 2916 ns 4
std::format with std::formatted_size_stddev 31.5 ns 33.1 ns 4
std::format with std::formatted_size_cv 1.08 % 1.13 % 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 7026 ns 6975 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 7003 ns 6975 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 173 ns 142 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 2.46 % 2.04 % 4
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 55.5 ns 55.2 ns 4
Concat std::string by std to std::string_median 55.4 ns 54.9 ns 4
Concat std::string by std to std::string_stddev 1.50 ns 1.16 ns 4
Concat std::string by std to std::string_cv 2.71 % 2.09 % 4
Concat std::string by StrExpr to std::string_mean 77.4 ns 77.6 ns 4
Concat std::string by StrExpr to std::string_median 77.4 ns 77.6 ns 4
Concat std::string by StrExpr to std::string_stddev 0.605 ns 1.01 ns 4
Concat std::string by StrExpr to std::string_cv 0.78 % 1.30 % 4
Concat stringa by StrExpr to stringa_mean 52.2 ns 51.6 ns 4
Concat stringa by StrExpr to stringa_median 52.4 ns 51.6 ns 4
Concat stringa by StrExpr to stringa_stddev 0.927 ns 1.28 ns 4
Concat stringa by StrExpr to stringa_cv 1.77 % 2.47 % 4
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 230 ns 229 ns 4
Find concat three std::string_median 229 ns 228 ns 4
Find concat three std::string_stddev 3.20 ns 5.01 ns 4
Find concat three std::string_cv 1.39 % 2.19 % 4
Find concat three strexpr_mean 138 ns 134 ns 4
Find concat three strexpr_median 127 ns 127 ns 4
Find concat three strexpr_stddev 22.1 ns 15.2 ns 4
Find concat three strexpr_cv 16.06 % 11.36 % 4
Find concat three simstr_mean 28.3 ns 28.2 ns 4
Find concat three simstr_median 28.3 ns 28.2 ns 4
Find concat three simstr_stddev 0.625 ns 0.342 ns 4
Find concat three simstr_cv 2.21 % 1.22 % 4
Find concat three stringzilla string_mean 232 ns 231 ns 4
Find concat three stringzilla string_median 231 ns 229 ns 4
Find concat three stringzilla string_stddev 4.72 ns 2.44 ns 4
Find concat three stringzilla string_cv 2.03 % 1.06 % 4
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 17.8 ns 17.8 ns 4
BuildTypeNameStr 0/0_median 17.9 ns 18.0 ns 4
BuildTypeNameStr 0/0_stddev 0.258 ns 0.419 ns 4
BuildTypeNameStr 0/0_cv 1.45 % 2.35 % 4
BuildTypeNameExp 0/0_mean 14.4 ns 14.4 ns 4
BuildTypeNameExp 0/0_median 14.4 ns 14.4 ns 4
BuildTypeNameExp 0/0_stddev 0.177 ns 0.256 ns 4
BuildTypeNameExp 0/0_cv 1.23 % 1.77 % 4
BuildTypeNameSim 0/0_mean 15.4 ns 15.3 ns 4
BuildTypeNameSim 0/0_median 15.3 ns 15.2 ns 4
BuildTypeNameSim 0/0_stddev 0.562 ns 0.596 ns 4
BuildTypeNameSim 0/0_cv 3.66 % 3.90 % 4
BuildTypeNameStr 10/10_mean 80.1 ns 80.0 ns 4
BuildTypeNameStr 10/10_median 79.7 ns 80.6 ns 4
BuildTypeNameStr 10/10_stddev 1.34 ns 2.00 ns 4
BuildTypeNameStr 10/10_cv 1.67 % 2.50 % 4
BuildTypeNameExp 10/10_mean 39.4 ns 39.6 ns 4
BuildTypeNameExp 10/10_median 39.3 ns 39.3 ns 4
BuildTypeNameExp 10/10_stddev 0.579 ns 0.419 ns 4
BuildTypeNameExp 10/10_cv 1.47 % 1.06 % 4
BuildTypeNameSim 10/10_mean 38.8 ns 38.6 ns 4
BuildTypeNameSim 10/10_median 38.9 ns 38.4 ns 4
BuildTypeNameSim 10/10_stddev 0.643 ns 0.436 ns 4
BuildTypeNameSim 10/10_cv 1.66 % 1.13 % 4
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 352 ns 351 ns 4
Concat with replace str_median 353 ns 353 ns 4
Concat with replace str_stddev 8.02 ns 10.1 ns 4
Concat with replace str_cv 2.28 % 2.88 % 4
Concat with replace exp_mean 222 ns 222 ns 4
Concat with replace exp_median 222 ns 222 ns 4
Concat with replace exp_stddev 3.00 ns 3.02 ns 4
Concat with replace exp_cv 1.35 % 1.36 % 4
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 2.58 ns 2.58 ns 4
std::string e;_median 2.58 ns 2.57 ns 4
std::string e;_stddev 0.033 ns 0.028 ns 4
std::string e;_cv 1.28 % 1.08 % 4
std::string_view e;_mean 1.84 ns 1.84 ns 4
std::string_view e;_median 1.85 ns 1.84 ns 4
std::string_view e;_stddev 0.022 ns 0.034 ns 4
std::string_view e;_cv 1.20 % 1.86 % 4
ssa e;_mean 1.86 ns 1.84 ns 4
ssa e;_median 1.86 ns 1.84 ns 4
ssa e;_stddev 0.010 ns 0.034 ns 4
ssa e;_cv 0.53 % 1.86 % 4
stringa e;_mean 2.22 ns 2.22 ns 4
stringa e;_median 2.22 ns 2.22 ns 4
stringa e;_stddev 0.020 ns 0.000 ns 4
stringa e;_cv 0.92 % 0.00 % 4
lstringa<20> e;_mean 2.55 ns 2.55 ns 4
lstringa<20> e;_median 2.55 ns 2.55 ns 4
lstringa<20> e;_stddev 0.035 ns 0.048 ns 4
lstringa<20> e;_cv 1.39 % 1.90 % 4
lstringa<40> e;_mean 2.57 ns 2.55 ns 4
lstringa<40> e;_median 2.57 ns 2.57 ns 4
lstringa<40> e;_stddev 0.038 ns 0.028 ns 4
lstringa<40> e;_cv 1.48 % 1.09 % 4
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 2.57 ns 2.57 ns 4
std::string e = "Test text";_median 2.57 ns 2.57 ns 4
std::string e = "Test text";_stddev 0.053 ns 0.046 ns 4
std::string e = "Test text";_cv 2.07 % 1.77 % 4
std::string_view e = "Test text";_mean 1.84 ns 1.84 ns 4
std::string_view e = "Test text";_median 1.84 ns 1.84 ns 4
std::string_view e = "Test text";_stddev 0.022 ns 0.034 ns 4
std::string_view e = "Test text";_cv 1.22 % 1.86 % 4
ssa e = "Test text";_mean 1.84 ns 1.84 ns 4
ssa e = "Test text";_median 1.84 ns 1.84 ns 4
ssa e = "Test text";_stddev 0.010 ns 0.000 ns 4
ssa e = "Test text";_cv 0.55 % 0.00 % 4
stringa e = "Test text";_mean 2.57 ns 2.55 ns 4
stringa e = "Test text";_median 2.57 ns 2.55 ns 4
stringa e = "Test text";_stddev 0.026 ns 0.048 ns 4
stringa e = "Test text";_cv 1.01 % 1.90 % 4
lstringa<20> e = "Test text";_mean 2.60 ns 2.61 ns 4
lstringa<20> e = "Test text";_median 2.59 ns 2.62 ns 4
lstringa<20> e = "Test text";_stddev 0.045 ns 0.028 ns 4
lstringa<20> e = "Test text";_cv 1.73 % 1.07 % 4
lstringa<40> e = "Test text";_mean 2.58 ns 2.55 ns 4
lstringa<40> e = "Test text";_median 2.60 ns 2.55 ns 4
lstringa<40> e = "Test text";_stddev 0.034 ns 0.048 ns 4
lstringa<40> e = "Test text";_cv 1.33 % 1.90 % 4
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 79.3 ns 79.3 ns 4
std::string e = "123456789012345678901234567890";_median 78.4 ns 78.5 ns 4
std::string e = "123456789012345678901234567890";_stddev 2.83 ns 3.02 ns 4
std::string e = "123456789012345678901234567890";_cv 3.57 % 3.81 % 4
std::string_view e = "123456789012345678901234567890";_mean 1.86 ns 1.85 ns 4
std::string_view e = "123456789012345678901234567890";_median 1.86 ns 1.84 ns 4
std::string_view e = "123456789012345678901234567890";_stddev 0.015 ns 0.021 ns 4
std::string_view e = "123456789012345678901234567890";_cv 0.80 % 1.13 % 4
ssa e = "123456789012345678901234567890";_mean 1.86 ns 1.85 ns 4
ssa e = "123456789012345678901234567890";_median 1.83 ns 1.84 ns 4
ssa e = "123456789012345678901234567890";_stddev 0.065 ns 0.086 ns 4
ssa e = "123456789012345678901234567890";_cv 3.49 % 4.66 % 4
stringa e = "123456789012345678901234567890";_mean 2.24 ns 2.22 ns 4
stringa e = "123456789012345678901234567890";_median 2.24 ns 2.20 ns 4
stringa e = "123456789012345678901234567890";_stddev 0.026 ns 0.049 ns 4
stringa e = "123456789012345678901234567890";_cv 1.18 % 2.20 % 4
lstringa<20> e = "123456789012345678901234567890";_mean 72.7 ns 72.8 ns 4
lstringa<20> e = "123456789012345678901234567890";_median 73.0 ns 73.2 ns 4
lstringa<20> e = "123456789012345678901234567890";_stddev 0.990 ns 0.872 ns 4
lstringa<20> e = "123456789012345678901234567890";_cv 1.36 % 1.20 % 4
lstringa<40> e = "123456789012345678901234567890";_mean 3.32 ns 3.33 ns 4
lstringa<40> e = "123456789012345678901234567890";_median 3.31 ns 3.30 ns 4
lstringa<40> e = "123456789012345678901234567890";_stddev 0.085 ns 0.073 ns 4
lstringa<40> e = "123456789012345678901234567890";_cv 2.56 % 2.20 % 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.40 ns 5.41 ns 4
std::string e = "Test text"; auto c{e};_median 5.39 ns 5.44 ns 4
std::string e = "Test text"; auto c{e};_stddev 0.067 ns 0.070 ns 4
std::string e = "Test text"; auto c{e};_cv 1.24 % 1.29 % 4
std::string_view e = "Test text"; auto c{e};_mean 2.95 ns 2.90 ns 4
std::string_view e = "Test text"; auto c{e};_median 2.96 ns 2.92 ns 4
std::string_view e = "Test text"; auto c{e};_stddev 0.021 ns 0.083 ns 4
std::string_view e = "Test text"; auto c{e};_cv 0.72 % 2.88 % 4
ssa e = "Test text"; auto c{e};_mean 2.95 ns 2.95 ns 4
ssa e = "Test text"; auto c{e};_median 2.95 ns 2.92 ns 4
ssa e = "Test text"; auto c{e};_stddev 0.058 ns 0.066 ns 4
ssa e = "Test text"; auto c{e};_cv 1.98 % 2.25 % 4
stringa e = "Test text"; auto c{e};_mean 4.12 ns 4.10 ns 4
stringa e = "Test text"; auto c{e};_median 4.11 ns 4.08 ns 4
stringa e = "Test text"; auto c{e};_stddev 0.046 ns 0.045 ns 4
stringa e = "Test text"; auto c{e};_cv 1.12 % 1.10 % 4
lstringa<20> e = "Test text"; auto c{e};_mean 4.78 ns 4.74 ns 4
lstringa<20> e = "Test text"; auto c{e};_median 4.76 ns 4.74 ns 4
lstringa<20> e = "Test text"; auto c{e};_stddev 0.071 ns 0.114 ns 4
lstringa<20> e = "Test text"; auto c{e};_cv 1.48 % 2.40 % 4
lstringa<40> e = "Test text"; auto c{e};_mean 5.49 ns 5.48 ns 4
lstringa<40> e = "Test text"; auto c{e};_median 5.49 ns 5.44 ns 4
lstringa<40> e = "Test text"; auto c{e};_stddev 0.036 ns 0.070 ns 4
lstringa<40> e = "Test text"; auto c{e};_cv 0.66 % 1.27 % 4
----- Create copy of Str with 30 symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890"; auto c{e};_mean 78.8 ns 78.5 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_median 78.5 ns 78.5 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 2.38 ns 3.18 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_cv 3.03 % 4.06 % 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 1.50 ns 1.49 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 1.50 ns 1.49 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.015 ns 0.018 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 0.99 % 1.22 % 4
ssa e = "123456789012345678901234567890"; auto c{e};_mean 1.47 ns 1.47 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_median 1.46 ns 1.46 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.019 ns 0.030 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.30 % 2.05 % 4
stringa e = "123456789012345678901234567890"; auto c{e};_mean 2.98 ns 2.97 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_median 3.00 ns 2.95 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.039 ns 0.031 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_cv 1.31 % 1.06 % 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 82.9 ns 82.4 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 83.1 ns 82.8 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.866 ns 1.67 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 1.04 % 2.03 % 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 7.41 ns 7.39 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 7.38 ns 7.39 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.131 ns 0.114 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.77 % 1.54 % 4
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
sz::string::find;_mean 117 ns 117 ns 4
sz::string::find;_median 117 ns 117 ns 4
sz::string::find;_stddev 0.763 ns 1.99 ns 4
sz::string::find;_cv 0.65 % 1.70 % 4
std::string::find;_mean 40.3 ns 40.1 ns 4
std::string::find;_median 40.2 ns 39.9 ns 4
std::string::find;_stddev 0.623 ns 0.453 ns 4
std::string::find;_cv 1.54 % 1.13 % 4
std::string_view::find;_mean 39.8 ns 39.5 ns 4
std::string_view::find;_median 39.8 ns 39.7 ns 4
std::string_view::find;_stddev 0.318 ns 0.835 ns 4
std::string_view::find;_cv 0.80 % 2.12 % 4
ssa::find;_mean 21.9 ns 21.9 ns 4
ssa::find;_median 21.9 ns 22.0 ns 4
ssa::find;_stddev 0.213 ns 0.244 ns 4
ssa::find;_cv 0.97 % 1.12 % 4
stringa::find;_mean 29.4 ns 29.0 ns 4
stringa::find;_median 29.5 ns 29.5 ns 4
stringa::find;_stddev 0.245 ns 1.25 ns 4
stringa::find;_cv 0.83 % 4.33 % 4
lstringa<20>::find;_mean 24.4 ns 23.9 ns 4
lstringa<20>::find;_median 23.4 ns 22.5 ns 4
lstringa<20>::find;_stddev 3.47 ns 3.63 ns 4
lstringa<20>::find;_cv 14.22 % 15.18 % 4
lstringa<40>::find;_mean 23.1 ns 23.0 ns 4
lstringa<40>::find;_median 23.0 ns 22.8 ns 4
lstringa<40>::find;_stddev 0.931 ns 0.740 ns 4
lstringa<40>::find;_cv 4.04 % 3.21 % 4
------- Copy not literal Str with N symbols ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string copy{str_with_len_N};/15_mean 5.18 ns 5.20 ns 4
std::string copy{str_with_len_N};/15_median 5.13 ns 5.16 ns 4
std::string copy{str_with_len_N};/15_stddev 0.143 ns 0.078 ns 4
std::string copy{str_with_len_N};/15_cv 2.76 % 1.50 % 4
std::string copy{str_with_len_N};/16_mean 83.5 ns 83.7 ns 4
std::string copy{str_with_len_N};/16_median 83.4 ns 83.7 ns 4
std::string copy{str_with_len_N};/16_stddev 1.76 ns 2.01 ns 4
std::string copy{str_with_len_N};/16_cv 2.11 % 2.41 % 4
std::string copy{str_with_len_N};/23_mean 82.0 ns 82.0 ns 4
std::string copy{str_with_len_N};/23_median 81.8 ns 82.0 ns 4
std::string copy{str_with_len_N};/23_stddev 1.56 ns 2.01 ns 4
std::string copy{str_with_len_N};/23_cv 1.90 % 2.46 % 4
std::string copy{str_with_len_N};/24_mean 83.5 ns 83.7 ns 4
std::string copy{str_with_len_N};/24_median 83.4 ns 83.7 ns 4
std::string copy{str_with_len_N};/24_stddev 0.829 ns 1.42 ns 4
std::string copy{str_with_len_N};/24_cv 0.99 % 1.70 % 4
std::string copy{str_with_len_N};/32_mean 89.4 ns 88.5 ns 4
std::string copy{str_with_len_N};/32_median 89.9 ns 88.1 ns 4
std::string copy{str_with_len_N};/32_stddev 1.35 ns 1.67 ns 4
std::string copy{str_with_len_N};/32_cv 1.50 % 1.89 % 4
std::string copy{str_with_len_N};/64_mean 90.6 ns 90.5 ns 4
std::string copy{str_with_len_N};/64_median 86.7 ns 86.8 ns 4
std::string copy{str_with_len_N};/64_stddev 9.13 ns 9.57 ns 4
std::string copy{str_with_len_N};/64_cv 10.07 % 10.57 % 4
std::string copy{str_with_len_N};/128_mean 90.0 ns 90.0 ns 4
std::string copy{str_with_len_N};/128_median 89.9 ns 90.0 ns 4
std::string copy{str_with_len_N};/128_stddev 0.893 ns 1.71 ns 4
std::string copy{str_with_len_N};/128_cv 0.99 % 1.90 % 4
std::string copy{str_with_len_N};/256_mean 91.8 ns 92.0 ns 4
std::string copy{str_with_len_N};/256_median 91.7 ns 91.6 ns 4
std::string copy{str_with_len_N};/256_stddev 3.06 ns 3.60 ns 4
std::string copy{str_with_len_N};/256_cv 3.34 % 3.91 % 4
std::string copy{str_with_len_N};/512_mean 96.2 ns 95.7 ns 4
std::string copy{str_with_len_N};/512_median 95.8 ns 96.3 ns 4
std::string copy{str_with_len_N};/512_stddev 1.01 ns 1.05 ns 4
std::string copy{str_with_len_N};/512_cv 1.05 % 1.09 % 4
std::string copy{str_with_len_N};/1024_mean 102 ns 102 ns 4
std::string copy{str_with_len_N};/1024_median 102 ns 103 ns 4
std::string copy{str_with_len_N};/1024_stddev 5.76 ns 5.50 ns 4
std::string copy{str_with_len_N};/1024_cv 5.65 % 5.39 % 4
std::string copy{str_with_len_N};/2048_mean 132 ns 132 ns 4
std::string copy{str_with_len_N};/2048_median 132 ns 131 ns 4
std::string copy{str_with_len_N};/2048_stddev 2.82 ns 4.19 ns 4
std::string copy{str_with_len_N};/2048_cv 2.13 % 3.17 % 4
std::string copy{str_with_len_N};/4096_mean 184 ns 182 ns 4
std::string copy{str_with_len_N};/4096_median 182 ns 182 ns 4
std::string copy{str_with_len_N};/4096_stddev 4.95 ns 4.95 ns 4
std::string copy{str_with_len_N};/4096_cv 2.69 % 2.72 % 4
stringa copy{str_with_len_N};/15_mean 4.04 ns 4.01 ns 4
stringa copy{str_with_len_N};/15_median 4.05 ns 4.01 ns 4
stringa copy{str_with_len_N};/15_stddev 0.033 ns 0.071 ns 4
stringa copy{str_with_len_N};/15_cv 0.83 % 1.77 % 4
stringa copy{str_with_len_N};/16_mean 4.07 ns 4.08 ns 4
stringa copy{str_with_len_N};/16_median 4.08 ns 4.05 ns 4
stringa copy{str_with_len_N};/16_stddev 0.086 ns 0.083 ns 4
stringa copy{str_with_len_N};/16_cv 2.11 % 2.05 % 4
stringa copy{str_with_len_N};/23_mean 4.09 ns 4.08 ns 4
stringa copy{str_with_len_N};/23_median 4.09 ns 4.08 ns 4
stringa copy{str_with_len_N};/23_stddev 0.073 ns 0.074 ns 4
stringa copy{str_with_len_N};/23_cv 1.79 % 1.81 % 4
stringa copy{str_with_len_N};/24_mean 18.8 ns 18.6 ns 4
stringa copy{str_with_len_N};/24_median 18.8 ns 18.8 ns 4
stringa copy{str_with_len_N};/24_stddev 0.284 ns 0.384 ns 4
stringa copy{str_with_len_N};/24_cv 1.51 % 2.06 % 4
stringa copy{str_with_len_N};/32_mean 18.6 ns 18.5 ns 4
stringa copy{str_with_len_N};/32_median 18.5 ns 18.4 ns 4
stringa copy{str_with_len_N};/32_stddev 0.266 ns 0.209 ns 4
stringa copy{str_with_len_N};/32_cv 1.43 % 1.13 % 4
stringa copy{str_with_len_N};/64_mean 18.6 ns 18.4 ns 4
stringa copy{str_with_len_N};/64_median 18.6 ns 18.4 ns 4
stringa copy{str_with_len_N};/64_stddev 0.088 ns 0.342 ns 4
stringa copy{str_with_len_N};/64_cv 0.47 % 1.86 % 4
stringa copy{str_with_len_N};/128_mean 18.6 ns 18.6 ns 4
stringa copy{str_with_len_N};/128_median 18.6 ns 18.6 ns 4
stringa copy{str_with_len_N};/128_stddev 0.111 ns 0.242 ns 4
stringa copy{str_with_len_N};/128_cv 0.60 % 1.30 % 4
stringa copy{str_with_len_N};/256_mean 18.7 ns 18.4 ns 4
stringa copy{str_with_len_N};/256_median 18.7 ns 18.4 ns 4
stringa copy{str_with_len_N};/256_stddev 0.154 ns 0.342 ns 4
stringa copy{str_with_len_N};/256_cv 0.82 % 1.86 % 4
stringa copy{str_with_len_N};/512_mean 19.1 ns 18.9 ns 4
stringa copy{str_with_len_N};/512_median 18.7 ns 18.8 ns 4
stringa copy{str_with_len_N};/512_stddev 0.790 ns 0.527 ns 4
stringa copy{str_with_len_N};/512_cv 4.14 % 2.78 % 4
stringa copy{str_with_len_N};/1024_mean 18.7 ns 18.5 ns 4
stringa copy{str_with_len_N};/1024_median 18.7 ns 18.4 ns 4
stringa copy{str_with_len_N};/1024_stddev 0.105 ns 0.209 ns 4
stringa copy{str_with_len_N};/1024_cv 0.56 % 1.13 % 4
stringa copy{str_with_len_N};/2048_mean 18.7 ns 18.6 ns 4
stringa copy{str_with_len_N};/2048_median 18.7 ns 18.6 ns 4
stringa copy{str_with_len_N};/2048_stddev 0.170 ns 0.242 ns 4
stringa copy{str_with_len_N};/2048_cv 0.91 % 1.30 % 4
stringa copy{str_with_len_N};/4096_mean 18.7 ns 18.7 ns 4
stringa copy{str_with_len_N};/4096_median 18.7 ns 18.8 ns 4
stringa copy{str_with_len_N};/4096_stddev 0.084 ns 0.192 ns 4
stringa copy{str_with_len_N};/4096_cv 0.45 % 1.03 % 4
lstringa<16> copy{str_with_len_N};/15_mean 4.06 ns 4.06 ns 4
lstringa<16> copy{str_with_len_N};/15_median 4.05 ns 4.04 ns 4
lstringa<16> copy{str_with_len_N};/15_stddev 0.063 ns 0.087 ns 4
lstringa<16> copy{str_with_len_N};/15_cv 1.55 % 2.14 % 4
lstringa<16> copy{str_with_len_N};/16_mean 8.48 ns 8.46 ns 4
lstringa<16> copy{str_with_len_N};/16_median 8.49 ns 8.46 ns 4
lstringa<16> copy{str_with_len_N};/16_stddev 0.137 ns 0.101 ns 4
lstringa<16> copy{str_with_len_N};/16_cv 1.61 % 1.19 % 4
lstringa<16> copy{str_with_len_N};/23_mean 8.54 ns 8.50 ns 4
lstringa<16> copy{str_with_len_N};/23_median 8.56 ns 8.54 ns 4
lstringa<16> copy{str_with_len_N};/23_stddev 0.063 ns 0.087 ns 4
lstringa<16> copy{str_with_len_N};/23_cv 0.73 % 1.03 % 4
lstringa<16> copy{str_with_len_N};/24_mean 81.2 ns 81.1 ns 4
lstringa<16> copy{str_with_len_N};/24_median 80.9 ns 81.1 ns 4
lstringa<16> copy{str_with_len_N};/24_stddev 2.04 ns 2.25 ns 4
lstringa<16> copy{str_with_len_N};/24_cv 2.51 % 2.78 % 4
lstringa<16> copy{str_with_len_N};/32_mean 84.1 ns 84.1 ns 4
lstringa<16> copy{str_with_len_N};/32_median 84.2 ns 83.7 ns 4
lstringa<16> copy{str_with_len_N};/32_stddev 0.339 ns 0.872 ns 4
lstringa<16> copy{str_with_len_N};/32_cv 0.40 % 1.04 % 4
lstringa<16> copy{str_with_len_N};/64_mean 82.4 ns 82.1 ns 4
lstringa<16> copy{str_with_len_N};/64_median 82.3 ns 81.6 ns 4
lstringa<16> copy{str_with_len_N};/64_stddev 1.06 ns 1.05 ns 4
lstringa<16> copy{str_with_len_N};/64_cv 1.29 % 1.27 % 4
lstringa<16> copy{str_with_len_N};/128_mean 85.6 ns 85.4 ns 4
lstringa<16> copy{str_with_len_N};/128_median 85.4 ns 85.4 ns 4
lstringa<16> copy{str_with_len_N};/128_stddev 1.42 ns 1.42 ns 4
lstringa<16> copy{str_with_len_N};/128_cv 1.66 % 1.67 % 4
lstringa<16> copy{str_with_len_N};/256_mean 87.1 ns 86.8 ns 4
lstringa<16> copy{str_with_len_N};/256_median 87.3 ns 85.8 ns 4
lstringa<16> copy{str_with_len_N};/256_stddev 1.57 ns 2.09 ns 4
lstringa<16> copy{str_with_len_N};/256_cv 1.80 % 2.41 % 4
lstringa<16> copy{str_with_len_N};/512_mean 90.7 ns 90.0 ns 4
lstringa<16> copy{str_with_len_N};/512_median 91.2 ns 90.0 ns 4
lstringa<16> copy{str_with_len_N};/512_stddev 1.60 ns 1.71 ns 4
lstringa<16> copy{str_with_len_N};/512_cv 1.77 % 1.90 % 4
lstringa<16> copy{str_with_len_N};/1024_mean 101 ns 101 ns 4
lstringa<16> copy{str_with_len_N};/1024_median 100 ns 100 ns 4
lstringa<16> copy{str_with_len_N};/1024_stddev 5.75 ns 6.21 ns 4
lstringa<16> copy{str_with_len_N};/1024_cv 5.68 % 6.14 % 4
lstringa<16> copy{str_with_len_N};/2048_mean 135 ns 133 ns 4
lstringa<16> copy{str_with_len_N};/2048_median 136 ns 133 ns 4
lstringa<16> copy{str_with_len_N};/2048_stddev 5.54 ns 3.60 ns 4
lstringa<16> copy{str_with_len_N};/2048_cv 4.11 % 2.72 % 4
lstringa<16> copy{str_with_len_N};/4096_mean 196 ns 195 ns 4
lstringa<16> copy{str_with_len_N};/4096_median 196 ns 195 ns 4
lstringa<16> copy{str_with_len_N};/4096_stddev 2.72 ns 2.42 ns 4
lstringa<16> copy{str_with_len_N};/4096_cv 1.39 % 1.24 % 4
lstringa<512> copy{str_with_len_N};/15_mean 4.46 ns 4.45 ns 4
lstringa<512> copy{str_with_len_N};/15_median 4.47 ns 4.45 ns 4
lstringa<512> copy{str_with_len_N};/15_stddev 0.048 ns 0.083 ns 4
lstringa<512> copy{str_with_len_N};/15_cv 1.08 % 1.86 % 4
lstringa<512> copy{str_with_len_N};/16_mean 8.96 ns 8.89 ns 4
lstringa<512> copy{str_with_len_N};/16_median 9.02 ns 8.89 ns 4
lstringa<512> copy{str_with_len_N};/16_stddev 0.201 ns 0.121 ns 4
lstringa<512> copy{str_with_len_N};/16_cv 2.24 % 1.36 % 4
lstringa<512> copy{str_with_len_N};/23_mean 8.92 ns 8.89 ns 4
lstringa<512> copy{str_with_len_N};/23_median 8.89 ns 8.89 ns 4
lstringa<512> copy{str_with_len_N};/23_stddev 0.096 ns 0.121 ns 4
lstringa<512> copy{str_with_len_N};/23_cv 1.08 % 1.36 % 4
lstringa<512> copy{str_with_len_N};/24_mean 9.07 ns 9.00 ns 4
lstringa<512> copy{str_with_len_N};/24_median 9.14 ns 9.00 ns 4
lstringa<512> copy{str_with_len_N};/24_stddev 0.274 ns 0.342 ns 4
lstringa<512> copy{str_with_len_N};/24_cv 3.02 % 3.80 % 4
lstringa<512> copy{str_with_len_N};/32_mean 12.6 ns 12.6 ns 4
lstringa<512> copy{str_with_len_N};/32_median 12.6 ns 12.7 ns 4
lstringa<512> copy{str_with_len_N};/32_stddev 0.121 ns 0.267 ns 4
lstringa<512> copy{str_with_len_N};/32_cv 0.96 % 2.12 % 4
lstringa<512> copy{str_with_len_N};/64_mean 12.5 ns 12.6 ns 4
lstringa<512> copy{str_with_len_N};/64_median 12.5 ns 12.6 ns 4
lstringa<512> copy{str_with_len_N};/64_stddev 0.075 ns 0.000 ns 4
lstringa<512> copy{str_with_len_N};/64_cv 0.60 % 0.00 % 4
lstringa<512> copy{str_with_len_N};/128_mean 12.9 ns 12.9 ns 4
lstringa<512> copy{str_with_len_N};/128_median 12.9 ns 12.8 ns 4
lstringa<512> copy{str_with_len_N};/128_stddev 0.117 ns 0.140 ns 4
lstringa<512> copy{str_with_len_N};/128_cv 0.91 % 1.08 % 4
lstringa<512> copy{str_with_len_N};/256_mean 14.0 ns 14.0 ns 4
lstringa<512> copy{str_with_len_N};/256_median 14.0 ns 14.0 ns 4
lstringa<512> copy{str_with_len_N};/256_stddev 0.180 ns 0.140 ns 4
lstringa<512> copy{str_with_len_N};/256_cv 1.28 % 1.00 % 4
lstringa<512> copy{str_with_len_N};/512_mean 15.7 ns 15.6 ns 4
lstringa<512> copy{str_with_len_N};/512_median 15.6 ns 15.3 ns 4
lstringa<512> copy{str_with_len_N};/512_stddev 0.330 ns 0.575 ns 4
lstringa<512> copy{str_with_len_N};/512_cv 2.10 % 3.68 % 4
lstringa<512> copy{str_with_len_N};/1024_mean 95.0 ns 95.2 ns 4
lstringa<512> copy{str_with_len_N};/1024_median 94.7 ns 95.2 ns 4
lstringa<512> copy{str_with_len_N};/1024_stddev 1.84 ns 2.70 ns 4
lstringa<512> copy{str_with_len_N};/1024_cv 1.93 % 2.84 % 4
lstringa<512> copy{str_with_len_N};/2048_mean 128 ns 127 ns 4
lstringa<512> copy{str_with_len_N};/2048_median 128 ns 127 ns 4
lstringa<512> copy{str_with_len_N};/2048_stddev 3.74 ns 4.83 ns 4
lstringa<512> copy{str_with_len_N};/2048_cv 2.93 % 3.81 % 4
lstringa<512> copy{str_with_len_N};/4096_mean 193 ns 194 ns 4
lstringa<512> copy{str_with_len_N};/4096_median 193 ns 193 ns 4
lstringa<512> copy{str_with_len_N};/4096_stddev 1.56 ns 2.09 ns 4
lstringa<512> copy{str_with_len_N};/4096_cv 0.81 % 1.08 % 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 31.9 ns 31.9 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 31.9 ns 31.7 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 0.552 ns 0.668 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.73 % 2.09 % 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 11.8 ns 11.8 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 11.8 ns 11.7 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.239 ns 0.140 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 2.02 % 1.18 % 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 16.8 ns 16.7 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 16.8 ns 16.7 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.164 ns 0.222 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 0.98 % 1.33 % 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 15.6 ns 15.5 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 15.5 ns 15.5 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.378 ns 0.201 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 2.43 % 1.30 % 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 14.8 ns 14.6 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 14.8 ns 14.6 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.360 ns 0.174 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 2.43 % 1.20 % 4
----- Convert to unsigned 'abcDef' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_mean 35.5 ns 35.5 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 35.4 ns 35.7 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.552 ns 0.768 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 1.55 % 2.16 % 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 8.96 ns 9.00 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 8.95 ns 9.00 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.173 ns 0.242 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.93 % 2.69 % 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 14.5 ns 14.5 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 14.5 ns 14.6 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.173 ns 0.301 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.20 % 2.07 % 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 13.3 ns 13.3 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 13.4 ns 13.3 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.191 ns 0.267 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.43 % 2.01 % 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 12.7 ns 12.6 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 12.6 ns 12.6 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.165 ns 0.140 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.30 % 1.10 % 4
----- Convert to int ' 1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_mean 45.6 ns 45.3 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 45.6 ns 45.5 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 0.831 ns 1.00 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 1.82 % 2.21 % 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 22.4 ns 22.2 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 22.4 ns 22.2 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.187 ns 0.302 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 0.84 % 1.36 % 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 19.1 ns 19.1 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 19.1 ns 19.3 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.164 ns 0.209 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 0.86 % 1.09 % 4
----- Convert to double '1234.567e10' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_mean 103 ns 103 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 103 ns 103 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 0.220 ns 0.000 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 0.21 % 0.00 % 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 82.7 ns 82.0 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 83.0 ns 82.0 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 1.72 ns 2.01 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 2.08 % 2.46 % 4
ssa s = "1234.567e10"; double res = *s.to_double()_mean 37.7 ns 37.8 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_median 37.7 ns 37.6 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.248 ns 0.384 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_cv 0.66 % 1.02 % 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 5722 ns 5685 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_median 5712 ns 5650 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 62.9 ns 134 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 1.10 % 2.35 % 4
std::string str; ... str += "abbaabbaabbaabba";_mean 1306 ns 1295 ns 4
std::string str; ... str += "abbaabbaabbaabba";_median 1306 ns 1303 ns 4
std::string str; ... str += "abbaabbaabbaabba";_stddev 20.8 ns 30.1 ns 4
std::string str; ... str += "abbaabbaabbaabba";_cv 1.60 % 2.32 % 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 914 ns 905 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 917 ns 910 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 13.5 ns 20.0 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 1.48 % 2.21 % 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 542 ns 539 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 537 ns 539 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 12.9 ns 9.02 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 2.38 % 1.67 % 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 364 ns 361 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 366 ns 361 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 6.93 ns 6.26 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 1.90 % 1.74 % 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 230 ns 229 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 231 ns 229 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 5.37 ns 3.99 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 2.34 % 1.74 % 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 5665 ns 5580 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 5665 ns 5580 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 178 ns 255 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 3.15 % 4.56 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 3902 ns 3902 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 3908 ns 3880 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 74.9 ns 83.5 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 1.92 % 2.14 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 822 ns 820 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 822 ns 820 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 13.8 ns 20.1 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.68 % 2.46 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 535 ns 535 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 535 ns 531 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 10.9 ns 7.81 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.03 % 1.46 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 377 ns 377 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 376 ns 377 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 5.35 ns 6.83 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.42 % 1.81 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 286 ns 285 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 285 ns 285 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 3.20 ns 5.41 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 1.12 % 1.90 % 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 295560 ns 295048 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 291197 ns 288771 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 13899 ns 17000 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 4.70 % 5.76 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 199734 ns 194972 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 200341 ns 194972 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 4028 ns 3702 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.02 % 1.90 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 25221 ns 25251 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 25305 ns 25391 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 392 ns 534 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.55 % 2.12 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 23191 ns 23123 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 23387 ns 23350 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 674 ns 641 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 2.90 % 2.77 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 21887 ns 21711 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 21799 ns 21711 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 298 ns 302 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.36 % 1.39 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 22577 ns 22496 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 22602 ns 22496 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 279 ns 0.000 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.24 % 0.00 % 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 5538 ns 5547 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_median 5547 ns 5547 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_stddev 115 ns 90.2 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_cv 2.08 % 1.63 % 4
std::string str; ... str += str_var1 + str_var2;_mean 4019 ns 4013 ns 4
std::string str; ... str += str_var1 + str_var2;_median 4019 ns 3990 ns 4
std::string str; ... str += str_var1 + str_var2;_stddev 40.6 ns 45.3 ns 4
std::string str; ... str += str_var1 + str_var2;_cv 1.01 % 1.13 % 4
lstringa<16> str; ... str += str_var1 + str_var2;_mean 900 ns 902 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_median 900 ns 907 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 17.6 ns 8.72 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_cv 1.95 % 0.97 % 4
lstringa<128> str; ... str += str_var1 + str_var2;_mean 641 ns 638 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_median 644 ns 642 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 8.08 ns 6.98 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_cv 1.26 % 1.09 % 4
lstringa<512> str; ... str += str_var1 + str_var2;_mean 482 ns 476 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_median 478 ns 476 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 8.41 ns 8.83 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_cv 1.75 % 1.86 % 4
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 365 ns 365 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_median 366 ns 365 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 5.82 ns 4.63 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.59 % 1.27 % 4
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 11725 ns 11719 ns 4
std::stringstream str; str << "test = " << k << " times";_median 11720 ns 11719 ns 4
std::stringstream str; str << "test = " << k << " times";_stddev 134 ns 199 ns 4
std::stringstream str; str << "test = " << k << " times";_cv 1.14 % 1.70 % 4
std::string str = "test = " + std::to_string(k) + " times";_mean 1226 ns 1228 ns 4
std::string str = "test = " + std::to_string(k) + " times";_median 1223 ns 1228 ns 4
std::string str = "test = " + std::to_string(k) + " times";_stddev 27.1 ns 32.2 ns 4
std::string str = "test = " + std::to_string(k) + " times";_cv 2.21 % 2.62 % 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 2815 ns 2802 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 2819 ns 2787 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 70.6 ns 74.6 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 2.51 % 2.66 % 4
std::string str = std::format("test = {} times", k);_mean 2391 ns 2367 ns 4
std::string str = std::format("test = {} times", k);_median 2379 ns 2354 ns 4
std::string str = std::format("test = {} times", k);_stddev 26.5 ns 65.8 ns 4
std::string str = std::format("test = {} times", k);_cv 1.11 % 2.78 % 4
lstringa<8> str; str.format("test = {} times", k);_mean 2677 ns 2653 ns 4
lstringa<8> str; str.format("test = {} times", k);_median 2681 ns 2668 ns 4
lstringa<8> str; str.format("test = {} times", k);_stddev 35.4 ns 88.9 ns 4
lstringa<8> str; str.format("test = {} times", k);_cv 1.32 % 3.35 % 4
lstringa<32> str; str.format("test = {} times", k);_mean 1480 ns 1483 ns 4
lstringa<32> str; str.format("test = {} times", k);_median 1477 ns 1475 ns 4
lstringa<32> str; str.format("test = {} times", k);_stddev 14.2 ns 15.7 ns 4
lstringa<32> str; str.format("test = {} times", k);_cv 0.96 % 1.06 % 4
lstringa<8> str = "test = " + k + " times";_mean 890 ns 889 ns 4
lstringa<8> str = "test = " + k + " times";_median 891 ns 889 ns 4
lstringa<8> str = "test = " + k + " times";_stddev 14.0 ns 14.2 ns 4
lstringa<8> str = "test = " + k + " times";_cv 1.58 % 1.60 % 4
lstringa<32> str = "test = " + k + " times";_mean 180 ns 179 ns 4
lstringa<32> str = "test = " + k + " times";_median 180 ns 180 ns 4
lstringa<32> str = "test = " + k + " times";_stddev 3.64 ns 4.83 ns 4
lstringa<32> str = "test = " + k + " times";_cv 2.02 % 2.69 % 4
stringa str = "test = " + k + " times";_mean 172 ns 170 ns 4
stringa str = "test = " + k + " times";_median 172 ns 170 ns 4
stringa str = "test = " + k + " times";_stddev 2.25 ns 2.42 ns 4
stringa str = "test = " + k + " times";_cv 1.31 % 1.43 % 4
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 573 ns 570 ns 4
std::string::find + substr + std::strtol_median 566 ns 570 ns 4
std::string::find + substr + std::strtol_stddev 23.5 ns 32.5 ns 4
std::string::find + substr + std::strtol_cv 4.09 % 5.70 % 4
ssa::splitter + ssa::as_int_mean 304 ns 303 ns 4
ssa::splitter + ssa::as_int_median 304 ns 303 ns 4
ssa::splitter + ssa::as_int_stddev 5.71 ns 9.01 ns 4
ssa::splitter + ssa::as_int_cv 1.88 % 2.97 % 4
ssa::splitf + functor_mean 218 ns 216 ns 4
ssa::splitf + functor_median 218 ns 215 ns 4
ssa::splitf + functor_stddev 4.32 ns 6.14 ns 4
ssa::splitf + functor_cv 1.98 % 2.84 % 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 1206 ns 1207 ns 4
Naive (and wrong) replace symbols with std::string find + replace_median 1198 ns 1200 ns 4
Naive (and wrong) replace symbols with std::string find + replace_stddev 33.2 ns 35.1 ns 4
Naive (and wrong) replace symbols with std::string find + replace_cv 2.76 % 2.91 % 4
replace symbols with std::string find_first_of + replace_mean 2200 ns 2197 ns 4
replace symbols with std::string find_first_of + replace_median 2200 ns 2197 ns 4
replace symbols with std::string find_first_of + replace_stddev 7.02 ns 0.000 ns 4
replace symbols with std::string find_first_of + replace_cv 0.32 % 0.00 % 4
replace symbols with std::string_view find_first_of + copy_mean 2544 ns 2520 ns 4
replace symbols with std::string_view find_first_of + copy_median 2549 ns 2520 ns 4
replace symbols with std::string_view find_first_of + copy_stddev 15.3 ns 76.5 ns 4
replace symbols with std::string_view find_first_of + copy_cv 0.60 % 3.04 % 4
replace runtime symbols with string expressions and without remembering all search results_mean 1663 ns 1659 ns 4
replace runtime symbols with string expressions and without remembering all search results_median 1668 ns 1650 ns 4
replace runtime symbols with string expressions and without remembering all search results_stddev 23.0 ns 19.2 ns 4
replace runtime symbols with string expressions and without remembering all search results_cv 1.38 % 1.16 % 4
replace runtime symbols with simstr and memorization of all search results_mean 1442 ns 1444 ns 4
replace runtime symbols with simstr and memorization of all search results_median 1435 ns 1444 ns 4
replace runtime symbols with simstr and memorization of all search results_stddev 18.5 ns 25.6 ns 4
replace runtime symbols with simstr and memorization of all search results_cv 1.28 % 1.77 % 4
replace const symbols with string expressions and without remembering all search results_mean 1293 ns 1283 ns 4
replace const symbols with string expressions and without remembering all search results_median 1299 ns 1283 ns 4
replace const symbols with string expressions and without remembering all search results_stddev 18.4 ns 22.8 ns 4
replace const symbols with string expressions and without remembering all search results_cv 1.43 % 1.77 % 4
replace const symbols with string expressions and memorization of all search results_mean 1213 ns 1214 ns 4
replace const symbols with string expressions and memorization of all search results_median 1201 ns 1200 ns 4
replace const symbols with string expressions and memorization of all search results_stddev 28.8 ns 27.9 ns 4
replace const symbols with string expressions and memorization of all search results_cv 2.37 % 2.30 % 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 328 ns 324 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_median 331 ns 326 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 6.41 ns 7.01 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_cv 1.95 % 2.16 % 4
Short replace symbols with std::string find_first_of + replace_mean 420 ns 422 ns 4
Short replace symbols with std::string find_first_of + replace_median 417 ns 422 ns 4
Short replace symbols with std::string find_first_of + replace_stddev 5.55 ns 11.7 ns 4
Short replace symbols with std::string find_first_of + replace_cv 1.32 % 2.78 % 4
Short replace symbols with std::string_view find_first_of + copy_mean 333 ns 332 ns 4
Short replace symbols with std::string_view find_first_of + copy_median 333 ns 330 ns 4
Short replace symbols with std::string_view find_first_of + copy_stddev 3.60 ns 3.84 ns 4
Short replace symbols with std::string_view find_first_of + copy_cv 1.08 % 1.16 % 4
Short replace runtime symbols with string expressions and without remembering all search results_mean 310 ns 308 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_median 309 ns 308 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_stddev 3.87 ns 3.83 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_cv 1.25 % 1.24 % 4
Short replace runtime symbols with simstr and memorization of all search results_mean 401 ns 399 ns 4
Short replace runtime symbols with simstr and memorization of all search results_median 399 ns 397 ns 4
Short replace runtime symbols with simstr and memorization of all search results_stddev 9.40 ns 8.35 ns 4
Short replace runtime symbols with simstr and memorization of all search results_cv 2.35 % 2.09 % 4
Short replace const symbols with string expressions and without remembering all search results_mean 254 ns 254 ns 4
Short replace const symbols with string expressions and without remembering all search results_median 252 ns 251 ns 4
Short replace const symbols with string expressions and without remembering all search results_stddev 6.10 ns 9.06 ns 4
Short replace const symbols with string expressions and without remembering all search results_cv 2.40 % 3.57 % 4
Short replace const symbols with string expressions and memorization of all search results_mean 334 ns 335 ns 4
Short replace const symbols with string expressions and memorization of all search results_median 333 ns 337 ns 4
Short replace const symbols with string expressions and memorization of all search results_stddev 2.88 ns 3.66 ns 4
Short replace const symbols with string expressions and memorization of all search results_cv 0.86 % 1.09 % 4
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 242 ns 243 ns 4
replace bb to ---- in std::string|64_median 242 ns 243 ns 4
replace bb to ---- in std::string|64_stddev 2.02 ns 0.000 ns 4
replace bb to ---- in std::string|64_cv 0.83 % 0.00 % 4
replace bb to ---- in std::string|256_mean 791 ns 793 ns 4
replace bb to ---- in std::string|256_median 792 ns 793 ns 4
replace bb to ---- in std::string|256_stddev 10.1 ns 10.1 ns 4
replace bb to ---- in std::string|256_cv 1.27 % 1.27 % 4
replace bb to ---- in std::string|512_mean 1464 ns 1460 ns 4
replace bb to ---- in std::string|512_median 1469 ns 1460 ns 4
replace bb to ---- in std::string|512_stddev 13.2 ns 18.1 ns 4
replace bb to ---- in std::string|512_cv 0.90 % 1.24 % 4
replace bb to ---- in std::string|1024_mean 3204 ns 3209 ns 4
replace bb to ---- in std::string|1024_median 3216 ns 3209 ns 4
replace bb to ---- in std::string|1024_stddev 60.8 ns 57.0 ns 4
replace bb to ---- in std::string|1024_cv 1.90 % 1.77 % 4
replace bb to ---- in std::string|2048_mean 8080 ns 8057 ns 4
replace bb to ---- in std::string|2048_median 8073 ns 8057 ns 4
replace bb to ---- in std::string|2048_stddev 177 ns 270 ns 4
replace bb to ---- in std::string|2048_cv 2.19 % 3.35 % 4
replace bb to ---- in lstringa<8>|64_mean 225 ns 224 ns 4
replace bb to ---- in lstringa<8>|64_median 224 ns 220 ns 4
replace bb to ---- in lstringa<8>|64_stddev 7.34 ns 7.85 ns 4
replace bb to ---- in lstringa<8>|64_cv 3.26 % 3.51 % 4
replace bb to ---- in lstringa<8>|256_mean 655 ns 649 ns 4
replace bb to ---- in lstringa<8>|256_median 653 ns 649 ns 4
replace bb to ---- in lstringa<8>|256_stddev 10.5 ns 8.05 ns 4
replace bb to ---- in lstringa<8>|256_cv 1.60 % 1.24 % 4
replace bb to ---- in lstringa<8>|512_mean 1124 ns 1123 ns 4
replace bb to ---- in lstringa<8>|512_median 1124 ns 1123 ns 4
replace bb to ---- in lstringa<8>|512_stddev 20.7 ns 19.9 ns 4
replace bb to ---- in lstringa<8>|512_cv 1.85 % 1.77 % 4
replace bb to ---- in lstringa<8>|1024_mean 2038 ns 2040 ns 4
replace bb to ---- in lstringa<8>|1024_median 2043 ns 2063 ns 4
replace bb to ---- in lstringa<8>|1024_stddev 39.0 ns 64.1 ns 4
replace bb to ---- in lstringa<8>|1024_cv 1.91 % 3.14 % 4
replace bb to ---- in lstringa<8>|2048_mean 3964 ns 3899 ns 4
replace bb to ---- in lstringa<8>|2048_median 3929 ns 3899 ns 4
replace bb to ---- in lstringa<8>|2048_stddev 127 ns 74.0 ns 4
replace bb to ---- in lstringa<8>|2048_cv 3.21 % 1.90 % 4
replace bb to ---- by init stringa|64_mean 196 ns 196 ns 4
replace bb to ---- by init stringa|64_median 198 ns 197 ns 4
replace bb to ---- by init stringa|64_stddev 4.79 ns 5.27 ns 4
replace bb to ---- by init stringa|64_cv 2.44 % 2.69 % 4
replace bb to ---- by init stringa|256_mean 456 ns 453 ns 4
replace bb to ---- by init stringa|256_median 454 ns 455 ns 4
replace bb to ---- by init stringa|256_stddev 12.3 ns 10.0 ns 4
replace bb to ---- by init stringa|256_cv 2.71 % 2.21 % 4
replace bb to ---- by init stringa|512_mean 1064 ns 1057 ns 4
replace bb to ---- by init stringa|512_median 1056 ns 1057 ns 4
replace bb to ---- by init stringa|512_stddev 18.6 ns 12.1 ns 4
replace bb to ---- by init stringa|512_cv 1.75 % 1.14 % 4
replace bb to ---- by init stringa|1024_mean 2161 ns 2148 ns 4
replace bb to ---- by init stringa|1024_median 2146 ns 2148 ns 4
replace bb to ---- by init stringa|1024_stddev 37.6 ns 0.000 ns 4
replace bb to ---- by init stringa|1024_cv 1.74 % 0.00 % 4
replace bb to ---- by init stringa|2048_mean 4481 ns 4476 ns 4
replace bb to ---- by init stringa|2048_median 4468 ns 4501 ns 4
replace bb to ---- by init stringa|2048_stddev 83.1 ns 96.8 ns 4
replace bb to ---- by init stringa|2048_cv 1.86 % 2.16 % 4
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 198 ns 198 ns 4
replace bb to -- in std::string|64_median 196 ns 195 ns 4
replace bb to -- in std::string|64_stddev 7.58 ns 9.35 ns 4
replace bb to -- in std::string|64_cv 3.84 % 4.73 % 4
replace bb to -- in std::string|256_mean 520 ns 520 ns 4
replace bb to -- in std::string|256_median 517 ns 516 ns 4
replace bb to -- in std::string|256_stddev 13.7 ns 17.6 ns 4
replace bb to -- in std::string|256_cv 2.64 % 3.38 % 4
replace bb to -- in std::string|512_mean 928 ns 921 ns 4
replace bb to -- in std::string|512_median 924 ns 921 ns 4
replace bb to -- in std::string|512_stddev 14.1 ns 17.1 ns 4
replace bb to -- in std::string|512_cv 1.52 % 1.86 % 4
replace bb to -- in std::string|1024_mean 1750 ns 1755 ns 4
replace bb to -- in std::string|1024_median 1751 ns 1746 ns 4
replace bb to -- in std::string|1024_stddev 33.9 ns 36.7 ns 4
replace bb to -- in std::string|1024_cv 1.94 % 2.09 % 4
replace bb to -- in std::string|2048_mean 3402 ns 3395 ns 4
replace bb to -- in std::string|2048_median 3388 ns 3376 ns 4
replace bb to -- in std::string|2048_stddev 44.1 ns 38.4 ns 4
replace bb to -- in std::string|2048_cv 1.30 % 1.13 % 4
replace bb to -- in lstringa<8>|64_mean 186 ns 185 ns 4
replace bb to -- in lstringa<8>|64_median 185 ns 184 ns 4
replace bb to -- in lstringa<8>|64_stddev 2.11 ns 5.27 ns 4
replace bb to -- in lstringa<8>|64_cv 1.13 % 2.84 % 4
replace bb to -- in lstringa<8>|256_mean 442 ns 432 ns 4
replace bb to -- in lstringa<8>|256_median 442 ns 435 ns 4
replace bb to -- in lstringa<8>|256_stddev 4.20 ns 9.35 ns 4
replace bb to -- in lstringa<8>|256_cv 0.95 % 2.16 % 4
replace bb to -- in lstringa<8>|512_mean 771 ns 767 ns 4
replace bb to -- in lstringa<8>|512_median 772 ns 767 ns 4
replace bb to -- in lstringa<8>|512_stddev 8.00 ns 14.2 ns 4
replace bb to -- in lstringa<8>|512_cv 1.04 % 1.86 % 4
replace bb to -- in lstringa<8>|1024_mean 1457 ns 1456 ns 4
replace bb to -- in lstringa<8>|1024_median 1454 ns 1465 ns 4
replace bb to -- in lstringa<8>|1024_stddev 11.9 ns 17.4 ns 4
replace bb to -- in lstringa<8>|1024_cv 0.82 % 1.20 % 4
replace bb to -- in lstringa<8>|2048_mean 2800 ns 2802 ns 4
replace bb to -- in lstringa<8>|2048_median 2804 ns 2816 ns 4
replace bb to -- in lstringa<8>|2048_stddev 36.9 ns 56.8 ns 4
replace bb to -- in lstringa<8>|2048_cv 1.32 % 2.03 % 4
replace bb to -- by init stringa|64_mean 165 ns 163 ns 4
replace bb to -- by init stringa|64_median 164 ns 164 ns 4
replace bb to -- by init stringa|64_stddev 0.342 ns 1.74 ns 4
replace bb to -- by init stringa|64_cv 0.21 % 1.07 % 4
replace bb to -- by init stringa|256_mean 367 ns 366 ns 4
replace bb to -- by init stringa|256_median 369 ns 368 ns 4
replace bb to -- by init stringa|256_stddev 3.87 ns 4.19 ns 4
replace bb to -- by init stringa|256_cv 1.05 % 1.14 % 4
replace bb to -- by init stringa|512_mean 632 ns 628 ns 4
replace bb to -- by init stringa|512_median 625 ns 621 ns 4
replace bb to -- by init stringa|512_stddev 20.0 ns 19.7 ns 4
replace bb to -- by init stringa|512_cv 3.16 % 3.14 % 4
replace bb to -- by init stringa|1024_mean 1108 ns 1111 ns 4
replace bb to -- by init stringa|1024_median 1113 ns 1123 ns 4
replace bb to -- by init stringa|1024_stddev 17.8 ns 24.4 ns 4
replace bb to -- by init stringa|1024_cv 1.61 % 2.20 % 4
replace bb to -- by init stringa|2048_mean 2118 ns 2120 ns 4
replace bb to -- by init stringa|2048_median 2129 ns 2131 ns 4
replace bb to -- by init stringa|2048_stddev 52.1 ns 57.1 ns 4
replace bb to -- by init stringa|2048_cv 2.46 % 2.69 % 4
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 4479657 ns 4464286 ns 4
hashStrMapA<size_t> emplace & find stringa;_median 4475352 ns 4464286 ns 4
hashStrMapA<size_t> emplace & find stringa;_stddev 66831 ns 82843 ns 4
hashStrMapA<size_t> emplace & find stringa;_cv 1.49 % 1.86 % 4
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 6065832 ns 6054688 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_median 6124586 ns 6171875 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 197357 ns 295776 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 3.25 % 4.89 % 4
hashStrMapA<size_t> emplace & find ssa;_mean 4127357 ns 4110647 ns 4
hashStrMapA<size_t> emplace & find ssa;_median 4151725 ns 4133358 ns 4
hashStrMapA<size_t> emplace & find ssa;_stddev 108956 ns 86976 ns 4
hashStrMapA<size_t> emplace & find ssa;_cv 2.64 % 2.12 % 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 6592167 ns 6487165 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 6513210 ns 6556920 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 328075 ns 139509 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 4.98 % 2.15 % 4
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 1622 ns 1617 ns 4
Build func full name std::string;_median 1619 ns 1632 ns 4
Build func full name std::string;_stddev 25.8 ns 31.4 ns 4
Build func full name std::string;_cv 1.59 % 1.94 % 4
Build func full name std::string 1;_mean 1697 ns 1678 ns 4
Build func full name std::string 1;_median 1703 ns 1669 ns 4
Build func full name std::string 1;_stddev 17.8 ns 36.7 ns 4
Build func full name std::string 1;_cv 1.05 % 2.19 % 4
Build func full name std::stream;_mean 9698 ns 9644 ns 4
Build func full name std::stream;_median 9701 ns 9521 ns 4
Build func full name std::stream;_stddev 143 ns 244 ns 4
Build func full name std::stream;_cv 1.47 % 2.53 % 4
Build func full name stringa;_mean 867 ns 868 ns 4
Build func full name stringa;_median 868 ns 868 ns 4
Build func full name stringa;_stddev 21.8 ns 12.1 ns 4
Build func full name stringa;_cv 2.51 % 1.39 % 4
Build func full name stringa 1;_mean 996 ns 994 ns 4
Build func full name stringa 1;_median 997 ns 994 ns 4
Build func full name stringa 1;_stddev 10.2 ns 12.1 ns 4
Build func full name stringa 1;_cv 1.02 % 1.22 % 4
----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
To upper case std::wstring_mean 1438 ns 1428 ns 4
To upper case std::wstring_median 1439 ns 1428 ns 4
To upper case std::wstring_stddev 11.0 ns 18.1 ns 4
To upper case std::wstring_cv 0.76 % 1.27 % 4
To upper case lstringw<15>_mean 44.4 ns 44.3 ns 4
To upper case lstringw<15>_median 44.4 ns 44.7 ns 4
To upper case lstringw<15>_stddev 0.322 ns 1.33 ns 4
To upper case lstringw<15>_cv 0.73 % 3.01 % 4

View File

@ -0,0 +1,981 @@
Benchmarks of simstr, version 1.8.1
Sources: https://github.com/orefkov/simstr
Results: https://orefkov.github.io/simstr/results.html
Compiler Clang 22.0.0, use libc++
Run on (32 X 2513.96 MHz CPU s)
Chrome/143.0.0.0 webasm
--------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------
----- Concatenate email ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat email std::format_mean 483 ns 483 ns 4
Concat email std::format_median 481 ns 481 ns 4
Concat email std::format_stddev 5.61 ns 5.61 ns 4
Concat email std::format_cv 1.16 % 1.16 % 4
Concat email std::stringstream_mean 1090 ns 1090 ns 4
Concat email std::stringstream_median 1095 ns 1095 ns 4
Concat email std::stringstream_stddev 16.5 ns 16.5 ns 4
Concat email std::stringstream_cv 1.51 % 1.51 % 4
Concat email stringzilla append_mean 230 ns 230 ns 4
Concat email stringzilla append_median 230 ns 230 ns 4
Concat email stringzilla append_stddev 1.55 ns 1.55 ns 4
Concat email stringzilla append_cv 0.68 % 0.67 % 4
Concat email stringzilla concat_mean 92.5 ns 92.5 ns 4
Concat email stringzilla concat_median 92.8 ns 92.8 ns 4
Concat email stringzilla concat_stddev 2.17 ns 2.17 ns 4
Concat email stringzilla concat_cv 2.35 % 2.35 % 4
Concat email std::string append_mean 289 ns 289 ns 4
Concat email std::string append_median 290 ns 290 ns 4
Concat email std::string append_stddev 8.94 ns 8.94 ns 4
Concat email std::string append_cv 3.10 % 3.10 % 4
Concat email std::string by strexpr_mean 88.2 ns 88.2 ns 4
Concat email std::string by strexpr_median 86.7 ns 86.7 ns 4
Concat email std::string by strexpr_stddev 5.21 ns 5.21 ns 4
Concat email std::string by strexpr_cv 5.91 % 5.91 % 4
Concat email stringa_mean 67.4 ns 67.4 ns 4
Concat email stringa_median 67.3 ns 67.3 ns 4
Concat email stringa_stddev 2.25 ns 2.25 ns 4
Concat email stringa_cv 3.34 % 3.34 % 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 1042 ns 1042 ns 4
Concat std::string and number by std to std::string_median 1048 ns 1048 ns 4
Concat std::string and number by std to std::string_stddev 25.0 ns 25.0 ns 4
Concat std::string and number by std to std::string_cv 2.40 % 2.40 % 4
Concat std::string and number by StrExpr to std::string_mean 486 ns 486 ns 4
Concat std::string and number by StrExpr to std::string_median 484 ns 484 ns 4
Concat std::string and number by StrExpr to std::string_stddev 13.4 ns 13.4 ns 4
Concat std::string and number by StrExpr to std::string_cv 2.77 % 2.77 % 4
Concat stringa and number by StrExpr to simstr::stringa_mean 217 ns 217 ns 4
Concat stringa and number by StrExpr to simstr::stringa_median 214 ns 214 ns 4
Concat stringa and number by StrExpr to simstr::stringa_stddev 8.29 ns 8.29 ns 4
Concat stringa and number by StrExpr to simstr::stringa_cv 3.82 % 3.82 % 4
Concat stringa and number by e_concat to simstr::stringa_mean 218 ns 218 ns 4
Concat stringa and number by e_concat to simstr::stringa_median 217 ns 217 ns 4
Concat stringa and number by e_concat to simstr::stringa_stddev 4.31 ns 4.31 ns 4
Concat stringa and number by e_concat to simstr::stringa_cv 1.98 % 1.98 % 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 2057 ns 2057 ns 4
Concat std::string and format hex number and literal to std::string_median 2054 ns 2054 ns 4
Concat std::string and format hex number and literal to std::string_stddev 53.5 ns 53.5 ns 4
Concat std::string and format hex number and literal to std::string_cv 2.60 % 2.60 % 4
std::format std::string and hex number by literal to std::string_mean 2629 ns 2629 ns 4
std::format std::string and hex number by literal to std::string_median 2624 ns 2624 ns 4
std::format std::string and hex number by literal to std::string_stddev 16.4 ns 16.4 ns 4
std::format std::string and hex number by literal to std::string_cv 0.63 % 0.63 % 4
Concat std::string and std::to_chars and string to std::string_mean 676 ns 676 ns 4
Concat std::string and std::to_chars and string to std::string_median 678 ns 678 ns 4
Concat std::string and std::to_chars and string to std::string_stddev 9.67 ns 9.67 ns 4
Concat std::string and std::to_chars and string to std::string_cv 1.43 % 1.43 % 4
Concat std::string and hex number and literal by StrExpr to std::string_mean 526 ns 526 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_median 525 ns 525 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_stddev 37.8 ns 37.8 ns 4
Concat std::string and hex number and literal by StrExpr to std::string_cv 7.20 % 7.20 % 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_mean 189 ns 189 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_median 187 ns 187 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_stddev 10.4 ns 10.4 ns 4
Concat stringa and hex number and literal by StrExpr to simstr::stringa_cv 5.52 % 5.52 % 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_mean 198 ns 198 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_median 199 ns 199 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_stddev 3.52 ns 3.52 ns 4
Concat stringa and hex number and literal by e_concat to simstr::stringa_cv 1.77 % 1.77 % 4
Subst stringa and hex number by e_subst literal to simstr::stringa_mean 355 ns 355 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_median 355 ns 355 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_stddev 12.1 ns 12.1 ns 4
Subst stringa and hex number by e_subst literal to simstr::stringa_cv 3.42 % 3.42 % 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_mean 843 ns 843 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_median 846 ns 846 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_stddev 29.0 ns 29.0 ns 4
Subst stringa and hex number by e_vsubst stra to simstr::stringa_cv 3.44 % 3.44 % 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 414 ns 414 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_median 413 ns 413 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_stddev 13.6 ns 13.6 ns 4
"abcdefghihklmopqr "_ss + i / 0x8a010_fmt + " end"_cv 3.27 % 3.28 % 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_mean 621 ns 621 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_median 618 ns 618 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_stddev 17.1 ns 17.1 ns 4
e_subst("abcdefghihklmopqr {} end", i / 0x8a010_fmt)_cv 2.76 % 2.76 % 4
e_vsubst(pattern, i / 0x8a010_fmt)_mean 1426 ns 1426 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_median 1430 ns 1430 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_stddev 22.1 ns 22.1 ns 4
e_vsubst(pattern, i / 0x8a010_fmt)_cv 1.55 % 1.55 % 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_mean 2149 ns 2149 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_median 2134 ns 2134 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_stddev 53.2 ns 53.2 ns 4
fmt::format(FMT_COMPILE("abcdefghihklmopqr {:#010o} end"), i)_cv 2.48 % 2.48 % 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_mean 2879 ns 2879 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_median 2903 ns 2903 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_stddev 57.1 ns 57.1 ns 4
fmt::format("abcdefghihklmopqr {:#010o} end", i)_cv 1.98 % 1.98 % 4
std::format("abcdefghihklmopqr {:#010o} end", i)_mean 2940 ns 2940 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_median 2935 ns 2935 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_stddev 62.6 ns 62.6 ns 4
std::format("abcdefghihklmopqr {:#010o} end", i)_cv 2.13 % 2.13 % 4
std::vformat(pattern, std::make_format_args(i))_mean 2985 ns 2985 ns 4
std::vformat(pattern, std::make_format_args(i))_median 2971 ns 2971 ns 4
std::vformat(pattern, std::make_format_args(i))_stddev 58.0 ns 58.0 ns 4
std::vformat(pattern, std::make_format_args(i))_cv 1.94 % 1.94 % 4
std::format with std::formatted_size_mean 5263 ns 5263 ns 4
std::format with std::formatted_size_median 5234 ns 5234 ns 4
std::format with std::formatted_size_stddev 98.0 ns 98.0 ns 4
std::format with std::formatted_size_cv 1.86 % 1.86 % 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_mean 8433 ns 8433 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_median 8423 ns 8423 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_stddev 118 ns 118 ns 4
strm << "abcdefghihklmopqr 0" << std::oct << std::setw(9) << std::setfill('0') << i << " end"_cv 1.40 % 1.40 % 4
----- Concatenate string + "Literal" ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat std::string by std to std::string_mean 109 ns 109 ns 4
Concat std::string by std to std::string_median 109 ns 109 ns 4
Concat std::string by std to std::string_stddev 1.82 ns 1.82 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 120 ns 120 ns 4
Concat std::string by StrExpr to std::string_median 120 ns 120 ns 4
Concat std::string by StrExpr to std::string_stddev 1.50 ns 1.50 ns 4
Concat std::string by StrExpr to std::string_cv 1.24 % 1.24 % 4
Concat stringa by StrExpr to stringa_mean 95.4 ns 95.4 ns 4
Concat stringa by StrExpr to stringa_median 95.0 ns 95.0 ns 4
Concat stringa by StrExpr to stringa_stddev 3.65 ns 3.65 ns 4
Concat stringa by StrExpr to stringa_cv 3.82 % 3.83 % 4
----- Find three concatenated string in string_view -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Find concat three std::string_mean 214 ns 214 ns 4
Find concat three std::string_median 210 ns 210 ns 4
Find concat three std::string_stddev 13.1 ns 13.1 ns 4
Find concat three std::string_cv 6.13 % 6.13 % 4
Find concat three strexpr_mean 100.0 ns 100.0 ns 4
Find concat three strexpr_median 100.0 ns 100.0 ns 4
Find concat three strexpr_stddev 1.10 ns 1.10 ns 4
Find concat three strexpr_cv 1.10 % 1.10 % 4
Find concat three simstr_mean 58.2 ns 58.2 ns 4
Find concat three simstr_median 58.1 ns 58.1 ns 4
Find concat three simstr_stddev 0.634 ns 0.635 ns 4
Find concat three simstr_cv 1.09 % 1.09 % 4
Find concat three stringzilla string_mean 268 ns 268 ns 4
Find concat three stringzilla string_median 268 ns 268 ns 4
Find concat three stringzilla string_stddev 1.90 ns 1.90 ns 4
Find concat three stringzilla string_cv 0.71 % 0.71 % 4
----- Build Type Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
BuildTypeNameStr 0/0_mean 20.9 ns 20.9 ns 4
BuildTypeNameStr 0/0_median 21.0 ns 21.0 ns 4
BuildTypeNameStr 0/0_stddev 0.189 ns 0.189 ns 4
BuildTypeNameStr 0/0_cv 0.90 % 0.90 % 4
BuildTypeNameExp 0/0_mean 23.1 ns 23.1 ns 4
BuildTypeNameExp 0/0_median 23.2 ns 23.2 ns 4
BuildTypeNameExp 0/0_stddev 0.711 ns 0.711 ns 4
BuildTypeNameExp 0/0_cv 3.09 % 3.09 % 4
BuildTypeNameSim 0/0_mean 20.4 ns 20.4 ns 4
BuildTypeNameSim 0/0_median 20.2 ns 20.2 ns 4
BuildTypeNameSim 0/0_stddev 0.751 ns 0.751 ns 4
BuildTypeNameSim 0/0_cv 3.67 % 3.67 % 4
BuildTypeNameStr 10/10_mean 365 ns 365 ns 4
BuildTypeNameStr 10/10_median 370 ns 370 ns 4
BuildTypeNameStr 10/10_stddev 13.3 ns 13.3 ns 4
BuildTypeNameStr 10/10_cv 3.65 % 3.65 % 4
BuildTypeNameExp 10/10_mean 116 ns 116 ns 4
BuildTypeNameExp 10/10_median 116 ns 116 ns 4
BuildTypeNameExp 10/10_stddev 7.06 ns 7.06 ns 4
BuildTypeNameExp 10/10_cv 6.10 % 6.10 % 4
BuildTypeNameSim 10/10_mean 69.0 ns 69.0 ns 4
BuildTypeNameSim 10/10_median 69.1 ns 69.2 ns 4
BuildTypeNameSim 10/10_stddev 1.79 ns 1.79 ns 4
BuildTypeNameSim 10/10_cv 2.59 % 2.59 % 4
----- Replace string by copy -----/repeats:1 0.000 ns 0.000 ns 1000000000000
Concat with replace str_mean 500 ns 500 ns 4
Concat with replace str_median 498 ns 498 ns 4
Concat with replace str_stddev 13.7 ns 13.7 ns 4
Concat with replace str_cv 2.74 % 2.74 % 4
Concat with replace exp_mean 235 ns 235 ns 4
Concat with replace exp_median 234 ns 234 ns 4
Concat with replace exp_stddev 2.95 ns 2.95 ns 4
Concat with replace exp_cv 1.25 % 1.26 % 4
----- Create Empty Str ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e;_mean 2.15 ns 2.15 ns 4
std::string e;_median 2.15 ns 2.15 ns 4
std::string e;_stddev 0.011 ns 0.011 ns 4
std::string e;_cv 0.49 % 0.49 % 4
std::string_view e;_mean 0.740 ns 0.740 ns 4
std::string_view e;_median 0.736 ns 0.736 ns 4
std::string_view e;_stddev 0.010 ns 0.010 ns 4
std::string_view e;_cv 1.30 % 1.30 % 4
ssa e;_mean 0.378 ns 0.378 ns 4
ssa e;_median 0.376 ns 0.376 ns 4
ssa e;_stddev 0.010 ns 0.010 ns 4
ssa e;_cv 2.62 % 2.62 % 4
stringa e;_mean 2.15 ns 2.15 ns 4
stringa e;_median 2.16 ns 2.16 ns 4
stringa e;_stddev 0.021 ns 0.021 ns 4
stringa e;_cv 0.99 % 0.99 % 4
lstringa<20> e;_mean 2.20 ns 2.20 ns 4
lstringa<20> e;_median 2.20 ns 2.20 ns 4
lstringa<20> e;_stddev 0.028 ns 0.028 ns 4
lstringa<20> e;_cv 1.27 % 1.27 % 4
lstringa<40> e;_mean 2.20 ns 2.20 ns 4
lstringa<40> e;_median 2.21 ns 2.21 ns 4
lstringa<40> e;_stddev 0.027 ns 0.027 ns 4
lstringa<40> e;_cv 1.21 % 1.21 % 4
----- Create Str from short literal (9 symbols) --------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "Test text";_mean 2.47 ns 2.47 ns 4
std::string e = "Test text";_median 2.47 ns 2.47 ns 4
std::string e = "Test text";_stddev 0.048 ns 0.048 ns 4
std::string e = "Test text";_cv 1.96 % 1.96 % 4
std::string_view e = "Test text";_mean 1.12 ns 1.12 ns 4
std::string_view e = "Test text";_median 1.12 ns 1.12 ns 4
std::string_view e = "Test text";_stddev 0.023 ns 0.023 ns 4
std::string_view e = "Test text";_cv 2.03 % 2.03 % 4
ssa e = "Test text";_mean 0.744 ns 0.744 ns 4
ssa e = "Test text";_median 0.732 ns 0.732 ns 4
ssa e = "Test text";_stddev 0.026 ns 0.026 ns 4
ssa e = "Test text";_cv 3.53 % 3.53 % 4
stringa e = "Test text";_mean 2.19 ns 2.19 ns 4
stringa e = "Test text";_median 2.19 ns 2.19 ns 4
stringa e = "Test text";_stddev 0.014 ns 0.014 ns 4
stringa e = "Test text";_cv 0.66 % 0.66 % 4
lstringa<20> e = "Test text";_mean 2.63 ns 2.63 ns 4
lstringa<20> e = "Test text";_median 2.64 ns 2.64 ns 4
lstringa<20> e = "Test text";_stddev 0.019 ns 0.019 ns 4
lstringa<20> e = "Test text";_cv 0.71 % 0.71 % 4
lstringa<40> e = "Test text";_mean 2.61 ns 2.61 ns 4
lstringa<40> e = "Test text";_median 2.61 ns 2.61 ns 4
lstringa<40> e = "Test text";_stddev 0.027 ns 0.027 ns 4
lstringa<40> e = "Test text";_cv 1.05 % 1.05 % 4
----- Create Str from long literal (30 symbols) ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string e = "123456789012345678901234567890";_mean 21.8 ns 21.8 ns 4
std::string e = "123456789012345678901234567890";_median 21.9 ns 21.9 ns 4
std::string e = "123456789012345678901234567890";_stddev 0.330 ns 0.329 ns 4
std::string e = "123456789012345678901234567890";_cv 1.51 % 1.51 % 4
std::string_view e = "123456789012345678901234567890";_mean 1.10 ns 1.10 ns 4
std::string_view e = "123456789012345678901234567890";_median 1.10 ns 1.10 ns 4
std::string_view e = "123456789012345678901234567890";_stddev 0.010 ns 0.010 ns 4
std::string_view e = "123456789012345678901234567890";_cv 0.93 % 0.93 % 4
ssa e = "123456789012345678901234567890";_mean 0.741 ns 0.741 ns 4
ssa e = "123456789012345678901234567890";_median 0.739 ns 0.739 ns 4
ssa e = "123456789012345678901234567890";_stddev 0.007 ns 0.007 ns 4
ssa e = "123456789012345678901234567890";_cv 0.93 % 0.93 % 4
stringa e = "123456789012345678901234567890";_mean 2.22 ns 2.22 ns 4
stringa e = "123456789012345678901234567890";_median 2.21 ns 2.21 ns 4
stringa e = "123456789012345678901234567890";_stddev 0.039 ns 0.039 ns 4
stringa e = "123456789012345678901234567890";_cv 1.76 % 1.76 % 4
lstringa<20> e = "123456789012345678901234567890";_mean 22.0 ns 22.0 ns 4
lstringa<20> e = "123456789012345678901234567890";_median 21.9 ns 21.9 ns 4
lstringa<20> e = "123456789012345678901234567890";_stddev 0.303 ns 0.303 ns 4
lstringa<20> e = "123456789012345678901234567890";_cv 1.38 % 1.38 % 4
lstringa<40> e = "123456789012345678901234567890";_mean 2.98 ns 2.98 ns 4
lstringa<40> e = "123456789012345678901234567890";_median 2.97 ns 2.97 ns 4
lstringa<40> e = "123456789012345678901234567890";_stddev 0.042 ns 0.042 ns 4
lstringa<40> e = "123456789012345678901234567890";_cv 1.40 % 1.40 % 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 3.72 ns 3.72 ns 4
std::string e = "Test text"; auto c{e};_median 3.70 ns 3.70 ns 4
std::string e = "Test text"; auto c{e};_stddev 0.073 ns 0.073 ns 4
std::string e = "Test text"; auto c{e};_cv 1.97 % 1.97 % 4
std::string_view e = "Test text"; auto c{e};_mean 1.10 ns 1.10 ns 4
std::string_view e = "Test text"; auto c{e};_median 1.10 ns 1.10 ns 4
std::string_view e = "Test text"; auto c{e};_stddev 0.016 ns 0.016 ns 4
std::string_view e = "Test text"; auto c{e};_cv 1.43 % 1.43 % 4
ssa e = "Test text"; auto c{e};_mean 1.11 ns 1.11 ns 4
ssa e = "Test text"; auto c{e};_median 1.11 ns 1.11 ns 4
ssa e = "Test text"; auto c{e};_stddev 0.016 ns 0.016 ns 4
ssa e = "Test text"; auto c{e};_cv 1.44 % 1.43 % 4
stringa e = "Test text"; auto c{e};_mean 2.53 ns 2.53 ns 4
stringa e = "Test text"; auto c{e};_median 2.53 ns 2.53 ns 4
stringa e = "Test text"; auto c{e};_stddev 0.004 ns 0.004 ns 4
stringa e = "Test text"; auto c{e};_cv 0.15 % 0.15 % 4
lstringa<20> e = "Test text"; auto c{e};_mean 4.17 ns 4.17 ns 4
lstringa<20> e = "Test text"; auto c{e};_median 4.17 ns 4.17 ns 4
lstringa<20> e = "Test text"; auto c{e};_stddev 0.031 ns 0.031 ns 4
lstringa<20> e = "Test text"; auto c{e};_cv 0.75 % 0.75 % 4
lstringa<40> e = "Test text"; auto c{e};_mean 4.49 ns 4.49 ns 4
lstringa<40> e = "Test text"; auto c{e};_median 4.49 ns 4.49 ns 4
lstringa<40> e = "Test text"; auto c{e};_stddev 0.079 ns 0.079 ns 4
lstringa<40> e = "Test text"; auto c{e};_cv 1.77 % 1.77 % 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 46.5 ns 46.5 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_median 45.8 ns 45.8 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_stddev 1.47 ns 1.47 ns 4
std::string e = "123456789012345678901234567890"; auto c{e};_cv 3.17 % 3.17 % 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_mean 1.11 ns 1.12 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_median 1.12 ns 1.12 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_stddev 0.019 ns 0.019 ns 4
std::string_view e = "123456789012345678901234567890"; auto c{e};_cv 1.69 % 1.69 % 4
ssa e = "123456789012345678901234567890"; auto c{e};_mean 0.750 ns 0.750 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_median 0.750 ns 0.750 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_stddev 0.009 ns 0.009 ns 4
ssa e = "123456789012345678901234567890"; auto c{e};_cv 1.22 % 1.22 % 4
stringa e = "123456789012345678901234567890"; auto c{e};_mean 2.21 ns 2.21 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_median 2.20 ns 2.20 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_stddev 0.033 ns 0.033 ns 4
stringa e = "123456789012345678901234567890"; auto c{e};_cv 1.48 % 1.48 % 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_mean 21.2 ns 21.2 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_median 21.2 ns 21.2 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_stddev 0.522 ns 0.522 ns 4
lstringa<20> e = "123456789012345678901234567890"; auto c{e};_cv 2.46 % 2.46 % 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_mean 15.8 ns 15.8 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_median 15.7 ns 15.7 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_stddev 0.213 ns 0.213 ns 4
lstringa<40> e = "123456789012345678901234567890"; auto c{e};_cv 1.35 % 1.35 % 4
----- Find 9 symbols text in end of 99 symbols text ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
sz::string::find;_mean 125 ns 125 ns 4
sz::string::find;_median 125 ns 125 ns 4
sz::string::find;_stddev 0.709 ns 0.709 ns 4
sz::string::find;_cv 0.57 % 0.57 % 4
std::string::find;_mean 40.8 ns 40.8 ns 4
std::string::find;_median 40.7 ns 40.7 ns 4
std::string::find;_stddev 0.562 ns 0.562 ns 4
std::string::find;_cv 1.38 % 1.38 % 4
std::string_view::find;_mean 41.2 ns 41.2 ns 4
std::string_view::find;_median 40.6 ns 40.6 ns 4
std::string_view::find;_stddev 1.36 ns 1.36 ns 4
std::string_view::find;_cv 3.31 % 3.31 % 4
ssa::find;_mean 40.6 ns 40.6 ns 4
ssa::find;_median 40.5 ns 40.5 ns 4
ssa::find;_stddev 0.597 ns 0.597 ns 4
ssa::find;_cv 1.47 % 1.47 % 4
stringa::find;_mean 41.2 ns 41.2 ns 4
stringa::find;_median 41.1 ns 41.1 ns 4
stringa::find;_stddev 0.538 ns 0.537 ns 4
stringa::find;_cv 1.30 % 1.30 % 4
lstringa<20>::find;_mean 39.8 ns 39.8 ns 4
lstringa<20>::find;_median 40.0 ns 40.0 ns 4
lstringa<20>::find;_stddev 0.572 ns 0.572 ns 4
lstringa<20>::find;_cv 1.44 % 1.44 % 4
lstringa<40>::find;_mean 39.7 ns 39.7 ns 4
lstringa<40>::find;_median 39.5 ns 39.5 ns 4
lstringa<40>::find;_stddev 0.736 ns 0.737 ns 4
lstringa<40>::find;_cv 1.86 % 1.86 % 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 52.3 ns 52.3 ns 4
std::string copy{str_with_len_N};/15_median 52.7 ns 52.7 ns 4
std::string copy{str_with_len_N};/15_stddev 1.46 ns 1.46 ns 4
std::string copy{str_with_len_N};/15_cv 2.79 % 2.80 % 4
std::string copy{str_with_len_N};/16_mean 53.0 ns 53.0 ns 4
std::string copy{str_with_len_N};/16_median 52.9 ns 52.9 ns 4
std::string copy{str_with_len_N};/16_stddev 1.28 ns 1.28 ns 4
std::string copy{str_with_len_N};/16_cv 2.42 % 2.42 % 4
std::string copy{str_with_len_N};/23_mean 52.5 ns 52.5 ns 4
std::string copy{str_with_len_N};/23_median 53.0 ns 53.0 ns 4
std::string copy{str_with_len_N};/23_stddev 1.61 ns 1.61 ns 4
std::string copy{str_with_len_N};/23_cv 3.07 % 3.07 % 4
std::string copy{str_with_len_N};/24_mean 51.6 ns 51.6 ns 4
std::string copy{str_with_len_N};/24_median 51.8 ns 51.8 ns 4
std::string copy{str_with_len_N};/24_stddev 0.532 ns 0.531 ns 4
std::string copy{str_with_len_N};/24_cv 1.03 % 1.03 % 4
std::string copy{str_with_len_N};/32_mean 53.9 ns 53.9 ns 4
std::string copy{str_with_len_N};/32_median 54.1 ns 54.1 ns 4
std::string copy{str_with_len_N};/32_stddev 0.490 ns 0.490 ns 4
std::string copy{str_with_len_N};/32_cv 0.91 % 0.91 % 4
std::string copy{str_with_len_N};/64_mean 54.4 ns 54.4 ns 4
std::string copy{str_with_len_N};/64_median 54.4 ns 54.4 ns 4
std::string copy{str_with_len_N};/64_stddev 0.482 ns 0.482 ns 4
std::string copy{str_with_len_N};/64_cv 0.89 % 0.89 % 4
std::string copy{str_with_len_N};/128_mean 59.7 ns 59.7 ns 4
std::string copy{str_with_len_N};/128_median 56.7 ns 56.7 ns 4
std::string copy{str_with_len_N};/128_stddev 6.91 ns 6.91 ns 4
std::string copy{str_with_len_N};/128_cv 11.58 % 11.58 % 4
std::string copy{str_with_len_N};/256_mean 73.8 ns 73.8 ns 4
std::string copy{str_with_len_N};/256_median 74.3 ns 74.3 ns 4
std::string copy{str_with_len_N};/256_stddev 8.94 ns 8.94 ns 4
std::string copy{str_with_len_N};/256_cv 12.12 % 12.12 % 4
std::string copy{str_with_len_N};/512_mean 81.2 ns 81.2 ns 4
std::string copy{str_with_len_N};/512_median 82.6 ns 82.6 ns 4
std::string copy{str_with_len_N};/512_stddev 9.69 ns 9.69 ns 4
std::string copy{str_with_len_N};/512_cv 11.94 % 11.94 % 4
std::string copy{str_with_len_N};/1024_mean 93.3 ns 93.3 ns 4
std::string copy{str_with_len_N};/1024_median 93.4 ns 93.4 ns 4
std::string copy{str_with_len_N};/1024_stddev 1.97 ns 1.97 ns 4
std::string copy{str_with_len_N};/1024_cv 2.11 % 2.11 % 4
std::string copy{str_with_len_N};/2048_mean 109 ns 109 ns 4
std::string copy{str_with_len_N};/2048_median 110 ns 110 ns 4
std::string copy{str_with_len_N};/2048_stddev 2.09 ns 2.09 ns 4
std::string copy{str_with_len_N};/2048_cv 1.92 % 1.92 % 4
std::string copy{str_with_len_N};/4096_mean 165 ns 165 ns 4
std::string copy{str_with_len_N};/4096_median 165 ns 165 ns 4
std::string copy{str_with_len_N};/4096_stddev 2.73 ns 2.73 ns 4
std::string copy{str_with_len_N};/4096_cv 1.65 % 1.65 % 4
stringa copy{str_with_len_N};/15_mean 2.46 ns 2.46 ns 4
stringa copy{str_with_len_N};/15_median 2.45 ns 2.45 ns 4
stringa copy{str_with_len_N};/15_stddev 0.085 ns 0.085 ns 4
stringa copy{str_with_len_N};/15_cv 3.46 % 3.46 % 4
stringa copy{str_with_len_N};/16_mean 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/16_median 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/16_stddev 0.050 ns 0.050 ns 4
stringa copy{str_with_len_N};/16_cv 1.09 % 1.09 % 4
stringa copy{str_with_len_N};/23_mean 4.54 ns 4.54 ns 4
stringa copy{str_with_len_N};/23_median 4.55 ns 4.55 ns 4
stringa copy{str_with_len_N};/23_stddev 0.024 ns 0.024 ns 4
stringa copy{str_with_len_N};/23_cv 0.54 % 0.54 % 4
stringa copy{str_with_len_N};/24_mean 4.55 ns 4.55 ns 4
stringa copy{str_with_len_N};/24_median 4.55 ns 4.55 ns 4
stringa copy{str_with_len_N};/24_stddev 0.034 ns 0.034 ns 4
stringa copy{str_with_len_N};/24_cv 0.75 % 0.75 % 4
stringa copy{str_with_len_N};/32_mean 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/32_median 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/32_stddev 0.064 ns 0.064 ns 4
stringa copy{str_with_len_N};/32_cv 1.41 % 1.41 % 4
stringa copy{str_with_len_N};/64_mean 4.56 ns 4.56 ns 4
stringa copy{str_with_len_N};/64_median 4.55 ns 4.55 ns 4
stringa copy{str_with_len_N};/64_stddev 0.059 ns 0.059 ns 4
stringa copy{str_with_len_N};/64_cv 1.29 % 1.29 % 4
stringa copy{str_with_len_N};/128_mean 4.55 ns 4.55 ns 4
stringa copy{str_with_len_N};/128_median 4.55 ns 4.55 ns 4
stringa copy{str_with_len_N};/128_stddev 0.060 ns 0.060 ns 4
stringa copy{str_with_len_N};/128_cv 1.32 % 1.32 % 4
stringa copy{str_with_len_N};/256_mean 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/256_median 4.56 ns 4.56 ns 4
stringa copy{str_with_len_N};/256_stddev 0.043 ns 0.043 ns 4
stringa copy{str_with_len_N};/256_cv 0.95 % 0.95 % 4
stringa copy{str_with_len_N};/512_mean 4.60 ns 4.60 ns 4
stringa copy{str_with_len_N};/512_median 4.58 ns 4.58 ns 4
stringa copy{str_with_len_N};/512_stddev 0.051 ns 0.051 ns 4
stringa copy{str_with_len_N};/512_cv 1.10 % 1.10 % 4
stringa copy{str_with_len_N};/1024_mean 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/1024_median 4.56 ns 4.56 ns 4
stringa copy{str_with_len_N};/1024_stddev 0.052 ns 0.052 ns 4
stringa copy{str_with_len_N};/1024_cv 1.14 % 1.14 % 4
stringa copy{str_with_len_N};/2048_mean 4.56 ns 4.56 ns 4
stringa copy{str_with_len_N};/2048_median 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/2048_stddev 0.045 ns 0.045 ns 4
stringa copy{str_with_len_N};/2048_cv 0.98 % 0.98 % 4
stringa copy{str_with_len_N};/4096_mean 4.57 ns 4.57 ns 4
stringa copy{str_with_len_N};/4096_median 4.59 ns 4.59 ns 4
stringa copy{str_with_len_N};/4096_stddev 0.055 ns 0.055 ns 4
stringa copy{str_with_len_N};/4096_cv 1.20 % 1.20 % 4
lstringa<16> copy{str_with_len_N};/15_mean 4.14 ns 4.14 ns 4
lstringa<16> copy{str_with_len_N};/15_median 4.12 ns 4.12 ns 4
lstringa<16> copy{str_with_len_N};/15_stddev 0.074 ns 0.074 ns 4
lstringa<16> copy{str_with_len_N};/15_cv 1.78 % 1.78 % 4
lstringa<16> copy{str_with_len_N};/16_mean 16.9 ns 16.9 ns 4
lstringa<16> copy{str_with_len_N};/16_median 16.5 ns 16.5 ns 4
lstringa<16> copy{str_with_len_N};/16_stddev 0.839 ns 0.839 ns 4
lstringa<16> copy{str_with_len_N};/16_cv 4.97 % 4.97 % 4
lstringa<16> copy{str_with_len_N};/23_mean 36.0 ns 36.0 ns 4
lstringa<16> copy{str_with_len_N};/23_median 36.0 ns 36.0 ns 4
lstringa<16> copy{str_with_len_N};/23_stddev 0.556 ns 0.556 ns 4
lstringa<16> copy{str_with_len_N};/23_cv 1.55 % 1.55 % 4
lstringa<16> copy{str_with_len_N};/24_mean 37.0 ns 37.0 ns 4
lstringa<16> copy{str_with_len_N};/24_median 37.0 ns 37.0 ns 4
lstringa<16> copy{str_with_len_N};/24_stddev 0.240 ns 0.240 ns 4
lstringa<16> copy{str_with_len_N};/24_cv 0.65 % 0.65 % 4
lstringa<16> copy{str_with_len_N};/32_mean 38.0 ns 38.0 ns 4
lstringa<16> copy{str_with_len_N};/32_median 37.8 ns 37.8 ns 4
lstringa<16> copy{str_with_len_N};/32_stddev 0.985 ns 0.985 ns 4
lstringa<16> copy{str_with_len_N};/32_cv 2.60 % 2.60 % 4
lstringa<16> copy{str_with_len_N};/64_mean 38.3 ns 38.3 ns 4
lstringa<16> copy{str_with_len_N};/64_median 38.3 ns 38.3 ns 4
lstringa<16> copy{str_with_len_N};/64_stddev 0.332 ns 0.332 ns 4
lstringa<16> copy{str_with_len_N};/64_cv 0.87 % 0.87 % 4
lstringa<16> copy{str_with_len_N};/128_mean 38.8 ns 38.8 ns 4
lstringa<16> copy{str_with_len_N};/128_median 38.4 ns 38.4 ns 4
lstringa<16> copy{str_with_len_N};/128_stddev 0.889 ns 0.889 ns 4
lstringa<16> copy{str_with_len_N};/128_cv 2.29 % 2.29 % 4
lstringa<16> copy{str_with_len_N};/256_mean 62.4 ns 62.4 ns 4
lstringa<16> copy{str_with_len_N};/256_median 66.7 ns 66.7 ns 4
lstringa<16> copy{str_with_len_N};/256_stddev 10.1 ns 10.1 ns 4
lstringa<16> copy{str_with_len_N};/256_cv 16.21 % 16.21 % 4
lstringa<16> copy{str_with_len_N};/512_mean 66.7 ns 66.7 ns 4
lstringa<16> copy{str_with_len_N};/512_median 69.9 ns 69.9 ns 4
lstringa<16> copy{str_with_len_N};/512_stddev 11.9 ns 11.9 ns 4
lstringa<16> copy{str_with_len_N};/512_cv 17.82 % 17.82 % 4
lstringa<16> copy{str_with_len_N};/1024_mean 78.8 ns 78.8 ns 4
lstringa<16> copy{str_with_len_N};/1024_median 78.5 ns 78.5 ns 4
lstringa<16> copy{str_with_len_N};/1024_stddev 3.36 ns 3.36 ns 4
lstringa<16> copy{str_with_len_N};/1024_cv 4.27 % 4.27 % 4
lstringa<16> copy{str_with_len_N};/2048_mean 94.8 ns 94.8 ns 4
lstringa<16> copy{str_with_len_N};/2048_median 94.8 ns 94.8 ns 4
lstringa<16> copy{str_with_len_N};/2048_stddev 0.570 ns 0.570 ns 4
lstringa<16> copy{str_with_len_N};/2048_cv 0.60 % 0.60 % 4
lstringa<16> copy{str_with_len_N};/4096_mean 146 ns 146 ns 4
lstringa<16> copy{str_with_len_N};/4096_median 146 ns 146 ns 4
lstringa<16> copy{str_with_len_N};/4096_stddev 2.30 ns 2.30 ns 4
lstringa<16> copy{str_with_len_N};/4096_cv 1.57 % 1.57 % 4
lstringa<512> copy{str_with_len_N};/15_mean 4.06 ns 4.06 ns 4
lstringa<512> copy{str_with_len_N};/15_median 4.06 ns 4.06 ns 4
lstringa<512> copy{str_with_len_N};/15_stddev 0.038 ns 0.038 ns 4
lstringa<512> copy{str_with_len_N};/15_cv 0.94 % 0.94 % 4
lstringa<512> copy{str_with_len_N};/16_mean 15.1 ns 15.1 ns 4
lstringa<512> copy{str_with_len_N};/16_median 15.1 ns 15.1 ns 4
lstringa<512> copy{str_with_len_N};/16_stddev 0.210 ns 0.210 ns 4
lstringa<512> copy{str_with_len_N};/16_cv 1.40 % 1.40 % 4
lstringa<512> copy{str_with_len_N};/23_mean 15.1 ns 15.1 ns 4
lstringa<512> copy{str_with_len_N};/23_median 15.2 ns 15.2 ns 4
lstringa<512> copy{str_with_len_N};/23_stddev 0.322 ns 0.322 ns 4
lstringa<512> copy{str_with_len_N};/23_cv 2.13 % 2.13 % 4
lstringa<512> copy{str_with_len_N};/24_mean 15.2 ns 15.2 ns 4
lstringa<512> copy{str_with_len_N};/24_median 15.2 ns 15.2 ns 4
lstringa<512> copy{str_with_len_N};/24_stddev 0.357 ns 0.357 ns 4
lstringa<512> copy{str_with_len_N};/24_cv 2.34 % 2.34 % 4
lstringa<512> copy{str_with_len_N};/32_mean 16.9 ns 16.9 ns 4
lstringa<512> copy{str_with_len_N};/32_median 17.0 ns 17.0 ns 4
lstringa<512> copy{str_with_len_N};/32_stddev 0.320 ns 0.320 ns 4
lstringa<512> copy{str_with_len_N};/32_cv 1.90 % 1.90 % 4
lstringa<512> copy{str_with_len_N};/64_mean 17.9 ns 17.9 ns 4
lstringa<512> copy{str_with_len_N};/64_median 18.1 ns 18.1 ns 4
lstringa<512> copy{str_with_len_N};/64_stddev 0.618 ns 0.618 ns 4
lstringa<512> copy{str_with_len_N};/64_cv 3.46 % 3.46 % 4
lstringa<512> copy{str_with_len_N};/128_mean 18.2 ns 18.2 ns 4
lstringa<512> copy{str_with_len_N};/128_median 18.2 ns 18.2 ns 4
lstringa<512> copy{str_with_len_N};/128_stddev 0.466 ns 0.466 ns 4
lstringa<512> copy{str_with_len_N};/128_cv 2.56 % 2.56 % 4
lstringa<512> copy{str_with_len_N};/256_mean 20.8 ns 20.8 ns 4
lstringa<512> copy{str_with_len_N};/256_median 21.0 ns 21.0 ns 4
lstringa<512> copy{str_with_len_N};/256_stddev 0.540 ns 0.540 ns 4
lstringa<512> copy{str_with_len_N};/256_cv 2.59 % 2.59 % 4
lstringa<512> copy{str_with_len_N};/512_mean 24.0 ns 24.0 ns 4
lstringa<512> copy{str_with_len_N};/512_median 24.0 ns 24.0 ns 4
lstringa<512> copy{str_with_len_N};/512_stddev 0.374 ns 0.374 ns 4
lstringa<512> copy{str_with_len_N};/512_cv 1.56 % 1.56 % 4
lstringa<512> copy{str_with_len_N};/1024_mean 78.6 ns 78.6 ns 4
lstringa<512> copy{str_with_len_N};/1024_median 77.5 ns 77.5 ns 4
lstringa<512> copy{str_with_len_N};/1024_stddev 2.75 ns 2.75 ns 4
lstringa<512> copy{str_with_len_N};/1024_cv 3.49 % 3.49 % 4
lstringa<512> copy{str_with_len_N};/2048_mean 95.8 ns 95.8 ns 4
lstringa<512> copy{str_with_len_N};/2048_median 95.7 ns 95.7 ns 4
lstringa<512> copy{str_with_len_N};/2048_stddev 2.32 ns 2.32 ns 4
lstringa<512> copy{str_with_len_N};/2048_cv 2.42 % 2.42 % 4
lstringa<512> copy{str_with_len_N};/4096_mean 146 ns 146 ns 4
lstringa<512> copy{str_with_len_N};/4096_median 146 ns 146 ns 4
lstringa<512> copy{str_with_len_N};/4096_stddev 1.96 ns 1.96 ns 4
lstringa<512> copy{str_with_len_N};/4096_cv 1.34 % 1.34 % 4
----- Convert to int '1234567' ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_mean 91.7 ns 91.7 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_median 91.5 ns 91.5 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_stddev 1.23 ns 1.23 ns 4
std::string s = "123456789"; int res = std::strtol(s.c_str(), 0, 10);_cv 1.34 % 1.34 % 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_mean 0.739 ns 0.739 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_median 0.740 ns 0.740 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_stddev 0.006 ns 0.006 ns 4
std::string_view s = "123456789"; std::from_chars(s.data(), s.data() + s.size(), res, 10);_cv 0.86 % 0.86 % 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 20.4 ns 20.4 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 20.4 ns 20.4 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.133 ns 0.133 ns 4
stringa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 0.65 % 0.65 % 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 16.2 ns 16.2 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_median 16.2 ns 16.2 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.183 ns 0.183 ns 4
ssa s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.13 % 1.13 % 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_mean 16.1 ns 16.1 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_median 16.1 ns 16.1 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_stddev 0.297 ns 0.297 ns 4
lstringa<20> s = "123456789"; int res = s.to_int<int, true, 10, false>_cv 1.84 % 1.84 % 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 67.2 ns 67.2 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_median 67.2 ns 67.2 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_stddev 0.233 ns 0.233 ns 4
std::string s = "abcDef"; int res = std::strtol(s.c_str(), 0, 16);_cv 0.35 % 0.35 % 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_mean 18.3 ns 18.3 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_median 18.3 ns 18.3 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_stddev 0.264 ns 0.263 ns 4
std::string_view s = "abcDef"; std::from_chars(s.data(), s.data() + s.size(), res, 16);_cv 1.44 % 1.44 % 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 17.2 ns 17.2 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 17.3 ns 17.3 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.309 ns 0.309 ns 4
stringa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.79 % 1.79 % 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 16.7 ns 16.7 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 16.6 ns 16.6 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.184 ns 0.184 ns 4
ssa s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 1.10 % 1.10 % 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_mean 16.1 ns 16.1 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_median 16.0 ns 16.0 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_stddev 0.330 ns 0.330 ns 4
lstringa<20> s = "abcDef"; int res = s.to_int<int, true, 16, false>_cv 2.04 % 2.04 % 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 97.3 ns 97.3 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_median 97.6 ns 97.6 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_stddev 1.28 ns 1.28 ns 4
std::string s = " 123456789"; int res = std::strtol(s.c_str(), 0, 0);_cv 1.32 % 1.32 % 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_mean 13.7 ns 13.7 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_median 13.7 ns 13.7 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_stddev 0.061 ns 0.061 ns 4
stringa s = " 123456789"; int res = s.to_int<int>; // Check overflow_cv 0.44 % 0.44 % 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_mean 15.0 ns 15.0 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_median 15.0 ns 15.0 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_stddev 0.408 ns 0.407 ns 4
ssa s = " 123456789"; int res = s.to_int<int, false>; // No check overflow_cv 2.71 % 2.71 % 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 298 ns 298 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_median 297 ns 297 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_stddev 4.44 ns 4.45 ns 4
std::string s = "1234.567e10"; double res = std::strtod(s.c_str(), nullptr);_cv 1.49 % 1.49 % 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_mean 108 ns 108 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_median 108 ns 108 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_stddev 1.57 ns 1.57 ns 4
std::string_view s = "1234.567e10"; std::from_chars(s.data(), s.data() + s.size(), res);_cv 1.45 % 1.45 % 4
ssa s = "1234.567e10"; double res = *s.to_double()_mean 42.2 ns 42.2 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_median 42.3 ns 42.3 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_stddev 0.399 ns 0.399 ns 4
ssa s = "1234.567e10"; double res = *s.to_double()_cv 0.95 % 0.95 % 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 6499 ns 6499 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_median 6469 ns 6469 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_stddev 189 ns 189 ns 4
std::stringstream str; ... str << "abbaabbaabbaabba";_cv 2.90 % 2.90 % 4
std::string str; ... str += "abbaabbaabbaabba";_mean 815 ns 815 ns 4
std::string str; ... str += "abbaabbaabbaabba";_median 820 ns 820 ns 4
std::string str; ... str += "abbaabbaabbaabba";_stddev 20.2 ns 20.2 ns 4
std::string str; ... str += "abbaabbaabbaabba";_cv 2.48 % 2.48 % 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_mean 794 ns 794 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_median 793 ns 793 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_stddev 94.1 ns 94.1 ns 4
lstringa<8> str; ... str += "abbaabbaabbaabba";_cv 11.84 % 11.84 % 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_mean 620 ns 620 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_median 615 ns 615 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_stddev 22.6 ns 22.6 ns 4
lstringa<128> str; ... str += "abbaabbaabbaabba";_cv 3.65 % 3.65 % 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_mean 401 ns 401 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_median 405 ns 405 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_stddev 14.1 ns 14.1 ns 4
lstringa<512> str; ... str += "abbaabbaabbaabba";_cv 3.52 % 3.52 % 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_mean 335 ns 335 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_median 335 ns 335 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_stddev 4.51 ns 4.52 ns 4
lstringa<1024> str; ... str += "abbaabbaabbaabba";_cv 1.35 % 1.35 % 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 7163 ns 7163 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_median 7211 ns 7211 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_stddev 153 ns 153 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba";_cv 2.14 % 2.14 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_mean 2186 ns 2186 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_median 2185 ns 2185 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_stddev 40.6 ns 40.6 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba";_cv 1.86 % 1.86 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_mean 890 ns 890 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_median 892 ns 892 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_stddev 31.5 ns 31.5 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba";_cv 3.54 % 3.54 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_mean 864 ns 864 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_median 843 ns 843 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_stddev 72.7 ns 72.7 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba";_cv 8.42 % 8.42 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_mean 722 ns 722 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_median 723 ns 723 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_stddev 6.78 ns 6.79 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba";_cv 0.94 % 0.94 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_mean 639 ns 639 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_median 637 ns 637 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_stddev 18.2 ns 18.3 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba";_cv 2.85 % 2.86 % 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 348509 ns 348511 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_median 346178 ns 346180 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_stddev 6563 ns 6565 ns 4
std::stringstream str; ... str << str_var << "abbaabbaabbaabba"; 2048 times_cv 1.88 % 1.88 % 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 120123 ns 120124 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 119443 ns 119443 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 2307 ns 2307 ns 4
std::string str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.92 % 1.92 % 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 44146 ns 44146 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 44022 ns 44023 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 746 ns 746 ns 4
lstringa<8> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.69 % 1.69 % 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 44572 ns 44572 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 44629 ns 44629 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 793 ns 793 ns 4
lstringa<128> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.78 % 1.78 % 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 44298 ns 44298 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 44441 ns 44441 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 777 ns 777 ns 4
lstringa<512> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.75 % 1.75 % 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_mean 44327 ns 44327 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_median 44235 ns 44235 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_stddev 660 ns 660 ns 4
lstringa<1024> str; ... str += str_var + "abbaabbaabbaabba"; 2048 times_cv 1.49 % 1.49 % 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 7317 ns 7317 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_median 7276 ns 7276 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_stddev 187 ns 187 ns 4
std::stringstream str; ... str << str_var1 << str_var2;_cv 2.55 % 2.55 % 4
std::string str; ... str += str_var1 + str_var2;_mean 2607 ns 2607 ns 4
std::string str; ... str += str_var1 + str_var2;_median 2588 ns 2588 ns 4
std::string str; ... str += str_var1 + str_var2;_stddev 76.9 ns 77.0 ns 4
std::string str; ... str += str_var1 + str_var2;_cv 2.95 % 2.95 % 4
lstringa<16> str; ... str += str_var1 + str_var2;_mean 1132 ns 1132 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_median 1125 ns 1125 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_stddev 24.3 ns 24.3 ns 4
lstringa<16> str; ... str += str_var1 + str_var2;_cv 2.15 % 2.15 % 4
lstringa<128> str; ... str += str_var1 + str_var2;_mean 1062 ns 1062 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_median 1062 ns 1062 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_stddev 10.9 ns 10.9 ns 4
lstringa<128> str; ... str += str_var1 + str_var2;_cv 1.03 % 1.03 % 4
lstringa<512> str; ... str += str_var1 + str_var2;_mean 914 ns 914 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_median 917 ns 917 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_stddev 16.5 ns 16.5 ns 4
lstringa<512> str; ... str += str_var1 + str_var2;_cv 1.81 % 1.81 % 4
lstringa<1024> str; ... str += str_var1 + str_var2;_mean 829 ns 829 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_median 829 ns 829 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_stddev 14.6 ns 14.6 ns 4
lstringa<1024> str; ... str += str_var1 + str_var2;_cv 1.76 % 1.76 % 4
-- Append text, number, text --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::stringstream str; str << "test = " << k << " times";_mean 11412 ns 11412 ns 4
std::stringstream str; str << "test = " << k << " times";_median 11465 ns 11465 ns 4
std::stringstream str; str << "test = " << k << " times";_stddev 153 ns 153 ns 4
std::stringstream str; str << "test = " << k << " times";_cv 1.34 % 1.34 % 4
std::string str = "test = " + std::to_string(k) + " times";_mean 1772 ns 1772 ns 4
std::string str = "test = " + std::to_string(k) + " times";_median 1755 ns 1755 ns 4
std::string str = "test = " + std::to_string(k) + " times";_stddev 99.1 ns 99.1 ns 4
std::string str = "test = " + std::to_string(k) + " times";_cv 5.59 % 5.59 % 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_mean 5285 ns 5285 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_median 5294 ns 5294 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_stddev 36.6 ns 36.6 ns 4
char buf[100]; sprintf(buf, "test = %u times", k); std::string str = buf;_cv 0.69 % 0.69 % 4
std::string str = std::format("test = {} times", k);_mean 2834 ns 2834 ns 4
std::string str = std::format("test = {} times", k);_median 2832 ns 2832 ns 4
std::string str = std::format("test = {} times", k);_stddev 37.0 ns 37.0 ns 4
std::string str = std::format("test = {} times", k);_cv 1.30 % 1.30 % 4
lstringa<8> str; str.format("test = {} times", k);_mean 4681 ns 4681 ns 4
lstringa<8> str; str.format("test = {} times", k);_median 4678 ns 4678 ns 4
lstringa<8> str; str.format("test = {} times", k);_stddev 65.6 ns 65.6 ns 4
lstringa<8> str; str.format("test = {} times", k);_cv 1.40 % 1.40 % 4
lstringa<32> str; str.format("test = {} times", k);_mean 4054 ns 4054 ns 4
lstringa<32> str; str.format("test = {} times", k);_median 4047 ns 4047 ns 4
lstringa<32> str; str.format("test = {} times", k);_stddev 105 ns 105 ns 4
lstringa<32> str; str.format("test = {} times", k);_cv 2.59 % 2.59 % 4
lstringa<8> str = "test = " + k + " times";_mean 555 ns 555 ns 4
lstringa<8> str = "test = " + k + " times";_median 546 ns 546 ns 4
lstringa<8> str = "test = " + k + " times";_stddev 29.0 ns 29.0 ns 4
lstringa<8> str = "test = " + k + " times";_cv 5.22 % 5.22 % 4
lstringa<32> str = "test = " + k + " times";_mean 339 ns 339 ns 4
lstringa<32> str = "test = " + k + " times";_median 341 ns 341 ns 4
lstringa<32> str = "test = " + k + " times";_stddev 10.3 ns 10.3 ns 4
lstringa<32> str = "test = " + k + " times";_cv 3.03 % 3.03 % 4
stringa str = "test = " + k + " times";_mean 511 ns 511 ns 4
stringa str = "test = " + k + " times";_median 512 ns 512 ns 4
stringa str = "test = " + k + " times";_stddev 30.8 ns 30.8 ns 4
stringa str = "test = " + k + " times";_cv 6.01 % 6.01 % 4
-- Split text and convert to int --/repeats:1 0.000 ns 0.000 ns 1000000000000
std::string::find + substr + std::strtol_mean 660 ns 660 ns 4
std::string::find + substr + std::strtol_median 660 ns 660 ns 4
std::string::find + substr + std::strtol_stddev 10.3 ns 10.3 ns 4
std::string::find + substr + std::strtol_cv 1.56 % 1.56 % 4
ssa::splitter + ssa::as_int_mean 245 ns 245 ns 4
ssa::splitter + ssa::as_int_median 244 ns 244 ns 4
ssa::splitter + ssa::as_int_stddev 3.30 ns 3.30 ns 4
ssa::splitter + ssa::as_int_cv 1.35 % 1.35 % 4
ssa::splitf + functor_mean 271 ns 271 ns 4
ssa::splitf + functor_median 268 ns 268 ns 4
ssa::splitf + functor_stddev 7.54 ns 7.54 ns 4
ssa::splitf + functor_cv 2.78 % 2.78 % 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 2872 ns 2872 ns 4
Naive (and wrong) replace symbols with std::string find + replace_median 2855 ns 2855 ns 4
Naive (and wrong) replace symbols with std::string find + replace_stddev 93.5 ns 93.5 ns 4
Naive (and wrong) replace symbols with std::string find + replace_cv 3.25 % 3.26 % 4
replace symbols with std::string find_first_of + replace_mean 5223 ns 5223 ns 4
replace symbols with std::string find_first_of + replace_median 5241 ns 5241 ns 4
replace symbols with std::string find_first_of + replace_stddev 157 ns 157 ns 4
replace symbols with std::string find_first_of + replace_cv 3.01 % 3.01 % 4
replace symbols with std::string_view find_first_of + copy_mean 2704 ns 2704 ns 4
replace symbols with std::string_view find_first_of + copy_median 2721 ns 2721 ns 4
replace symbols with std::string_view find_first_of + copy_stddev 96.7 ns 96.7 ns 4
replace symbols with std::string_view find_first_of + copy_cv 3.58 % 3.57 % 4
replace runtime symbols with string expressions and without remembering all search results_mean 2675 ns 2675 ns 4
replace runtime symbols with string expressions and without remembering all search results_median 2681 ns 2681 ns 4
replace runtime symbols with string expressions and without remembering all search results_stddev 59.7 ns 59.7 ns 4
replace runtime symbols with string expressions and without remembering all search results_cv 2.23 % 2.23 % 4
replace runtime symbols with simstr and memorization of all search results_mean 2107 ns 2107 ns 4
replace runtime symbols with simstr and memorization of all search results_median 2118 ns 2118 ns 4
replace runtime symbols with simstr and memorization of all search results_stddev 57.8 ns 57.8 ns 4
replace runtime symbols with simstr and memorization of all search results_cv 2.74 % 2.74 % 4
replace const symbols with string expressions and without remembering all search results_mean 2227 ns 2227 ns 4
replace const symbols with string expressions and without remembering all search results_median 2210 ns 2210 ns 4
replace const symbols with string expressions and without remembering all search results_stddev 56.1 ns 56.1 ns 4
replace const symbols with string expressions and without remembering all search results_cv 2.52 % 2.52 % 4
replace const symbols with string expressions and memorization of all search results_mean 1872 ns 1872 ns 4
replace const symbols with string expressions and memorization of all search results_median 1874 ns 1874 ns 4
replace const symbols with string expressions and memorization of all search results_stddev 23.9 ns 23.9 ns 4
replace const symbols with string expressions and memorization of all search results_cv 1.27 % 1.27 % 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 472 ns 472 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_median 472 ns 472 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_stddev 8.01 ns 8.00 ns 4
Short Naive (and wrong) replace symbols with std::string find + replace_cv 1.70 % 1.70 % 4
Short replace symbols with std::string find_first_of + replace_mean 718 ns 718 ns 4
Short replace symbols with std::string find_first_of + replace_median 717 ns 717 ns 4
Short replace symbols with std::string find_first_of + replace_stddev 18.4 ns 18.4 ns 4
Short replace symbols with std::string find_first_of + replace_cv 2.57 % 2.57 % 4
Short replace symbols with std::string_view find_first_of + copy_mean 433 ns 433 ns 4
Short replace symbols with std::string_view find_first_of + copy_median 438 ns 438 ns 4
Short replace symbols with std::string_view find_first_of + copy_stddev 15.1 ns 15.1 ns 4
Short replace symbols with std::string_view find_first_of + copy_cv 3.49 % 3.49 % 4
Short replace runtime symbols with string expressions and without remembering all search results_mean 378 ns 378 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_median 374 ns 374 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_stddev 11.6 ns 11.6 ns 4
Short replace runtime symbols with string expressions and without remembering all search results_cv 3.07 % 3.07 % 4
Short replace runtime symbols with simstr and memorization of all search results_mean 391 ns 391 ns 4
Short replace runtime symbols with simstr and memorization of all search results_median 389 ns 389 ns 4
Short replace runtime symbols with simstr and memorization of all search results_stddev 8.66 ns 8.66 ns 4
Short replace runtime symbols with simstr and memorization of all search results_cv 2.22 % 2.22 % 4
Short replace const symbols with string expressions and without remembering all search results_mean 271 ns 271 ns 4
Short replace const symbols with string expressions and without remembering all search results_median 274 ns 274 ns 4
Short replace const symbols with string expressions and without remembering all search results_stddev 10.6 ns 10.6 ns 4
Short replace const symbols with string expressions and without remembering all search results_cv 3.91 % 3.91 % 4
Short replace const symbols with string expressions and memorization of all search results_mean 294 ns 294 ns 4
Short replace const symbols with string expressions and memorization of all search results_median 296 ns 296 ns 4
Short replace const symbols with string expressions and memorization of all search results_stddev 6.16 ns 6.16 ns 4
Short replace const symbols with string expressions and memorization of all search results_cv 2.09 % 2.09 % 4
----- Replace All Str To Longer Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to ---- in std::string|64_mean 363 ns 363 ns 4
replace bb to ---- in std::string|64_median 363 ns 363 ns 4
replace bb to ---- in std::string|64_stddev 17.7 ns 17.7 ns 4
replace bb to ---- in std::string|64_cv 4.89 % 4.89 % 4
replace bb to ---- in std::string|256_mean 1189 ns 1189 ns 4
replace bb to ---- in std::string|256_median 1176 ns 1176 ns 4
replace bb to ---- in std::string|256_stddev 42.3 ns 42.3 ns 4
replace bb to ---- in std::string|256_cv 3.56 % 3.56 % 4
replace bb to ---- in std::string|512_mean 2210 ns 2210 ns 4
replace bb to ---- in std::string|512_median 2215 ns 2215 ns 4
replace bb to ---- in std::string|512_stddev 90.9 ns 90.9 ns 4
replace bb to ---- in std::string|512_cv 4.12 % 4.12 % 4
replace bb to ---- in std::string|1024_mean 4756 ns 4756 ns 4
replace bb to ---- in std::string|1024_median 4774 ns 4774 ns 4
replace bb to ---- in std::string|1024_stddev 235 ns 235 ns 4
replace bb to ---- in std::string|1024_cv 4.94 % 4.94 % 4
replace bb to ---- in std::string|2048_mean 11109 ns 11109 ns 4
replace bb to ---- in std::string|2048_median 11132 ns 11132 ns 4
replace bb to ---- in std::string|2048_stddev 260 ns 260 ns 4
replace bb to ---- in std::string|2048_cv 2.34 % 2.34 % 4
replace bb to ---- in lstringa<8>|64_mean 292 ns 292 ns 4
replace bb to ---- in lstringa<8>|64_median 292 ns 292 ns 4
replace bb to ---- in lstringa<8>|64_stddev 13.1 ns 13.1 ns 4
replace bb to ---- in lstringa<8>|64_cv 4.49 % 4.49 % 4
replace bb to ---- in lstringa<8>|256_mean 913 ns 913 ns 4
replace bb to ---- in lstringa<8>|256_median 918 ns 918 ns 4
replace bb to ---- in lstringa<8>|256_stddev 27.9 ns 27.9 ns 4
replace bb to ---- in lstringa<8>|256_cv 3.06 % 3.06 % 4
replace bb to ---- in lstringa<8>|512_mean 1685 ns 1685 ns 4
replace bb to ---- in lstringa<8>|512_median 1682 ns 1682 ns 4
replace bb to ---- in lstringa<8>|512_stddev 31.6 ns 31.6 ns 4
replace bb to ---- in lstringa<8>|512_cv 1.88 % 1.88 % 4
replace bb to ---- in lstringa<8>|1024_mean 3100 ns 3100 ns 4
replace bb to ---- in lstringa<8>|1024_median 3052 ns 3052 ns 4
replace bb to ---- in lstringa<8>|1024_stddev 117 ns 117 ns 4
replace bb to ---- in lstringa<8>|1024_cv 3.77 % 3.77 % 4
replace bb to ---- in lstringa<8>|2048_mean 6119 ns 6119 ns 4
replace bb to ---- in lstringa<8>|2048_median 6220 ns 6220 ns 4
replace bb to ---- in lstringa<8>|2048_stddev 316 ns 316 ns 4
replace bb to ---- in lstringa<8>|2048_cv 5.16 % 5.16 % 4
replace bb to ---- by init stringa|64_mean 187 ns 187 ns 4
replace bb to ---- by init stringa|64_median 184 ns 184 ns 4
replace bb to ---- by init stringa|64_stddev 13.2 ns 13.2 ns 4
replace bb to ---- by init stringa|64_cv 7.05 % 7.05 % 4
replace bb to ---- by init stringa|256_mean 580 ns 580 ns 4
replace bb to ---- by init stringa|256_median 591 ns 591 ns 4
replace bb to ---- by init stringa|256_stddev 28.6 ns 28.6 ns 4
replace bb to ---- by init stringa|256_cv 4.94 % 4.94 % 4
replace bb to ---- by init stringa|512_mean 1341 ns 1341 ns 4
replace bb to ---- by init stringa|512_median 1340 ns 1340 ns 4
replace bb to ---- by init stringa|512_stddev 12.1 ns 12.1 ns 4
replace bb to ---- by init stringa|512_cv 0.90 % 0.90 % 4
replace bb to ---- by init stringa|1024_mean 2813 ns 2813 ns 4
replace bb to ---- by init stringa|1024_median 2828 ns 2828 ns 4
replace bb to ---- by init stringa|1024_stddev 55.7 ns 55.7 ns 4
replace bb to ---- by init stringa|1024_cv 1.98 % 1.98 % 4
replace bb to ---- by init stringa|2048_mean 5550 ns 5550 ns 4
replace bb to ---- by init stringa|2048_median 5503 ns 5503 ns 4
replace bb to ---- by init stringa|2048_stddev 133 ns 133 ns 4
replace bb to ---- by init stringa|2048_cv 2.39 % 2.39 % 4
----- Replace All Str To Same Size ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
replace bb to -- in std::string|64_mean 243 ns 243 ns 4
replace bb to -- in std::string|64_median 242 ns 242 ns 4
replace bb to -- in std::string|64_stddev 4.47 ns 4.47 ns 4
replace bb to -- in std::string|64_cv 1.84 % 1.84 % 4
replace bb to -- in std::string|256_mean 814 ns 814 ns 4
replace bb to -- in std::string|256_median 817 ns 817 ns 4
replace bb to -- in std::string|256_stddev 30.9 ns 30.9 ns 4
replace bb to -- in std::string|256_cv 3.79 % 3.79 % 4
replace bb to -- in std::string|512_mean 1542 ns 1542 ns 4
replace bb to -- in std::string|512_median 1548 ns 1548 ns 4
replace bb to -- in std::string|512_stddev 58.0 ns 58.0 ns 4
replace bb to -- in std::string|512_cv 3.76 % 3.76 % 4
replace bb to -- in std::string|1024_mean 2825 ns 2825 ns 4
replace bb to -- in std::string|1024_median 2823 ns 2823 ns 4
replace bb to -- in std::string|1024_stddev 73.7 ns 73.7 ns 4
replace bb to -- in std::string|1024_cv 2.61 % 2.61 % 4
replace bb to -- in std::string|2048_mean 5545 ns 5545 ns 4
replace bb to -- in std::string|2048_median 5553 ns 5553 ns 4
replace bb to -- in std::string|2048_stddev 80.6 ns 80.6 ns 4
replace bb to -- in std::string|2048_cv 1.45 % 1.45 % 4
replace bb to -- in lstringa<8>|64_mean 192 ns 192 ns 4
replace bb to -- in lstringa<8>|64_median 192 ns 192 ns 4
replace bb to -- in lstringa<8>|64_stddev 2.88 ns 2.88 ns 4
replace bb to -- in lstringa<8>|64_cv 1.50 % 1.50 % 4
replace bb to -- in lstringa<8>|256_mean 636 ns 636 ns 4
replace bb to -- in lstringa<8>|256_median 636 ns 636 ns 4
replace bb to -- in lstringa<8>|256_stddev 5.38 ns 5.37 ns 4
replace bb to -- in lstringa<8>|256_cv 0.85 % 0.84 % 4
replace bb to -- in lstringa<8>|512_mean 1150 ns 1150 ns 4
replace bb to -- in lstringa<8>|512_median 1131 ns 1131 ns 4
replace bb to -- in lstringa<8>|512_stddev 42.8 ns 42.8 ns 4
replace bb to -- in lstringa<8>|512_cv 3.72 % 3.72 % 4
replace bb to -- in lstringa<8>|1024_mean 2296 ns 2296 ns 4
replace bb to -- in lstringa<8>|1024_median 2292 ns 2292 ns 4
replace bb to -- in lstringa<8>|1024_stddev 64.2 ns 64.2 ns 4
replace bb to -- in lstringa<8>|1024_cv 2.80 % 2.80 % 4
replace bb to -- in lstringa<8>|2048_mean 4237 ns 4237 ns 4
replace bb to -- in lstringa<8>|2048_median 4236 ns 4236 ns 4
replace bb to -- in lstringa<8>|2048_stddev 67.5 ns 67.4 ns 4
replace bb to -- in lstringa<8>|2048_cv 1.59 % 1.59 % 4
replace bb to -- by init stringa|64_mean 136 ns 136 ns 4
replace bb to -- by init stringa|64_median 137 ns 137 ns 4
replace bb to -- by init stringa|64_stddev 3.83 ns 3.84 ns 4
replace bb to -- by init stringa|64_cv 2.81 % 2.81 % 4
replace bb to -- by init stringa|256_mean 464 ns 464 ns 4
replace bb to -- by init stringa|256_median 468 ns 468 ns 4
replace bb to -- by init stringa|256_stddev 10.2 ns 10.2 ns 4
replace bb to -- by init stringa|256_cv 2.20 % 2.20 % 4
replace bb to -- by init stringa|512_mean 838 ns 838 ns 4
replace bb to -- by init stringa|512_median 843 ns 843 ns 4
replace bb to -- by init stringa|512_stddev 11.5 ns 11.5 ns 4
replace bb to -- by init stringa|512_cv 1.37 % 1.37 % 4
replace bb to -- by init stringa|1024_mean 1620 ns 1620 ns 4
replace bb to -- by init stringa|1024_median 1616 ns 1616 ns 4
replace bb to -- by init stringa|1024_stddev 45.0 ns 45.0 ns 4
replace bb to -- by init stringa|1024_cv 2.78 % 2.78 % 4
replace bb to -- by init stringa|2048_mean 2774 ns 2774 ns 4
replace bb to -- by init stringa|2048_median 2790 ns 2790 ns 4
replace bb to -- by init stringa|2048_stddev 87.5 ns 87.5 ns 4
replace bb to -- by init stringa|2048_cv 3.16 % 3.15 % 4
----- Hash Map insert and find ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
hashStrMapA<size_t> emplace & find stringa;_mean 3271665 ns 3271682 ns 4
hashStrMapA<size_t> emplace & find stringa;_median 3273789 ns 3273823 ns 4
hashStrMapA<size_t> emplace & find stringa;_stddev 31230 ns 31230 ns 4
hashStrMapA<size_t> emplace & find stringa;_cv 0.95 % 0.95 % 4
std::unordered_map<std::string, size_t> emplace & find std::string;_mean 3592775 ns 3592795 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_median 3597592 ns 3597618 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_stddev 44741 ns 44725 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string;_cv 1.25 % 1.24 % 4
hashStrMapA<size_t> emplace & find ssa;_mean 3244867 ns 3244884 ns 4
hashStrMapA<size_t> emplace & find ssa;_median 3239181 ns 3239192 ns 4
hashStrMapA<size_t> emplace & find ssa;_stddev 17436 ns 17437 ns 4
hashStrMapA<size_t> emplace & find ssa;_cv 0.54 % 0.54 % 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_mean 4041903 ns 4041917 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_median 4036025 ns 4036025 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_stddev 24855 ns 24882 ns 4
std::unordered_map<std::string, size_t> emplace & find std::string_view;_cv 0.61 % 0.62 % 4
----- Build Full Func Name ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
Build func full name std::string;_mean 3162 ns 3162 ns 4
Build func full name std::string;_median 3147 ns 3147 ns 4
Build func full name std::string;_stddev 52.6 ns 52.5 ns 4
Build func full name std::string;_cv 1.66 % 1.66 % 4
Build func full name std::string 1;_mean 3363 ns 3363 ns 4
Build func full name std::string 1;_median 3372 ns 3372 ns 4
Build func full name std::string 1;_stddev 87.9 ns 87.9 ns 4
Build func full name std::string 1;_cv 2.61 % 2.61 % 4
Build func full name std::stream;_mean 11876 ns 11876 ns 4
Build func full name std::stream;_median 11928 ns 11928 ns 4
Build func full name std::stream;_stddev 311 ns 311 ns 4
Build func full name std::stream;_cv 2.62 % 2.62 % 4
Build func full name stringa;_mean 1461 ns 1461 ns 4
Build func full name stringa;_median 1472 ns 1472 ns 4
Build func full name stringa;_stddev 42.0 ns 42.0 ns 4
Build func full name stringa;_cv 2.87 % 2.87 % 4
Build func full name stringa 1;_mean 1910 ns 1910 ns 4
Build func full name stringa 1;_median 1889 ns 1889 ns 4
Build func full name stringa 1;_stddev 57.7 ns 57.7 ns 4
Build func full name stringa 1;_cv 3.02 % 3.02 % 4
----- Make Upper ---------/repeats:1 0.000 ns 0.000 ns 1000000000000
To upper case std::wstring_mean 204 ns 204 ns 4
To upper case std::wstring_median 204 ns 204 ns 4
To upper case std::wstring_stddev 1.85 ns 1.85 ns 4
To upper case std::wstring_cv 0.91 % 0.91 % 4
To upper case lstringw<15>_mean 63.1 ns 63.1 ns 4
To upper case lstringw<15>_median 62.9 ns 62.9 ns 4
To upper case lstringw<15>_stddev 0.872 ns 0.872 ns 4
To upper case lstringw<15>_cv 1.38 % 1.38 % 4

View File

@ -48,7 +48,7 @@ PROJECT_NAME = "simstr"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = 1.5.0 PROJECT_NUMBER = 1.9.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description # 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 # for a project that appears at the top of each page and should give viewers a
@ -992,7 +992,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.
INPUT = ../src ../include INPUT = ../src ../include ../tests
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses # that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
@ -1127,7 +1127,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include # that contain example code fragments that are included (see the \include
# command). # command).
EXAMPLE_PATH = EXAMPLE_PATH = ../tests
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@ -2928,7 +2928,7 @@ MAX_DOT_GRAPH_DEPTH = 0
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This # files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10) support # makes dot run faster, but since only newer versions of dot (>1.8.20) support
# this, this feature is disabled by default. # this, this feature is disabled by default.
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.

View File

@ -48,7 +48,7 @@ PROJECT_NAME = "simstr"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = 1.5.0 PROJECT_NUMBER = 1.9.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description # 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 # for a project that appears at the top of each page and should give viewers a
@ -992,7 +992,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.
INPUT = ../src ../include INPUT = ../src ../include ../tests
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses # that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
@ -1127,7 +1127,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include # that contain example code fragments that are included (see the \include
# command). # command).
EXAMPLE_PATH = EXAMPLE_PATH = ../tests
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@ -2928,7 +2928,7 @@ MAX_DOT_GRAPH_DEPTH = 0
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This # files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10) support # makes dot run faster, but since only newer versions of dot (>1.8.20) support
# this, this feature is disabled by default. # this, this feature is disabled by default.
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.

View File

@ -1,6 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Файл с описанием визуализации simstr строк для Visual Studio --> <!-- Файл с описанием визуализации simstr строк для Visual Studio -->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="simstr::str_src&lt;*&gt;">
<DisplayString Condition="0xCCCCCCCC==(unsigned)str">[unknown]</DisplayString>
<DisplayString Condition="sizeof($T1)==1">l={len}, {str,[len]nas8}</DisplayString>
<DisplayString Condition="sizeof($T1)==2">l={len}, {str,[len]nasu}</DisplayString>
<DisplayString Condition="sizeof($T1)==4">l={len}, {str,[len]nas32}</DisplayString>
<DisplayString>[unknown]</DisplayString>
</Type>
<Type Name="simstr::str_src_nt&lt;*&gt;">
<DisplayString Condition="0xCCCCCCCC==(unsigned)str">[unknown]</DisplayString>
<DisplayString Condition="sizeof($T1)==1">l={len}, {str,[len]nas8}</DisplayString>
<DisplayString Condition="sizeof($T1)==2">l={len}, {str,[len]nasu}</DisplayString>
<DisplayString Condition="sizeof($T1)==4">l={len}, {str,[len]nas32}</DisplayString>
<DisplayString>[unknown]</DisplayString>
</Type>
<Type Name="simstr::simple_str&lt;*&gt;"> <Type Name="simstr::simple_str&lt;*&gt;">
<DisplayString Condition="0xCCCCCCCC==(unsigned)str">[unknown]</DisplayString> <DisplayString Condition="0xCCCCCCCC==(unsigned)str">[unknown]</DisplayString>
<DisplayString Condition="sizeof($T1)==1">l={len}, {str,[len]nas8}</DisplayString> <DisplayString Condition="sizeof($T1)==1">l={len}, {str,[len]nas8}</DisplayString>
@ -8,6 +22,13 @@
<DisplayString Condition="sizeof($T1)==4">l={len}, {str,[len]nas32}</DisplayString> <DisplayString Condition="sizeof($T1)==4">l={len}, {str,[len]nas32}</DisplayString>
<DisplayString>[unknown]</DisplayString> <DisplayString>[unknown]</DisplayString>
</Type> </Type>
<Type Name="simstr::simple_str_nt&lt;*&gt;">
<DisplayString Condition="0xCCCCCCCC==(unsigned)str">[unknown]</DisplayString>
<DisplayString Condition="sizeof($T1)==1">l={len}, {str,[len]nas8}</DisplayString>
<DisplayString Condition="sizeof($T1)==2">l={len}, {str,[len]nasu}</DisplayString>
<DisplayString Condition="sizeof($T1)==4">l={len}, {str,[len]nas32}</DisplayString>
<DisplayString>[unknown]</DisplayString>
</Type>
<Type Name="simstr::sstring&lt;*&gt;"> <Type Name="simstr::sstring&lt;*&gt;">
<DisplayString Condition="sizeof($T1)==1 &amp;&amp; type_ == 0">inplace, l={LocalCount - localRemain_}, {buf_,[LocalCount - localRemain_]nas8}</DisplayString> <DisplayString Condition="sizeof($T1)==1 &amp;&amp; type_ == 0">inplace, l={LocalCount - localRemain_}, {buf_,[LocalCount - localRemain_]nas8}</DisplayString>
<DisplayString Condition="sizeof($T1)==1 &amp;&amp; type_ == 1">literal, l={bigLen_}, {cstr_,[bigLen_]nas8}</DisplayString> <DisplayString Condition="sizeof($T1)==1 &amp;&amp; type_ == 1">literal, l={bigLen_}, {cstr_,[bigLen_]nas8}</DisplayString>

View File

@ -192,6 +192,8 @@ printer_list = {
"lstring": [lstring_printer, lstring_printer_init], "lstring": [lstring_printer, lstring_printer_init],
"simple_str": [ssa_printer], "simple_str": [ssa_printer],
"simple_str_nt": [ssa_printer], "simple_str_nt": [ssa_printer],
"str_src": [ssa_printer],
"str_src_nt": [ssa_printer],
} }
for name, func in printer_list.items(): for name, func in printer_list.items():

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

153
readme.md
View File

@ -1,19 +1,23 @@
# simstr - String object and function library # simstr - String Object and Function Library
<h2>Speed up your work with strings by 2-10 times!</h2> <span class="obfuscator"><a href="readme_ru.md">Russian | По-русски</a></span>
[![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) [![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.5.0. Version 1.9.1
<h2>Speed up your work with strings by 2-10 times!</h2>
<span class="obfuscator"><a href="readme_ru.md">On Russian | По-русски</a></span>
This library contains a modern implementation of several types of string objects and various algorithms for working with strings. This library contains a modern implementation of several types of string objects and various algorithms for working with strings.
## Generated Documentation
[Located here](https://orefkov.github.io/simstr/docs_en/)
## Brief Description
The goal of the library is to make working with strings in C++ as simple and easy as in many other languages, especially The goal of the library is to make working with strings in C++ as simple and easy as in many other languages, especially
scripting languages, while maintaining optimal performance at the level of C and C++, and even improving them. scripting languages, while maintaining optimality and performance at the level of C and C++, and even improving them.
It's no secret that working with strings in C++ often causes pain. The `std::string` class is often inconvenient or inefficient. It's no secret that working with strings in C++ often causes pain. The `std::string` class is often inconvenient or inefficient.
Many functions that are usually needed when working with strings are simply not there, and everyone has to write them themselves. Many functions that are usually necessary when working with strings are simply not there, and everyone has to write them themselves.
Even concatenating `std::string` and `std::string_view` became possible only with C++26. Even concatenating `std::string` and `std::string_view` became possible only with C++26.
That's why I started creating this library for myself around 2012, and now I'm ready to share it with all C++ developers. That's why I started creating this library for myself around 2012, and now I'm ready to share it with all C++ developers.
@ -22,19 +26,20 @@ use in my work, trying to do it in the most efficient way, and I modestly hope t
and will be useful to other people, either directly or as a source of ideas. and will be useful to other people, either directly or as a source of ideas.
The library contains two parts: The library contains two parts:
- Implementation of [*"String Expressions"*](https://orefkov.github.io/simstr/docs_en/overview.html#autotoc_md68) and algorithms for working - Implementation of [*"String Expressions"*](https://orefkov.github.io/simstr/articles/fast_concat.html) and algorithms for working
with constant strings.\ with constant strings.\
To use this part, just take the file `"include/simstr/strexpr.h"` and write in your code To use this part, just take the file `"include/simstr/strexpr.h"` and write in your code
```cpp ```cpp
#include "path/to/file/strexpr.h" #include "path/to file/strexpr.h"
``` ```
This will allow you to use powerful and fast *"string expressions"* for concatenation and string construction for standard string types (`std::basic_string`, `std::basic_string_view`), as well as simplified versions of the `simple_str` and This will allow you to use powerful and fast *"string expressions"* for concatenation and string construction for standard string types
(`std::basic_string`, `std::basic_string_view`), as well as simplified versions of the `simple_str` and
`simple_str_nt` classes, which implement all those string algorithms of the library that do not require storing or modifying strings. `simple_str_nt` classes, which implement all those string algorithms of the library that do not require storing or modifying strings.
Since this is a header-only part, it does not include working with UTF encodings and simplified Unicode. Since this is a header-only part, it does not include working with UTF encodings and simplified Unicode.
- The full version, which requires connecting the entire library (`"include/simstr/sstring.h"`), adds its own string types with - The full version, requiring the connection of the entire library (`"include/simstr/sstring.h"`), adds its string types with
the ability to store and modify strings, works with UTF encodings and simplified Unicode. the ability to store and modify strings, works with UTF encodings and simplified Unicode.
The library does not pretend to be "changed the header and everything worked better" - it gets along well with standard strings The library does not pretend to be a "changed header and everything worked better" - it gets along well with standard strings
and does not change the behavior of existing code working with them. I tried to make many methods in it compatible and does not change the behavior of existing code working with them. I tried to make many methods in it compatible
with `std::string` and `std::string_view`, but I didn't bother with this much. Rewriting your code to work with `simstr` with `std::string` and `std::string_view`, but I didn't bother with this much. Rewriting your code to work with `simstr`
will require some effort, but I assure you that it will pay off. And thanks to compatibility with standard strings, this work can be done will require some effort, but I assure you that it will pay off. And thanks to compatibility with standard strings, this work can be done
@ -46,14 +51,14 @@ types of objects, each of which is good for its own purposes, and at the same ti
If you actively used `std::string_view` and understood its advantages and disadvantages compared to `std::string`, If you actively used `std::string_view` and understood its advantages and disadvantages compared to `std::string`,
then the `simstr` approach will also be clear to you. then the `simstr` approach will also be clear to you.
## Main features of the library ## Key Features of the Library
When using only `#include "simstr/strexpr.h"`: When using only `#include "simstr/strexpr.h"`:
- Support for working with strings `char`, `char8_t`, `char16_t`, `char32_t`, `wchar_t`. - Support for working with strings `char`, `char8_t`, `char16_t`, `char32_t`, `wchar_t`.
- Powerful and extensible *"String Expressions"* system. - Powerful and extensible *"String Expressions"* system.
Allows you to efficiently implement the conversion and addition (concatenation) of strings, string literals, numbers (and possibly other objects), Allows you to efficiently implement the conversion and addition (concatenation) of strings, string literals, numbers (and possibly other objects),
achieving significant acceleration of string operations. achieving significant acceleration of string operations.
Compatible with both `simstr` string objects and standard strings (`std::basic_string`, Compatible with both `simstr` string objects and standard strings (`std::basic_string`,
`std::basic_string_view`), which allows you to use fast concatenation even where it is not yet possible to abandon standard strings. `std::basic_string_view`), which allows you to apply fast concatenation even where it is not yet possible to abandon standard strings.
Also allows you to mix strings of compatible character types in operations. Also allows you to mix strings of compatible character types in operations.
- Constant string functions (do not change the original string): - Constant string functions (do not change the original string):
- Getting substrings. - Getting substrings.
@ -62,21 +67,23 @@ When using only `#include "simstr/strexpr.h"`:
- Various trimming of strings - right, left, everywhere, by whitespace characters, by specified characters. - Various trimming of strings - right, left, everywhere, by whitespace characters, by specified characters.
- Replacing substrings (creating a copy of the string with the replacement). - Replacing substrings (creating a copy of the string with the replacement).
- Replacing a set of characters with a set of corresponding substrings (creating a copy of the string with the replacement). - Replacing a set of characters with a set of corresponding substrings (creating a copy of the string with the replacement).
- Merging (join) containers of strings into a single string, with specifying delimiters and options - "skip empty", "delimiter after last". - Merging (join) containers of strings into a single string, with specifying separators and options - "skip empty", "separator after last".
- Splitting strings into parts by a specified delimiter. Splitting is possible immediately into a container with strings, or by calling a functor for - Splitting strings into parts by a specified delimiter. Splitting is possible immediately into a container with strings, or by calling a functor for
each substring, or by iterating using the `Splitter` iterator. each substring, or by iterating using the `Splitter` iterator.
- Functions for modifying standard strings with string expressions: - Functions for modifying standard strings with string expressions:
- str::append, str::prepend, str::insert, str::change - modify str::string with string expressions, - str::append, str::prepend, str::insert, str::change - change str::string with string expressions,
for example, `str::append(text, "count = "_ss + count + " times")`. for example `str::append(text, "count = "_ss + count)`.
- str::replace - replaces occurrences of the searched substring with the replacement string or string expression. - str::replace - replaces occurrences of the search substring with a replacement string or string expression.
If the substring is not found, the string expression is not even evaluated. If the substring is not found, the string expression is not even evaluated.
- Parsing integers with the possibility of "fine" tuning at compile time - you can set options for checking overflow, - str::make_ascii_upper, str::make_ascii_lower - change the case of ASCII characters.
skipping whitespace characters, a specific base or auto-selection by prefixes `0x`, `0`, `0b`, `0o`, - Parsing of integers from a "piece of string" (does not require null termination) with the possibility of "fine" tuning during compilation -
admissibility of the `+` sign. Parsing is implemented for all types of strings and characters. you can set options for checking for overflow, skipping whitespace characters, a specific radix, or auto-select by
- Parsing double for `char` and `wchar_t`, as well as character types compatible with them in size. prefixes `0x`, `0`, `0b`, `0o`, the `+` sign is allowed. Parsing is implemented for all types of strings and characters.
- Parsing double from a "piece of string" for `char` and `char8_t`.
When using the full version of the library: When using the full version of the library:
- Everything that is listed above, plus - Everything that is listed above, plus
- Parsing double from a "piece of string" for all types of characters.
- Additional efficient string objects - `sstring` (shared string), `lstring` (local string). - Additional efficient string objects - `sstring` (shared string), `lstring` (local string).
- `lstring` - supports many mutable operations with strings - various replacements, insertions, deletions, etc. - `lstring` - supports many mutable operations with strings - various replacements, insertions, deletions, etc.
Allows you to set the size for the internal character buffer, which can turn *Small String Optimization* into *Big String Optimization* :). Allows you to set the size for the internal character buffer, which can turn *Small String Optimization* into *Big String Optimization* :).
@ -91,27 +98,41 @@ When using the full version of the library:
Works only for characters of the first Unicode plane (up to 0xFFFF), and when changing the case, cases are not taken into account when one code point Works only for characters of the first Unicode plane (up to 0xFFFF), and when changing the case, cases are not taken into account when one code point
can be converted into several, that is, the case conversion of characters corresponds to `std::towupper`, `std::towlower` for the unicode locale, only faster and can work with any type of characters. can be converted into several, that is, the case conversion of characters corresponds to `std::towupper`, `std::towlower` for the unicode locale, only faster and can work with any type of characters.
- Implemented `hash map` for string type keys, based on `std::unordered_map`, with the possibility of more efficient storage and - Implemented `hash map` for string type keys, based on `std::unordered_map`, with the possibility of more efficient storage and
comparison of keys compared to `std::string` keys. The possibility of case-insensitive comparison of keys is supported (Ascii or comparison of keys compared to `std::string` keys. Supports the possibility of case-insensitive comparison of keys (Ascii or
minimal Unicode (see previous paragraph)). minimal Unicode (see previous paragraph)).
## String expressions ## Benchmarks
Benchmarks are performed using the [Google benchmark](https://github.com/google/benchmark) framework.
I tried to make measurements for the most typical operations that occur in normal work. I took measurements on my equipment, under
Windows and Linux (in WSL), using MSVC, Clang, GCC compilers. Third-party results are welcome.
I also took measurements in WASM, built in Emscripten. I draw attention to the fact that a 32-bit build is built under WASM in Emscripten, which means that
the sizes of SSO buffers in objects are smaller.
On the [release page](https://github.com/orefkov/simstr/releases) you can download binary builds of benchmarks and run them on your equipment.
You can also run the [Emscripten build of benchmarks](https://orefkov.github.io/simstr/bench/benchStr.html) directly in the browser.
- [Benchmark source code](bench/bench_str.cpp)
- [Benchmark results](https://orefkov.github.io/simstr/results.html)
## String Expressions
These are special objects that efficiently implement string concatenation using `operator+`. These are special objects that efficiently implement string concatenation using `operator+`.
The main principle, due to which efficient work is achieved - no matter how many operands are included in the entire expression, The main principle, due to which efficient work is achieved - no matter how many operands are included in the entire expression,
no temporary (intermediate) strings are created, the total length of the entire result is calculated only once, no temporary (intermediate) strings are created, the total length of the entire result is calculated only once,
memory is allocated for the character buffer of the result only once, after which the characters are copied immediately to the buffer of the result memory is allocated for the result character buffer only once, after which the characters are copied directly to the result buffer
to its place. No memory reallocations, no moving characters in various intermediate buffers - everything is to its place. No memory reallocations, no moving characters in various intermediate buffers - everything is
as efficient as possible. Thanks to the capabilities of C++ templates and operator overloading, the expression is written as close as possible as efficient as possible. Thanks to the capabilities of C++ templates and operator overloading, the expression is written as close as possible
to the usual string addition syntax. to the usual syntax for adding strings.
In addition, there are special overloads for adding string objects and string literals, strings and numbers, In addition, there are special overloads for adding string objects and string literals, strings and numbers,
for copying with replacement, for merging containers of strings and much more. for copying with replacement, for merging containers of strings and much more.
Thanks to the extensibility of this system, it is possible to create new options for building strings, development is constantly ongoing. Thanks to the extensibility of this system, it is possible to create new options for building strings, and development is constantly ongoing.
All string objects from `simstr` are themselves string expressions, that is, they can be used in concatenation operations All string objects from `simstr` are themselves string expressions, that is, they can be used in concatenation operations
of string expressions directly. Standard strings (`std::basic_string`, `std::basic_string_view`) can also serve as operands string expressions directly. Standard strings (`std::basic_string`, `std::basic_string_view`) can also serve as operands
in addition operations with string expressions. Or they can be easily converted into a string expression by placing a in addition operations with string expressions. Or they can be easily converted into a string expression by placing them in front of them
unary `+` in front of them. unary `+`.
## Usage examples ## Usage Examples
### Adding strings with numbers ### Adding strings with numbers
```cpp ```cpp
std::string s1 = "start "; std::string s1 = "start ";
@ -122,9 +143,9 @@ int i;
// Became // Became
std::string str = +s1 + i + " end"; std::string str = +s1 + i + " end";
``` ```
`+s1` - converts `std::string` into an object - a string expression, for which there is an efficient concatenation with numbers and string literals. `+s1` - converts `std::string` into an object - a string expression for which there is an efficient concatenation with numbers and string literals.
According to benchmarks, [acceleration is 1.6 - 2 times](https://orefkov.github.io/simstr/results.html#bs70109915512075798510). According to benchmarks, [acceleration 1.6 - 2 times](https://orefkov.github.io/simstr/results.html#bs70109915512075798510).
### Adding strings with numbers in hex format ### Adding strings with numbers in hex format
```cpp ```cpp
@ -134,7 +155,7 @@ According to benchmarks, [acceleration is 1.6 - 2 times](https://orefkov.github.
// Became // Became
std::string str = +s1 + e_hex<HexFlags::Short>(i) + " end"; std::string str = +s1 + e_hex<HexFlags::Short>(i) + " end";
``` ```
Acceleration in [**9 - 14 times!!!**](https://orefkov.github.io/simstr/results.html#bs146911715078927772520) Acceleration by [**9 - 14 times!!!**](https://orefkov.github.io/simstr/results.html#bs146911715078927772520)
### Adding multiple literals and searching in `std::string_view` ### Adding multiple literals and searching in `std::string_view`
```cpp ```cpp
@ -151,17 +172,17 @@ size_t find_pos(ssa src, ssa name) {
// And when using the full library, you can do this // And when using the full library, you can do this
size_t find_pos(ssa src, ssa name) { size_t find_pos(ssa src, ssa name) {
// In this version, if the result of the concatenation fits into 207 characters, it is produced in a buffer on the stack, // In this version, if the result of the concatenation fits into 207 characters, it is produced in a buffer on the stack,
// without allocation and deallocation of memory, acceleration is several times. And only if the result is longer than 207 characters - // without allocation and deallocation of memory, acceleration several times. And only if the result is longer than 207 characters -
// there will be only one allocation, and the concatenation will be immediately into the allocated buffer, without copying characters. // there will be only one allocation, and the concatenation will be immediately into the allocated buffer, without copying characters.
return src.find(lstringa<200>{"\n- " + name + " -\n"}); return src.find(lstringa<200>{"\n- " + name + " -\n"});
} }
``` ```
`ssa` - alias for `simple_str<char>` - analogue of `std::string_view`, allows you to accept any string object as a function parameter with minimal costs, `ssa` - alias for `simple_str<char>` - analogue of `std::string_view`, allows you to accept as a function parameter with minimal costs
which does not need to be modified or passed to the C-API: `std::string`, `std::string_view`, `"string literal"`, any string object that does not need to be modified or passed to the C-API: `std::string`, `std::string_view`, `"string literal"`,
`simple_str_nt`, `sstring`, `lstring`. Also, since it is also a "string expression", it allows you to easily `simple_str_nt`, `sstring`, `lstring`. Also, since it is also a "string expression", it allows you to easily
build concatenations with its participation. build concatenations with its participation.
According to measurements, [acceleration is 1.5 - 9 times](https://orefkov.github.io/simstr/results.html#bs68116594352702954700). According to measurements, [acceleration 1.5 - 9 times](https://orefkov.github.io/simstr/results.html#bs68116594352702954700).
### Addition with conditions ### Addition with conditions
```cpp ```cpp
@ -188,7 +209,7 @@ std::string buildTypeName(std::string_view type_name, size_t prec, size_t scale)
// Became when using only strexpr.h and simple_str string // Became when using only strexpr.h and simple_str string
std::string buildTypeName(ssa type_name, size_t prec, size_t scale) { std::string buildTypeName(ssa type_name, size_t prec, size_t scale) {
if (prec) { if (prec) {
// ssa is already a string expression, + before it is not needed // ssa is already a string expression, + in front of it is not needed
return type_name + "(" + prec + e_if(scale, ","_ss + scale) + ")"; return type_name + "(" + prec + e_if(scale, ","_ss + scale) + ")";
} }
return type_name; return type_name;
@ -201,7 +222,7 @@ stringa buildTypeName(ssa type_name, size_t prec, size_t scale) {
return type_name; return type_name;
} }
``` ```
When `prec != 0`, [acceleration is 1.5 - 2.2 times](https://orefkov.github.io/simstr/results.html#bs145290966789248325200). When `prec != 0`, [acceleration 1.5 - 2.2 times](https://orefkov.github.io/simstr/results.html#bs145290966789248325200).
### Addition with replacements ### Addition with replacements
```cpp ```cpp
@ -257,32 +278,34 @@ int split_and_calc_total_sim(ssa numbers, ssa delimiter) {
return total; return total;
} }
``` ```
[Acceleration in 2-3 times](https://orefkov.github.io/simstr/results.html#bs7106975351756760120). [Acceleration by 2-3 times](https://orefkov.github.io/simstr/results.html#bs7106975351756760120).
In addition to the individual examples given here, you can look at the sources: In addition to the individual examples given here, you can look at the sources:
- [tests of the entire library](https://github.com/orefkov/simstr/blob/main/tests/test_str.cpp) - [tests of the entire library](https://github.com/orefkov/simstr/blob/main/tests/test_str.cpp)
- [tests of only the strexpr part](https://github.com/orefkov/simstr/blob/main/tests/test_expr_only.cpp) - [tests of only the strexpr part](https://github.com/orefkov/simstr/blob/main/tests/test_expr_only.cpp)
- [examples of using your types in string expressions](https://github.com/orefkov/simstr/blob/main/tests/test_tostrexpr.cpp)
- [benchmarks](https://github.com/orefkov/simstr/blob/main/bench/bench_str.cpp) - [benchmarks](https://github.com/orefkov/simstr/blob/main/bench/bench_str.cpp)
- [utility for preparing html](https://github.com/orefkov/simstr/blob/main/bench/process_result.cpp) from benchmark results. - [utility for preparing html](https://github.com/orefkov/simstr/blob/main/bench/process_result.cpp) from benchmark results.
## Main objects of the library ## Main Objects of the Library
Available with any use: Available with any use:
- `simple_str<K>` - the simplest string (or piece of string), immutable, not owning, analogue of `std::string_view`. - `simple_str<K>` - the simplest string (or piece of string), immutable, not owning, analogue of `std::string_view`.
- `simple_str_nt<K>` - the same, only declares that it ends with 0. For working with third-party C-API. - `simple_str_nt<K>` - the same, only declares that it ends with 0. For working with third-party C-API.
Available when using the entire library: Available when using the entire library:
- `sstring<K>` - shared string, immutable, owning, with shared character buffer, SSO support. - `sstring<K>` - shared string, immutable, owning, with a shared character buffer, SSO support.
- `lstring<K, N>` - local string, mutable, owning, with a specified size of the SSO buffer. - `lstring<K, N>` - local string, mutable, owning, with a specified size of the SSO buffer.
When connecting only `strexpr.h` - the types `simple_str<K>` and `simple_str_nt<K>` do not contain methods for working with UTF and Unicode. When connecting only `strexpr.h` - the types `simple_str<K>` and `simple_str_nt<K>` do not contain methods for working with UTF and Unicode.
## Articles ## Articles
- [Overview and introduction](docs/overview.md) - [Overview and introduction](docs/overview.md)
- [Overview article on Habr](https://habr.com/ru/articles/935590) (On Russian) - [So how do you quickly concatenate strings?](https://orefkov.github.io/simstr/articles/fast_concat.html)
- [Description of the "Expression Templates" technique used](https://habr.com/ru/articles/936468/) (On Russian) - [Overview article on Habr](https://habr.com/ru/articles/935590) (on Russian)
- [Description of the applied technique "Expression Templates"](https://habr.com/ru/articles/936468/)(on Russian)
## Usage ## Usage
The library can be used partially, just by taking the file `"include/simstr/strexpr.h"` and including it in your sources The library can be used partially, simply by taking the file `"include/simstr/strexpr.h"` and including it in your sources
```cpp ```cpp
#include "include/simstr/strexpr.h" #include "include/simstr/strexpr.h"
``` ```
@ -293,7 +316,7 @@ You can connect as a CMake project via `add_subdirectory` (the `simstr` library)
you can simply include the files in your project. Building also requires [simdutf](https://github.com/simdutf/simdutf) (when using CMake you can simply include the files in your project. Building also requires [simdutf](https://github.com/simdutf/simdutf) (when using CMake
it is downloaded automatically). it is downloaded automatically).
### Using FetchContent ### Connection via FetchContent
``` ```
function(add_simstr) function(add_simstr)
set(SIMSTR_BUILD_TESTS OFF) set(SIMSTR_BUILD_TESTS OFF)
@ -302,8 +325,8 @@ function(add_simstr)
simstr simstr
GIT_REPOSITORY https://github.com/orefkov/simstr.git GIT_REPOSITORY https://github.com/orefkov/simstr.git
GIT_SHALLOW TRUE GIT_SHALLOW TRUE
GIT_TAG tags/rel1.5.0 # Укажите нужный релиз GIT_TAG tags/rel1.9.1# Specify the desired release
FIND_PACKAGE_ARGS NAMES simstr 1.5.0 FIND_PACKAGE_ARGS NAMES simstr 1.9.1
) )
FetchContent_MakeAvailable(simstr) FetchContent_MakeAvailable(simstr)
endfunction() endfunction()
@ -315,31 +338,17 @@ target_link_libraries(<your target> PUBLIC simstr::simstr)
The library is also included in [vcpkg](https://vcpkg.io), connected as `orefkov-simstr`. The library is also included in [vcpkg](https://vcpkg.io), connected as `orefkov-simstr`.
`simstr` requires a compiler of at least the C++20 standard - concepts and std::format are used. For `simstr` to work, a compiler of the standard no lower than C++20 is required - concepts and std::format are used.
The work was tested under Windows on MSVC-19 and Clang-19, under Linux - on GCC-13 and Clang-21. The work was checked under Windows on MSVC-19 and Clang-19, under Linux - on GCC-13 and Clang-21.
The work in WASM was also tested, built in Emscripten 4.0.6, Clang-21. The work in WASM was also checked, built in Emscripten 4.0.6, Clang-21.
## Convenient Debugging
## Convenient debugging Along with the library, two files are supplied that make viewing simstr string objects in debuggers
Together with the library, two files are supplied that make viewing simstr string objects in debuggers
more convenient.\ more convenient.\
More details are described [here](for_debug/readme_ru.md). More details are described [here](for_debug/readme.md).
## Benchmarks ## Where it is already used
Benchmarks are performed using the [Google benchmark](https://github.com/google/benchmark) framework. Simstr is also used in my projects:
I tried to take measurements for the most typical operations that occur in normal work. I took measurements on my equipment, under
Windows and Linux (in WSL), using MSVC, Clang, GCC compilers. Third-party results are welcome.
I also took measurements in WASM, built in Emscripten. I draw your attention to the fact that a 32-bit build is assembled under WASM in Emscripten, which means that
the sizes of SSO buffers in objects are smaller.
- [Source code of benchmarks](bench/bench_str.cpp)
- [Benchmark results](https://orefkov.github.io/simstr/results.html)
Also, simstr is used in my projects:
- [simjson](https://github.com/orefkov/simjson) - a library for simple work with JSON using simstr strings. - [simjson](https://github.com/orefkov/simjson) - a library for simple work with JSON using simstr strings.
- [simrex](https://github.com/orefkov/simrex) - wrapper for working with regular expressions [Oniguruma](https://github.com/kkos/oniguruma) using simstr strings. - [simrex](https://github.com/orefkov/simrex) - a wrapper for working with regular expressions [Oniguruma](https://github.com/kkos/oniguruma) using simstr strings.
- [v8sqlite](https://github.com/orefkov/v8sqlite) - external component for 1C-Enterprise V8 for working with sqlite. - [v8sqlite](https://github.com/orefkov/v8sqlite) - an external component for 1C-Enterprise V8 for working with sqlite.
## Generated documentation
[Located here](https://orefkov.github.io/simstr/docs_en/)

View File

@ -1,14 +1,18 @@
# simstr - библиотека строковых объектов и функций # simstr - библиотека строковых объектов и функций
<h2>Ускорь работу со строками в 2-10 раз!</h2> <span class="obfuscator"><a href="readme.md">On English | По-английски</a></span>
[![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) [![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.5.0. Версия 1.9.1
<h2>Ускорь работу со строками в 2-10 раз!</h2>
<span class="obfuscator"><a href="readme.md">On English | По-английски</a></span>
В этой библиотеке содержится современная реализация нескольких видов строковых объектов и различных алгоритмов для работы со строками. В этой библиотеке содержится современная реализация нескольких видов строковых объектов и различных алгоритмов для работы со строками.
## Сгенерированная документация
[Находится здесь](https://orefkov.github.io/simstr/docs_ru/)
## Краткое описание
Цель библиотеки - сделать работу со строками в С++ такой же простой и лёгкой, как во множестве других языков, особенно Цель библиотеки - сделать работу со строками в С++ такой же простой и лёгкой, как во множестве других языков, особенно
скриптовых, но при этом сохранив оптимальность и производительность на уровне С и C++, и даже улучшив их. скриптовых, но при этом сохранив оптимальность и производительность на уровне С и C++, и даже улучшив их.
@ -22,7 +26,7 @@
и пригодится другим людям, либо напрямую, либо как источник идей. и пригодится другим людям, либо напрямую, либо как источник идей.
Библиотека содержит две части: Библиотека содержит две части:
- Реализация [*"Строковых выражений"*](https://orefkov.github.io/simstr/docs_ru/overview.html#autotoc_md27) и алгоритмов работы - Реализация [*"Строковых выражений"*](https://orefkov.github.io/simstr/articles/fast_concat_ru.html) и алгоритмов работы
с константными строками.\ с константными строками.\
Для использования этой части достаточно просто взять файл `"include/simstr/strexpr.h"` и написать в своём коде Для использования этой части достаточно просто взять файл `"include/simstr/strexpr.h"` и написать в своём коде
```cpp ```cpp
@ -66,18 +70,21 @@
- Слияние (join) контейнеров строк в единую строку, с заданием разделителей и опций - "пропускать пустые", "разделитель после последней". - Слияние (join) контейнеров строк в единую строку, с заданием разделителей и опций - "пропускать пустые", "разделитель после последней".
- Разбиение (split) строк на части по заданному разделителю. Разбиение возможно сразу в контейнер со строками, либо вызовом функтора для - Разбиение (split) строк на части по заданному разделителю. Разбиение возможно сразу в контейнер со строками, либо вызовом функтора для
каждой подстроки, либо путем итерации с помощью итератора `Splitter`. каждой подстроки, либо путем итерации с помощью итератора `Splitter`.
- Создании копии со сменой регистра ASCII символов.
- Функции модификации стандартных строк строковыми выражениями: - Функции модификации стандартных строк строковыми выражениями:
- str::append, str::prepend, str::insert, str::change - меняют str::string строковыми выражениями, - str::append, str::prepend, str::insert, str::change - меняют str::string строковыми выражениями,
например `str::append(text, "count = "_ss + count)`. например `str::append(text, "count = "_ss + count)`.
- str::replace - заменяет вхождения искомой подстроки на строку замены или строковое выражение. - str::replace - заменяет вхождения искомой подстроки на строку замены или строковое выражение.
Если подстрока не найдена, строковое выражение даже не вычисляется. Если подстрока не найдена, строковое выражение даже не вычисляется.
- Парсинг целых чисел с возможностью "тонкой" настройки при компиляции - можно задавать опции проверки переполнения, - str::make_ascii_upper, str::make_ascii_lower - смена регистра ASCII символов.
пропуск пробельных символов, конкретное основание счисления либо автовыбор по префиксам `0x`, `0`, `0b`, `0o`, - Парсинг целых чисел из "куска строки" (не требует нуль-терминированности) с возможностью "тонкой" настройки при компиляции -
допустимость знака `+`. Парсинг реализован для всех видов строк и символов. можно задавать опции проверки переполнения, пропуск пробельных символов, конкретное основание счисления либо автовыбор по
- Парсинг double для `char` и `wchar_t`, а также совместимых с ними по размеру типов символов. префиксам `0x`, `0`, `0b`, `0o`, допустимость знака `+`. Парсинг реализован для всех видов строк и символов.
- Парсинг double из "куска строки" для `char` и `char8_t`.
При использовании полной версии библиотеки: При использовании полной версии библиотеки:
- Всё то же, что и перечислено выше, плюс - Всё то же, что и перечислено выше, плюс
- Парсинг double из "куска строки" для всех типов символов.
- Дополнительные эффективные строковые объекты - `sstring` (shared string), `lstring` (local string). - Дополнительные эффективные строковые объекты - `sstring` (shared string), `lstring` (local string).
- `lstring` - поддерживает множество мутабельных операций со строками - различные замены, вставки, удаления и т.п. - `lstring` - поддерживает множество мутабельных операций со строками - различные замены, вставки, удаления и т.п.
Позволяет задавать размер для внутреннего буфера символов, что может превращать *Small String Optimization* в *Big String Optimization* :). Позволяет задавать размер для внутреннего буфера символов, что может превращать *Small String Optimization* в *Big String Optimization* :).
@ -95,6 +102,20 @@
сравнения ключей по сравнению с ключами `std::string`. Поддерживается возможность регистро-независимого сравнения ключей (Ascii или сравнения ключей по сравнению с ключами `std::string`. Поддерживается возможность регистро-независимого сравнения ключей (Ascii или
минимальный Unicode (см. предыдущий пункт)). минимальный Unicode (см. предыдущий пункт)).
## Бенчмарки
Бенчмарки производятся с использованием фреймворка [Google benchmark](https://github.com/google/benchmark).
Постарался сделать замеры для наиболее типичных операций, встречающихся в обычной работе. Я проводил замеры на своём оборудовании, под
Windows и Linux (в WSL), с использованием компиляторов MSVC, Clang, GCC. Сторонние результаты приветствуются.
Также проводил замеры в WASM, сборка в Emscripten. Обращаю внимание, что под WASM в Emscripten собирается 32-битная сборка, а значит,
размеры буферов SSO в объектах меньше.
На [странице релизов](https://github.com/orefkov/simstr/releases) вы можете скачать бинарные сборки бенчмарков и запустить их на своём оборудовании.
Также вы можете запустить [Emscripten сборку бенчмарков](https://orefkov.github.io/simstr/bench/benchStr.html) прямо в браузере.
- [Исходный код бенчмарков](bench/bench_str.cpp)
- [Результаты бенчмарков](https://orefkov.github.io/simstr/results.html)
## Строковые выражения ## Строковые выражения
Это специальные объекты, которые эффективно реализуют конкатенацию строк, с помощью `operator+`. Это специальные объекты, которые эффективно реализуют конкатенацию строк, с помощью `operator+`.
Главный принцип, за счёт которого достигается эффективная работа - сколько бы операндов не входило во всё выражение, Главный принцип, за счёт которого достигается эффективная работа - сколько бы операндов не входило во всё выражение,
@ -263,6 +284,7 @@ int split_and_calc_total_sim(ssa numbers, ssa delimiter) {
Помимо приведённых здесь отдельных примеров, можно посмотреть исходники: Помимо приведённых здесь отдельных примеров, можно посмотреть исходники:
- [тестов всей библиотеки](https://github.com/orefkov/simstr/blob/main/tests/test_str.cpp) - [тестов всей библиотеки](https://github.com/orefkov/simstr/blob/main/tests/test_str.cpp)
- [тестов только strexpr части](https://github.com/orefkov/simstr/blob/main/tests/test_expr_only.cpp) - [тестов только strexpr части](https://github.com/orefkov/simstr/blob/main/tests/test_expr_only.cpp)
- [примеры использования своих типов в строковых выражениях](https://github.com/orefkov/simstr/blob/main/tests/test_tostrexpr.cpp)
- [бенчмарков](https://github.com/orefkov/simstr/blob/main/bench/bench_str.cpp) - [бенчмарков](https://github.com/orefkov/simstr/blob/main/bench/bench_str.cpp)
- [утилиты подготовки html](https://github.com/orefkov/simstr/blob/main/bench/process_result.cpp) из результатов бенчмарков. - [утилиты подготовки html](https://github.com/orefkov/simstr/blob/main/bench/process_result.cpp) из результатов бенчмарков.
@ -279,6 +301,7 @@ int split_and_calc_total_sim(ssa numbers, ssa delimiter) {
## Статьи ## Статьи
- [Обзор и введение](docs/overview_ru.md) - [Обзор и введение](docs/overview_ru.md)
- [Так как же всё-таки быстро конкатенировать строки?](https://orefkov.github.io/simstr/articles/fast_concat_ru.html)
- [Обзорная статья на Хабре](https://habr.com/ru/articles/935590) - [Обзорная статья на Хабре](https://habr.com/ru/articles/935590)
- [Описание применяемой техники "Expression Templates"](https://habr.com/ru/articles/936468/) - [Описание применяемой техники "Expression Templates"](https://habr.com/ru/articles/936468/)
@ -303,8 +326,8 @@ function(add_simstr)
simstr simstr
GIT_REPOSITORY https://github.com/orefkov/simstr.git GIT_REPOSITORY https://github.com/orefkov/simstr.git
GIT_SHALLOW TRUE GIT_SHALLOW TRUE
GIT_TAG tags/rel1.5.0 # Укажите нужный релиз GIT_TAG tags/rel1.9.1# Укажите нужный релиз
FIND_PACKAGE_ARGS NAMES simstr 1.5.0 FIND_PACKAGE_ARGS NAMES simstr 1.9.1
) )
FetchContent_MakeAvailable(simstr) FetchContent_MakeAvailable(simstr)
endfunction() endfunction()
@ -320,27 +343,13 @@ target_link_libraries(<your target> PUBLIC simstr::simstr)
Работа проверялась под Windows на MSVC-19 и Clang-19, под Linux - на GCC-13 и Clang-21. Работа проверялась под Windows на MSVC-19 и Clang-19, под Linux - на GCC-13 и Clang-21.
Также проверялась работа в WASM, сборка в Emscripten 4.0.6, Clang-21. Также проверялась работа в WASM, сборка в Emscripten 4.0.6, Clang-21.
## Удобная отладка ## Удобная отладка
Вместе с библиотекой поставляются два файла, делающие просмотр simstr строковых объектов в отладчиках Вместе с библиотекой поставляются два файла, делающие просмотр simstr строковых объектов в отладчиках
более удобным.\ более удобным.\
Более подробно описано [здесь](for_debug/readme_ru.md). Более подробно описано [здесь](for_debug/readme_ru.md).
## Бенчмарки ## Где уже используется
Бенчмарки производятся с использованием фреймворка [Google benchmark](https://github.com/google/benchmark).
Постарался сделать замеры для наиболее типичных операций, встречающихся в обычной работе. Я проводил замеры на своём оборудовании, под
Windows и Linux (в WSL), с использованием компиляторов MSVC, Clang, GCC. Сторонние результаты приветствуются.
Также проводил замеры в WASM, сборка в Emscripten. Обращаю внимание, что под WASM в Emscripten собирается 32-битная сборка, а значит,
размеры буферов SSO в объектах меньше.
- [Исходный код бенчмарков](bench/bench_str.cpp)
- [Результаты бенчмарков](https://orefkov.github.io/simstr/results.html)
Также simstr используется в моих проектах: Также simstr используется в моих проектах:
- [simjson](https://github.com/orefkov/simjson) - библиотека для простой работы с JSON с использованием строк simstr. - [simjson](https://github.com/orefkov/simjson) - библиотека для простой работы с JSON с использованием строк simstr.
- [simrex](https://github.com/orefkov/simrex) - обёртка для работы с регулярными выражениями [Oniguruma](https://github.com/kkos/oniguruma) с использованием строк simstr. - [simrex](https://github.com/orefkov/simrex) - обёртка для работы с регулярными выражениями [Oniguruma](https://github.com/kkos/oniguruma) с использованием строк simstr.
- [v8sqlite](https://github.com/orefkov/v8sqlite) - внешняя компонента для 1С-Предприятия V8 для работы с sqlite. - [v8sqlite](https://github.com/orefkov/v8sqlite) - внешняя компонента для 1С-Предприятия V8 для работы с sqlite.
## Сгенерированная документация
[Находится здесь](https://orefkov.github.io/simstr/docs_ru/)

View File

@ -1,5 +1,5 @@
/* /*
* ver. 1.5.0 * ver. 1.9.1
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Реализация строковых функций * Реализация строковых функций
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
@ -187,9 +187,11 @@ inline u32s makeFoldU(u32s s) {
/* /*
* Поиск utf-8 symbols, которые меняют свою длину при upper/lower преобразовании * Поиск utf-8 symbols, которые меняют свою длину при upper/lower преобразовании
* вот они нашлись * вот они нашлись
* Search for utf-8 codepoints that change their code units length during upper/lower conversion
* here they are found
* "İiıIſSȺⱥȾⱦɐⱯɑⱭɫⱢɱⱮɽⱤẞßΙΩωkÅåⱢɫⱤɽⱥȺⱦȾⱭɑⱮɱⱯɐ" * "İiıIſSȺⱥȾⱦɐⱯɑⱭɫⱢɱⱮɽⱤẞßΙΩωkÅåⱢɫⱤɽⱥȺⱦȾⱭɑⱮɱⱯɐ"
l2u ıIſSɐⱯɑⱭɫⱢɱⱮɽⱤΙⱥȺⱦȾ l2u ıI ſS ɐ ɑ ɫ ɱ ɽ Ι Ⱥ Ⱦ
u2l İiȺⱥȾⱦẞßΩωkÅåⱢɫⱤɽⱭɑⱮɱⱯɐ u2l İi Ⱥ Ⱦ ß ω k å ɫ ɽ ɑ ɱ ɐ
void findStrange() { void findStrange() {
u16s badsL2U[100], * pBadslu = badsL2U; u16s badsL2U[100], * pBadslu = badsL2U;
u16s badsU2L[100], * pBadsul = badsU2L; u16s badsU2L[100], * pBadsul = badsU2L;
@ -248,7 +250,7 @@ size_t utf8_case_change(const u8s*& src, size_t len, u8s*& dest, size_t lenBuffe
// то есть если символ считан, и длина записываемого символа не больше считанного, то он поместится в буфер записи // то есть если символ считан, и длина записываемого символа не больше считанного, то он поместится в буфер записи
// и не перетрет символы, которые еще не прочитали // и не перетрет символы, которые еще не прочитали
// По другому работать откажемся // По другому работать откажемся
if (lenBuffer < len || (dest > src && dest < src + len)) if (dest > src && dest < src + len)
return len; return len;
const uu8s *beginReadPos = reinterpret_cast<const uu8s*>(src), *readPos = beginReadPos, *endReadPos = beginReadPos + len, const uu8s *beginReadPos = reinterpret_cast<const uu8s*>(src), *readPos = beginReadPos, *endReadPos = beginReadPos + len,
*readFromPos = readPos; *readFromPos = readPos;
@ -386,6 +388,32 @@ SIMSTR_API size_t unicode_traits<u8s>::lower(const u8s*& src, size_t len, u8s*&
return utf8_case_change<makeLowerU>(src, len, dest, lenBuffer); return utf8_case_change<makeLowerU>(src, len, dest, lenBuffer);
} }
SIMSTR_API size_t unicode_traits<u8s>::upper_len(const u8s* src, size_t len) {
size_t l = 0;
for (const uu8s *ptr = (const uu8s*)src, *start = ptr, *end = ptr + len; ptr < end; start = ptr) {
u32s s = readUtf8Symbol(ptr, end), su = makeUpperU(s);
if (s == su) {
l += ptr - start;
} else {
l += utf8len(su);
}
}
return l;
}
SIMSTR_API size_t unicode_traits<u8s>::lower_len(const u8s* src, size_t len) {
size_t l = 0;
for (const uu8s *ptr = (const uu8s*)src, *start = ptr, *end = ptr + len; ptr < end; start = ptr) {
u32s s = readUtf8Symbol(ptr, end), su = makeLowerU(s);
if (s == su) {
l += ptr - start;
} else {
l += utf8len(su);
}
}
return l;
}
template<auto Op> template<auto Op>
void utf16_change_case(const u16s* src, size_t len, u16s* dest) { void utf16_change_case(const u16s* src, size_t len, u16s* dest) {
if (dest != src) { if (dest != src) {

View File

@ -3,7 +3,7 @@
# #
add_executable(test_str test_str.cpp) add_executable(test_str test_str.cpp)
add_executable(test_expr_only test_expr_only.cpp) add_executable(test_expr_only test_expr_only.cpp test_tostrexpr.cpp)
target_link_libraries(test_str simstr::simstr GTest::gtest_main) target_link_libraries(test_str simstr::simstr GTest::gtest_main)
target_link_libraries(test_expr_only GTest::gtest_main) target_link_libraries(test_expr_only GTest::gtest_main)

View File

@ -1,5 +1,5 @@
/* /*
* ver. 1.5.0 * ver. 1.9.1
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Тесты simstr * Тесты simstr
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
@ -8,7 +8,9 @@
#include "../include/simstr/strexpr.h" #include "../include/simstr/strexpr.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <format>
#include <list> #include <list>
#include <array>
using namespace std::literals; using namespace std::literals;
@ -62,6 +64,15 @@ TEST(StrExpr, Spaces) {
EXPECT_EQ(testu, u"abc__________cde"); EXPECT_EQ(testu, u"abc__________cde");
} }
TEST(StrExpr, PlusString) {
std::string t = "aa"_ss + "bb"s;
EXPECT_EQ(t, "aabb");
const std::string add = "bb";
std::string r = add + "aa"_ss;
EXPECT_EQ(r, "bbaa");
}
TEST(StrExpr, Repeat) { TEST(StrExpr, Repeat) {
std::string testa = "abc"; std::string testa = "abc";
testa = e_repeat(+testa + " " + 10 + "s.", 3); testa = e_repeat(+testa + " " + 10 + "s.", 3);
@ -142,7 +153,7 @@ TEST(StrExpr, Join) {
TEST(StrExpr, Replace) { TEST(StrExpr, Replace) {
std::string testa = e_repl("test"_ss, "t"sv, "-|-"s) + 10; std::string testa = e_repl("test"_ss, "t"sv, "-|-"s) + 10;
EXPECT_EQ(testa, "-|-es-|-10"); EXPECT_EQ(testa, "-|-es-|-10");
testa = e_repl("aaaaaaaaaaaaaaaa"_ss, "a", "bb"); testa = e_repl("aaaaaaaaaaaaaaaa", "a", "bb");
EXPECT_EQ(testa, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); EXPECT_EQ(testa, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
testa = e_repl("aaaaaaaaaaaaaaaa"_ss, "a", "") + "-"; testa = e_repl("aaaaaaaaaaaaaaaa"_ss, "a", "") + "-";
@ -302,4 +313,161 @@ TEST(StrExpr, StrReplace) {
} }
} }
TEST(StrExpr, Concat) {
std::string tt;
std::string c = e_concat(eea + "," + " ", u8"bb", tt, 1, e_if(true, "--"), e_hex<HexFlags::Short>(16), 1.2);
EXPECT_EQ(c, "bb, , 1, --, 0x10, 1.2");
std::string_view text = "testes";
int count = 10;
std::string t = e_concat("", text, " = ", count, " times.");
EXPECT_EQ(t, "testes = 10 times.");
}
TEST(StrExpr, Subst) {
const auto ttt = "test"_ss;
int ii = 3;
std::string t = e_subst("Test {{--}} {}=, {}", ttt, ii);
EXPECT_EQ(t, "Test {--} test=, 3");
t = e_subst("Test {2}={1}, {2}, {1}", "test", 2);
EXPECT_EQ(t, "Test 2=test, 2, test");
std::u16string u16t = e_subst(u"Test {}={}, {}", u"test", 2, u"test"sv);
EXPECT_EQ(u16t, u"Test test=2, test");
}
TEST(StrExpr, VSubst) {
const auto ttt = "test"_ss;
int ii = 3;
auto pattern = "Test {{--}} {}=, {}"_ss;
std::string t = e_vsubst(pattern, ttt, ii);
EXPECT_EQ(t, "Test {--} test=, 3");
t = e_vsubst("{1}-{1}-{1}-{1}-{1}-{1}-{1}-{1}"_ss, "abc");
EXPECT_EQ(t, "abc-abc-abc-abc-abc-abc-abc-abc");
}
TEST(StrExpr, EInt) {
std::string kk = eea + e_int<10, f::c | f::w<10> | f::f<'_'> | f::sp>(123);
EXPECT_EQ(kk, "___+123___");
std::u16string uk = eeu + e_int<2, f::p>(123);
EXPECT_EQ(uk, u"0b1111011");
kk = eea + e_int<2, f::p | f::w<11> | f::z>(123);
std::string kf = std::format("{:#011b}", 123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::p | f::w<11> | f::z>(-123);
kf = std::format("{:#011b}", -123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::p | f::w<11> | f::z | f::sp>(123);
kf = std::format("{:+#011b}", 123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::p | f::w<11> | f::z | f::sp>(-123);
kf = std::format("{:+#011b}", -123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::p | f::w<11> | f::z | f::ss>(123);
kf = std::format("{: #011b}", 123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::p | f::w<11> | f::z | f::ss>(-123);
kf = std::format("{: #011b}", -123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::w<11> | f::r | f::f<'_'>| f::ss>(-123);
kf = std::format("{:_> 11b}", -123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::w<11> | f::r | f::f<'_'>| f::ss>(123);
kf = std::format("{:_> 11b}", 123);
EXPECT_EQ(kk, kf);
kk = eea + e_int<2, f::p | f::w<11> | f::r | f::f<'_'>| f::ss>(123);
kf = std::format("{:_> #11b}", 123);
EXPECT_EQ(kk, kf);
//EXPECT_EQ(kk, "0b001111011");
//std::cout << std::format("'{:+#011b}'\n", 123);
//std::cout << std::format("'{:+#011b}'\n", -123);
//EXPECT_EQ(kk, std::format("{:#011b}", -123));
std::u32string uu = eeuu + e_int<16, f::wp | f::p | f::u | f::z/* | f::r*/>(123, 9);
EXPECT_EQ(uu, U"0x000007B");
}
TEST(StrExpr, EIntFmt) {
std::string test = "'0x"_ss + 10 / 0x16E08_fmt + "' " + 10 / 0x11'8EF5f_fmt;
EXPECT_EQ(test, "'0x0000000A' _______A");
test = 100 / 0x2a010_fmt;
EXPECT_EQ(test, "0b01100100");
}
TEST(StrExpr, ChangeCase) {
std::string res = e_ascii_upper("teSt");
EXPECT_EQ(res, "TEST");
res = "/" + e_ascii_lower(res) + "/";
EXPECT_EQ(res, "/test/");
EXPECT_EQ(str::make_ascii_upper(res), "/TEST/");
str::make_ascii_lower(res, 1, 3);
EXPECT_EQ(res, "/teST/");
std::wstring wres = e_ascii_lower(L"TeSt"_ss);
EXPECT_EQ(wres, L"test");
std::u16string ures = u"/test/";
EXPECT_EQ(str::make_ascii_upper(ures), u"/TEST/");
str::make_ascii_lower(ures, 1, 3);
EXPECT_EQ(ures, u"/teST/");
}
TEST(StrExpr, StripPrefixSuffix) {
const ssa from = "begin--end";
EXPECT_EQ(*from.strip_prefix("begin"), "--end");
EXPECT_FALSE(from.strip_prefix("sd").has_value());
EXPECT_EQ(*from.strip_suffix_ia("End"), "begin--");
EXPECT_FALSE(from.strip_suffix("sd").has_value());
}
TEST(StrExpr, TrimPrefixSuffix) {
const ssa from = "beginbegin--end";
EXPECT_EQ(from.trimmed_prefix("begin"), "--end");
EXPECT_EQ(from.trimmed_prefix("begin", 1), "begin--end");
EXPECT_EQ(from.trimmed_prefix("sd"), from);
EXPECT_EQ(from.trimmed_suffix_ia("End"), "beginbegin--");
EXPECT_EQ(from.trimmed_suffix("sd"), from);
}
TEST(StrExpr, StartWithAnd) {
EXPECT_TRUE("begin --end"_ss.starts_with_and_ws("begin"));
EXPECT_FALSE("beginn --end"_ss.starts_with_and_ws("begin"));
EXPECT_TRUE("BegiN\t--end"_ss.starts_with_ia_and_ws("begin"_ss));
EXPECT_TRUE("begin[ --end"_ss.starts_with_and_oneof("begin", "/*[]"));
EXPECT_TRUE("Begin[ --end"_ss.starts_with_ia_and_oneof("begin", "/*[]"_ss));
}
TEST(SimStr, Get) {
ssa testa{"test"};
EXPECT_EQ(testa.get(1, to_end), "est");
EXPECT_EQ(testa.get(1, 2), "es");
EXPECT_EQ(testa.get(1, from_end(1)), "es");
EXPECT_EQ(testa.get(1, from_end(10)), "");
EXPECT_EQ(testa.get(from_end(3), from_end(1)), "es");
ssu testu{u"test"};
EXPECT_EQ(testu.get(1, to_end), u"est");
EXPECT_EQ(testu.get(1, 2), u"es");
EXPECT_EQ(testu.get(from_end(3), from_end(1)), u"es");
ssw testw{L"test"};
EXPECT_EQ(testw.get(1, to_end), L"est");
EXPECT_EQ(testw.get(1, 2), L"es");
EXPECT_EQ(testw.get(from_end(3), from_end(1)), L"es");
}
} // namespace simstr::tests } // namespace simstr::tests

View File

@ -1,5 +1,5 @@
/* /*
* ver. 1.5.0 * ver. 1.9.1
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Тесты simstr * Тесты simstr
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
@ -24,6 +24,9 @@ public:
size_t sharedCount() const { size_t sharedCount() const {
return type_ == Shared ? SharedStringData<u8s>::from_str(sstr_)->ref_.load() : 0u; return type_ == Shared ? SharedStringData<u8s>::from_str(sstr_)->ref_.load() : 0u;
} }
size_t sharedCountForce() const {
return SharedStringData<u8s>::from_str(sstr_)->ref_.load();
}
}; };
TEST(SimStr, CreateSimpleEmpty) { TEST(SimStr, CreateSimpleEmpty) {
@ -271,6 +274,7 @@ TEST(SimStr, SimpleFind) {
EXPECT_EQ("abccccc"_ss.find_last("ab"), 0); EXPECT_EQ("abccccc"_ss.find_last("ab"), 0);
} }
#if 0
TEST(SimStr, SubPiece) { TEST(SimStr, SubPiece) {
ssa testa{"test"}; ssa testa{"test"};
EXPECT_EQ(testa(1), "est"); EXPECT_EQ(testa(1), "est");
@ -286,39 +290,83 @@ TEST(SimStr, SubPiece) {
EXPECT_EQ(testw(1), L"est"); EXPECT_EQ(testw(1), L"est");
EXPECT_EQ(testw(1, 2), L"es"); EXPECT_EQ(testw(1, 2), L"es");
} }
#endif
TEST(SimStr, Get) {
ssa testa{"test"};
EXPECT_EQ(testa.get(1, to_end), "est");
EXPECT_EQ(testa.get(1, 2), "es");
EXPECT_EQ(testa.get(1, from_end(1)), "es");
EXPECT_EQ(testa.get(1, from_end(10)), "");
ssu testu{u"test"};
EXPECT_EQ(testu.get(1, to_end), u"est");
EXPECT_EQ(testu.get(1, 2), u"es");
ssw testw{L"test"};
EXPECT_EQ(testw.get(1, to_end), L"est");
EXPECT_EQ(testw.get(1, 2), L"es");
}
TEST(SimStr, SimpleSubstr) { TEST(SimStr, SimpleSubstr) {
ssa testa = "test"; ssa testa = "test";
#if 0
EXPECT_EQ(testa.substr(1, 0), "est"); EXPECT_EQ(testa.substr(1, 0), "est");
EXPECT_EQ(testa.substr(1, 2), "es"); EXPECT_EQ(testa.substr(1, 2), "es");
EXPECT_EQ(testa.substr(0, -1), "tes"); EXPECT_EQ(testa.substr(0, -1), "tes");
EXPECT_EQ(testa.substr(-2), "st"); EXPECT_EQ(testa.substr(-2), "st");
EXPECT_EQ(testa.substr(-3, 2), "es"); EXPECT_EQ(testa.substr(-3, 2), "es");
EXPECT_EQ(testa.substr(-3, -1), "es"); EXPECT_EQ(testa.substr(-3, -1), "es");
#endif
EXPECT_EQ(testa.sub(1, to_end), "est");
EXPECT_EQ(testa.sub(1, 2), "es");
EXPECT_EQ(testa.sub(0, from_end(1)), "tes");
EXPECT_EQ(testa.sub(from_end(2), to_end), "st");
EXPECT_EQ(testa.sub(from_end(3), 2), "es");
EXPECT_EQ(testa.sub(from_end(3), from_end(1)), "es");
EXPECT_EQ(testa.str_mid(1), "est"); EXPECT_EQ(testa.str_mid(1), "est");
EXPECT_EQ(testa.str_mid(1, 0), ""); EXPECT_EQ(testa.str_mid(1, 0), "");
EXPECT_EQ(testa.str_mid(1, 2), "es"); EXPECT_EQ(testa.str_mid(1, 2), "es");
EXPECT_EQ(testa.str_mid(2, 2), "st"); EXPECT_EQ(testa.str_mid(2, 2), "st");
ssu testu = u"test"; ssu testu = u"test";
#if 0
EXPECT_EQ(testu.substr(1, 0), u"est"); EXPECT_EQ(testu.substr(1, 0), u"est");
EXPECT_EQ(testu.substr(1, 2), u"es"); EXPECT_EQ(testu.substr(1, 2), u"es");
EXPECT_EQ(testu.substr(0, -1), u"tes"); EXPECT_EQ(testu.substr(0, -1), u"tes");
EXPECT_EQ(testu.substr(-2), u"st"); EXPECT_EQ(testu.substr(-2), u"st");
EXPECT_EQ(testu.substr(-3, 2), u"es"); EXPECT_EQ(testu.substr(-3, 2), u"es");
EXPECT_EQ(testu.substr(-3, -1), u"es"); EXPECT_EQ(testu.substr(-3, -1), u"es");
#endif
EXPECT_EQ(testu.sub(1, to_end), u"est");
EXPECT_EQ(testu.sub(1, 2), u"es");
EXPECT_EQ(testu.sub(0, from_end(1)), u"tes");
EXPECT_EQ(testu.sub(from_end(2), to_end), u"st");
EXPECT_EQ(testu.sub(from_end(3), 2), u"es");
EXPECT_EQ(testu.sub(from_end(3), from_end(1)), u"es");
EXPECT_EQ(testu.str_mid(1), u"est"); EXPECT_EQ(testu.str_mid(1), u"est");
EXPECT_EQ(testu.str_mid(1, 0), u""); EXPECT_EQ(testu.str_mid(1, 0), u"");
EXPECT_EQ(testu.str_mid(1, 2), u"es"); EXPECT_EQ(testu.str_mid(1, 2), u"es");
EXPECT_EQ(testu.str_mid(2, 2), u"st"); EXPECT_EQ(testu.str_mid(2, 2), u"st");
ssw testw = L"test"; ssw testw = L"test";
#if 0
EXPECT_EQ(testw.substr(1, 0), L"est"); EXPECT_EQ(testw.substr(1, 0), L"est");
EXPECT_EQ(testw.substr(1, 2), L"es"); EXPECT_EQ(testw.substr(1, 2), L"es");
EXPECT_EQ(testw.substr(0, -1), L"tes"); EXPECT_EQ(testw.substr(0, -1), L"tes");
EXPECT_EQ(testw.substr(-2), L"st"); EXPECT_EQ(testw.substr(-2), L"st");
EXPECT_EQ(testw.substr(-3, 2), L"es"); EXPECT_EQ(testw.substr(-3, 2), L"es");
EXPECT_EQ(testw.substr(-3, -1), L"es"); EXPECT_EQ(testw.substr(-3, -1), L"es");
#endif
EXPECT_EQ(testw.sub(1, to_end), L"est");
EXPECT_EQ(testw.sub(1, 2), L"es");
EXPECT_EQ(testw.sub(0, from_end(1)), L"tes");
EXPECT_EQ(testw.sub(from_end(2), to_end), L"st");
EXPECT_EQ(testw.sub(from_end(3), 2), L"es");
EXPECT_EQ(testw.sub(from_end(3), from_end(1)), L"es");
EXPECT_EQ(testw.str_mid(1), L"est"); EXPECT_EQ(testw.str_mid(1), L"est");
EXPECT_EQ(testw.str_mid(1, 0), L""); EXPECT_EQ(testw.str_mid(1, 0), L"");
EXPECT_EQ(testw.str_mid(1, 2), L"es"); EXPECT_EQ(testw.str_mid(1, 2), L"es");
@ -327,7 +375,7 @@ TEST(SimStr, SimpleSubstr) {
TEST(SimStr, ToInt) { TEST(SimStr, ToInt) {
EXPECT_EQ(ssa{" 123"}.as_int<int>(), 123); EXPECT_EQ(ssa{" 123"}.as_int<int>(), 123);
EXPECT_EQ(ssa{" 123"}(0, -1).as_int<int>(), 12); EXPECT_EQ(ssa{" 123"}.get(0, from_end(1)).as_int<int>(), 12);
EXPECT_EQ(ssa{"+123"}.as_int<int>(), 123); EXPECT_EQ(ssa{"+123"}.as_int<int>(), 123);
EXPECT_EQ(ssa{" -123aa"}.as_int<int>(), -123); EXPECT_EQ(ssa{" -123aa"}.as_int<int>(), -123);
EXPECT_EQ(ssa{"123"}.as_int<size_t>(), 123u); EXPECT_EQ(ssa{"123"}.as_int<size_t>(), 123u);
@ -484,6 +532,8 @@ TEST(SimStr, ToInt) {
TEST(SimStr, to_double) { TEST(SimStr, to_double) {
EXPECT_EQ(ssa{" 123"}.to_double(), 123.0); EXPECT_EQ(ssa{" 123"}.to_double(), 123.0);
EXPECT_EQ(ssa{" 123.1"}.to_double(), 123.1); EXPECT_EQ(ssa{" 123.1"}.to_double(), 123.1);
EXPECT_EQ(ssb{u8" 123"}.to_double(), 123.0);
EXPECT_EQ(ssb{u8" 123.1"}.to_double(), 123.1);
EXPECT_EQ(ssu{u" 123.13434"}.to_double(), 123.13434); EXPECT_EQ(ssu{u" 123.13434"}.to_double(), 123.13434);
EXPECT_EQ(ssuu{U" 123.13434"}.to_double(), 123.13434); EXPECT_EQ(ssuu{U" 123.13434"}.to_double(), 123.13434);
EXPECT_EQ(ssw{L" 123.13434"}.to_double(), 123.13434); EXPECT_EQ(ssw{L" 123.13434"}.to_double(), 123.13434);
@ -808,7 +858,7 @@ TEST(SimStr, AssignSstring) {
EXPECT_EQ(test = ssa{"other"}, "other"); EXPECT_EQ(test = ssa{"other"}, "other");
EXPECT_EQ(test = stringa{"trtr"_ss + 10}, "trtr10"); EXPECT_EQ(test = stringa{"trtr"_ss + 10}, "trtr10");
EXPECT_EQ(test = "trtr"_ss + 20, "trtr20"); EXPECT_EQ(test = "trtr"_ss + 20, "trtr20");
EXPECT_EQ(test = test(2), "tr20"); EXPECT_EQ(test = test.get(2, to_end), "tr20");
EXPECT_EQ(test = lstringa<10>{"func"}, "func"); EXPECT_EQ(test = lstringa<10>{"func"}, "func");
EXPECT_EQ(test = lstringsa<10>{"func"}, "func"); EXPECT_EQ(test = lstringsa<10>{"func"}, "func");
lstringsa<10> sample{15, "1234"}; lstringsa<10> sample{15, "1234"};
@ -937,10 +987,10 @@ TEST(SimStr, LStringAssign) {
test = lstringa<1>{"next step"}; test = lstringa<1>{"next step"};
EXPECT_EQ(test, "next step"); EXPECT_EQ(test, "next step");
test = test(0); test = test.get(0, to_end);
EXPECT_EQ(test, "next step"); EXPECT_EQ(test, "next step");
test = test(1, 2); test = test.get(1, 2);
EXPECT_EQ(test, "ex"); EXPECT_EQ(test, "ex");
test = e_c(100, 'a'); test = e_c(100, 'a');
@ -958,13 +1008,23 @@ TEST(SimStr, LStringAssign) {
TEST(SimStr, UtfConvert) { TEST(SimStr, UtfConvert) {
EXPECT_EQ(stringa{ssu{u"testпройден"}}, "testпройден"); EXPECT_EQ(stringa{ssu{u"testпройден"}}, "testпройден");
EXPECT_EQ(stringa{ssb{u8"testпройден"}}, "testпройден");
EXPECT_EQ(stringa{ssw{L"testпройден"}}, "testпройден"); EXPECT_EQ(stringa{ssw{L"testпройден"}}, "testпройден");
EXPECT_EQ(stringa{stringu{u"testпройден"}}, "testпройден"); EXPECT_EQ(stringa{stringu{u"testпройден"}}, "testпройден");
EXPECT_EQ(stringa{stringw{L"testпройден"}}, "testпройден"); EXPECT_EQ(stringa{stringw{L"testпройден"}}, "testпройден");
EXPECT_EQ(stringa{lstringu<40>{u"testпройден"}}, "testпройден"); EXPECT_EQ(stringa{lstringu<40>{u"testпройден"}}, "testпройден");
EXPECT_EQ(stringa{lstringw<40>{L"testпройден"}}, "testпройден"); EXPECT_EQ(stringa{lstringw<40>{L"testпройден"}}, "testпройден");
EXPECT_EQ(stringb{ssu{u"testпройден"}}, u8"testпройден");
EXPECT_EQ(stringb{ssa{u8"testпройден"}}, u8"testпройден");
EXPECT_EQ(stringb{ssw{L"testпройден"}}, u8"testпройден");
EXPECT_EQ(stringb{stringu{u"testпройден"}}, u8"testпройден");
EXPECT_EQ(stringb{stringw{L"testпройден"}}, u8"testпройден");
EXPECT_EQ(stringb{lstringu<40>{u"testпройден"}}, u8"testпройден");
EXPECT_EQ(stringb{lstringw<40>{L"testпройден"}}, u8"testпройден");
EXPECT_EQ(stringu{ssa{"testпройден"}}, u"testпройден"); EXPECT_EQ(stringu{ssa{"testпройден"}}, u"testпройден");
EXPECT_EQ(stringu{ssb{u8"testпройден"}}, u"testпройден");
EXPECT_EQ(stringu{ssw{L"testпройден"}}, u"testпройден"); EXPECT_EQ(stringu{ssw{L"testпройден"}}, u"testпройден");
EXPECT_EQ(stringu{stringa{"testпройден"}}, u"testпройден"); EXPECT_EQ(stringu{stringa{"testпройден"}}, u"testпройден");
EXPECT_EQ(stringu{stringw{L"testпройден"}}, u"testпройден"); EXPECT_EQ(stringu{stringw{L"testпройден"}}, u"testпройден");
@ -1316,9 +1376,9 @@ TEST(SimStr, LStrFormat) {
} }
#else #else
{ {
// char32_t в Windows совместим по размеру с wchar_t, поэтому для его форматирования можно использовать // char32_t в Linux совместим по размеру с wchar_t, поэтому для его форматирования можно использовать
// L"format_string", и передавать char32_t строковые объекты // L"format_string", и передавать char32_t строковые объекты
// char32_t on Windows is compatible in size with wchar_t, so you can use L"format_string" to format it // char32_t on Linux is compatible in size with wchar_t, so you can use L"format_string" to format it
// and pass char32_t string objects // and pass char32_t string objects
lstringuu<2> text; lstringuu<2> text;
text.format(L"{}{}", 'a', 'b'); text.format(L"{}{}", 'a', 'b');
@ -1384,13 +1444,13 @@ TEST(SimStr, LStrJoinAndExpressions) {
int k = 10; int k = 10;
double d = 12.1; double d = 12.1;
lstringa<10> test = ">" + e_repl(buffer.to_str(), "<>", "-") + k + ", " + d; lstringa<10> test = ">" + e_repl(buffer, "<>", "-") + k + ", " + d;
EXPECT_EQ(test, ">asd-fgh-jkl10, 12.1"); EXPECT_EQ(test, ">asd-fgh-jkl10, 12.1");
buffer.prepend(e_choice(test.length() > 2, eea + 99, eea + 12.1 + "asd")); buffer.prepend(e_choice(test.length() > 2, eea + 99, eea + 12.1 + "asd"));
EXPECT_EQ(buffer, "99asd<>fgh<>jkl"); EXPECT_EQ(buffer, "99asd<>fgh<>jkl");
buffer.change(2, 4, test(0, 3) + "__" + 1 + ','); buffer.change(2, 4, test.get(0, 3) + "__" + 1 + ',');
EXPECT_EQ(buffer, "99>as__1,>fgh<>jkl"); EXPECT_EQ(buffer, "99>as__1,>fgh<>jkl");
} }
@ -1797,17 +1857,6 @@ TEST(SimStr, ExprRepeat) {
EXPECT_EQ(std::string{e_repeat("aa"_ss + t + "_", 3)}, "aa1_aa1_aa1_"); EXPECT_EQ(std::string{e_repeat("aa"_ss + t + "_", 3)}, "aa1_aa1_aa1_");
} }
TEST(SimStr, Constexpr) {
constexpr ssa tt = " asd "_ss.trimmed();
static_assert(tt == "asd");
constexpr stringa aa{"asd"};
static_assert(aa == "asd");
static_assert(aa.length() == 3);
constexpr stringa bb = "";
constexpr int k = "123"_ss.to_int<int>().value;
static_assert(k == 123);
}
TEST(SimStr, StrExpToStdString) { TEST(SimStr, StrExpToStdString) {
std::basic_string<u8s, std::char_traits<u8s>, std::pmr::polymorphic_allocator<u8s>> test = "count = "_ss + 10 + " times"; std::basic_string<u8s, std::char_traits<u8s>, std::pmr::polymorphic_allocator<u8s>> test = "count = "_ss + 10 + " times";
EXPECT_EQ(test, "count = 10 times"); EXPECT_EQ(test, "count = 10 times");
@ -1986,13 +2035,21 @@ TEST(SimStr, HexEpr) {
std::u32string textuu = +U"val = 0X"sv + e_hex<HexFlags::No0x | HexFlags::Short>(0x12Au); std::u32string textuu = +U"val = 0X"sv + e_hex<HexFlags::No0x | HexFlags::Short>(0x12Au);
EXPECT_EQ(textuu, U"val = 0X12A"); 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; const char* ptr = (const char*)0xdeadbeefcafe01;
EXPECT_EQ(text, "ptr = 0x00DEADBEEFCAFE01"); 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; const char* ptr = (const char*)0xdeadbeef;
std::u16string utext = ptr + +u" freed"sv; std::u16string utext = ptr + +u" freed"sv;
EXPECT_EQ(utext, u"0x00DEADBEEFCAFE01 freed"); EXPECT_EQ(utext, u"0xDEADBEEF freed");
}
} }
TEST(SimStr, EFill) { TEST(SimStr, EFill) {
@ -2003,6 +2060,159 @@ TEST(SimStr, EFill) {
EXPECT_EQ(test, "t=10______>"); EXPECT_EQ(test, "t=10______>");
} }
TEST(SimStr, Subst) {
int from = 1, total = 100;
bool success = true;
lstringu<100> u16t = e_subst(u"Test {} from {}, {}.", from, total, e_choice(success, u"success", u"fail"));
EXPECT_EQ(u16t, u"Test 1 from 100, success.");
}
TEST(SimStr, EIntFmt) {
stringa test = "'0x"_ss + 10 / 0x16E08_fmt + "' " + 10 / 0x11'8EF5f_fmt;
EXPECT_EQ(test, "'0x0000000A' _______A");
test = 100 / 0x2a010_fmt;
EXPECT_EQ(test, "0b01100100");
std::u16string textu = +u"val = 0X"sv + 0x12A / 123_f16;
EXPECT_EQ(textu, u"val = 0X12a");
textu = u"val = "_ss + 0x12A / 0_f16;
EXPECT_EQ(textu, u"val = 0x0000012A");
}
TEST(SimStr, EChangeCase) {
stringa test = e_upper("teSt");
EXPECT_EQ(test, "TEST");
test = e_lower(test);
EXPECT_EQ(test, "test");
test = e_upper("ɐ ɑ ı ſ");
EXPECT_EQ(test, "Ɐ Ɑ I S");
test = "-" + e_lower("İ Ⱥ Ⱦ ẞ") + "-";
EXPECT_EQ(test, "-i ⱥ ⱦ ß-");
stringu utest = e_upper(u"teSt");
EXPECT_EQ(utest, u"TEST");
utest = e_lower(utest);
EXPECT_EQ(utest, u"test");
utest = e_upper(u"ı ſ ɐ ɑ");
EXPECT_EQ(utest, u"I S Ɐ Ɑ");
utest = u"-" + e_lower(u"İ Ⱥ Ⱦ ẞ") + u"-";
EXPECT_EQ(utest, u"-i ⱥ ⱦ ß-");
}
#ifndef _MSC_VER
void check_equal(stra a, stra b) {
EXPECT_EQ(a, b);
}
inline constexpr cestring<char, 100> ce_sample = "sample " + e_subst("test = {}", e_hex(10)) + ", done";
TEST(SimStr, ConstEval) {
constexpr cestring<char, 100> ce_empty;
static_assert(ce_empty.length() == 0);
static_assert(ce_empty == "");
static_assert(ce_empty.find("aa") == -1);
constexpr cestring<char, 100> ce_lit = "test";
static_assert(ce_lit.length() == 4);
static_assert(ce_lit == "test");
static_assert(ce_lit.find("st") == 2);
static_assert(ce_lit(1, 2) == "es");
constexpr cestring<char, 100> ce_str = "tester"_ss;
static_assert(ce_str.length() == 6);
static_assert(ce_str == "tester");
static_assert(ce_str.find("te") == 0);
static_assert(ce_str.find("ter") == 3);
static_assert(ce_str(1, -1) == "este");
constexpr cestring<char, 100> ce_repeat{10, "tu"};
static_assert(ce_repeat.length() == 20);
constexpr cestring<char, 100> ce_expr = "test = "_ss + 10 + " times";
static_assert(ce_expr == "test = 10 times");
constexpr cestring<char, 100> ce_subst = e_subst("test = {}", 10);
static_assert(ce_subst == "test = 10");
constexpr cestring<char, 100> ce_hex = e_subst("test = {}", e_hex(10));
static_assert(ce_hex == "test = 0x0000000A");
constexpr cestring<char, 100> ce_concat = e_concat("", "test = ", 10, " times");
static_assert(ce_concat == "test = 10 times");
static_assert(ce_concat(6, 3).to_int<int>().value == 10);
char arr[ce_concat.length()] = {};
static constexpr cestring<char, 40> ce_copy{ce_concat};
static_assert(ce_copy == "test = 10 times");
check_equal(ce_copy, "test = 10 times");
EXPECT_TRUE(ce_copy == "test = 10 times");
stringa test_copy = ce_sample(0, 10);
EXPECT_EQ(test_copy, "sample tes");
constexpr cestring<char, 100> ce_repl = e_repl("test", "e", "--");
static_assert(ce_repl == "t--st");
}
#endif
struct sized_alloc {
inline static size_t allocated = 0, dealloced = 0;
inline static void* alloced = nullptr;
void* allocate(size_t bytes) {
allocated += bytes;
return alloced = ::operator new(bytes);
}
template<typename T>
void deallocate(T* address, size_t size) noexcept {
dealloced += size;
EXPECT_EQ(address, alloced);
if constexpr (requires{::operator delete(address, size);}) {
::operator delete(address, size);
} else {
::operator delete(address);
}
}
};
TEST(SimStr, SizedAlloc) {
sized_alloc::allocated = sized_alloc::dealloced = 0;
{
lstring<u8s, 0, true, sized_alloc> src{10, "test"};
sstring<u8s, sized_alloc> str{std::move(src)};
EXPECT_TRUE(src.is_empty());
EXPECT_EQ(((Tstringa*)&str)->sharedCount(), SharedStringData<u8s>::check | 1);
}
EXPECT_EQ(sized_alloc::allocated, sized_alloc::dealloced);
EXPECT_EQ(sized_alloc::allocated, 64);
{
sstring<u8s, sized_alloc> str{10, "test"};
EXPECT_EQ(((Tstringa*)&str)->sharedCount(), 1);
}
EXPECT_EQ(sized_alloc::allocated, sized_alloc::dealloced);
EXPECT_EQ(sized_alloc::allocated, 113);
}
TEST(SimStr, SizedAllocU) {
sized_alloc::allocated = sized_alloc::dealloced = 0;
{
lstring<u16s, 0, true, sized_alloc> src{10, u"test"};
sstring<u16s, sized_alloc> str{std::move(src)};
EXPECT_TRUE(src.is_empty());
EXPECT_EQ(((Tstringa*)&str)->sharedCountForce(), SharedStringData<u8s>::check | 1);
}
EXPECT_EQ(sized_alloc::allocated, sized_alloc::dealloced);
EXPECT_EQ(sized_alloc::allocated, 112);
{
sstring<u16s, sized_alloc> str{10, u"test"};
EXPECT_EQ(((Tstringa*)&str)->sharedCountForce(), 1);
}
EXPECT_EQ(sized_alloc::allocated, sized_alloc::dealloced);
EXPECT_EQ(sized_alloc::allocated, 202);
}
} // namespace simstr::tests } // namespace simstr::tests
TEST(SimStr, StrNoNamespace) { TEST(SimStr, StrNoNamespace) {

308
tests/test_tostrexpr.cpp Normal file
View File

@ -0,0 +1,308 @@
/*
* ver. 1.9.1
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* Тесты simstr
* (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
* Test of simstr
*/
#include "../include/simstr/strexpr.h"
#include <gtest/gtest.h>
#include <format>
#include <list>
using namespace std::literals;
namespace simstr::tests {
/*!
* @ru
* @defgroup ConvertToStrExpr Конвертация типов в в строковые выражения
* Различные способы конвертации типов в строковые выражения.
* Если вы реализуете один (и только один) из способов преобразования вашего типа в строковое выражение,
* то сможете использовать ваш тип напрямую в операциях конкатенации со строковыми выражениями и как
* аргументы в функциях `e_concat` и `e_subst`.
* @en
* @defgroup ConvertToStrExpr Converting types to string expressions
* Various ways to convert types to string expressions.
* If you implement one (and only one) of the ways to convert your type to a string expression,
* then you can use your type directly in concatenation operations with string expressions and how
* arguments in the `e_concat` and `e_subst` functions.
*/
/*!
* @ingroup ConvertToStrExpr
* @ru @page method1 Способ 1
* Просто реализуйте в своём типе требования, чтобы он являлся строковым выражением.
* @en @page method1 Method 1
* Just implement the requirement in your type that it be a string expression.
* @ru @par Пример:
* @en @par Example:
* @~
* @snippet test_tostrexpr.cpp Method1
*/
//! [Method1]
struct add_exclamation {
ssa text_;
unsigned count_;
// symb_type
using symb_type = char;
// length
size_t length() const noexcept {
return text_.length() + count_;
}
// place
char* place(char* ptr) const noexcept{
ptr = text_.place(ptr);
std::char_traits<char>::assign(ptr, count_, '!');
return ptr + count_;
}
};
TEST(ToStrExpr, CheckExclamation) {
std::string test = "Msg is <" + add_exclamation{"Happy Birthday", 5} + ">";
EXPECT_EQ(test, "Msg is <Happy Birthday!!!!!>");
add_exclamation msg{"Happy Birthday", 3};
test = e_concat("", "Msg is <", msg, ">");
EXPECT_EQ(test, "Msg is <Happy Birthday!!!>");
const add_exclamation cmsg{"Happy Birthday", 0};
test = e_subst("Msg is <{}>", cmsg);
EXPECT_EQ(test, "Msg is <Happy Birthday>");
}
//! [Method1]
/*!
* @ingroup ConvertToStrExpr
* @ru @page method2 Способ 2
* Создайте тип-обёртку, который является строковым выражением и может инициализироваться
* вашим типом. После задайте их соответствие с помощью специализации шаблона `convert_to_strexpr`.
* @en @page method2 Method 2
* Create a wrapper type that is a string expression and can be initialized
* your type. Then set their correspondence using the `convert_to_strexpr` template specialization.
* @ru @par Пример:
* @en @par Example:
* @~
* @snippet test_tostrexpr.cpp Method2
*/
//! [Method2]
// Тип / Type
struct car_info {
std::string model;
int year;
};
// Обёртка для превращения его в строковое выражение
// Wrapper to turn it into a string expression
struct car_info_expr {
const car_info& car_;
expr_num<char, int> year;
car_info_expr(const car_info& car) : car_(car), year(car.year){}
inline static constexpr ssa ModelTag = "Model: ";
inline static constexpr ssa YearTag = ", Year: ";
using symb_type = char;
size_t length() const {
return ModelTag.length() + car_.model.length() + YearTag.length() + year.length();
}
char* place(char* ptr) const {
ptr = ModelTag.place(ptr);
std::char_traits<char>::copy(ptr, car_.model.data(), car_.model.length());
ptr += car_.model.length();
ptr = YearTag.place(ptr);
return year.place(ptr);
}
};
} // namespace simstr::tests
namespace simstr {
// Специализируем шаблон, задавая соответствие типа и его обёртки
// Specialize the template by specifying a match between the type and its wrapper
template<>
struct convert_to_strexpr<char, tests::car_info> {
// Указываем тип, который будет "обёрткой" для нашего типа
// Specify the type that will be a "wrapper" for our type
using type = tests::car_info_expr;
};
} // namespace simstr
namespace simstr::tests {
TEST(ToStrExpr, CheckCarInfo) {
car_info ci{"Ford", 2020};
std::string test = "Car is <"_ss + ci + ">";
EXPECT_EQ(test, "Car is <Model: Ford, Year: 2020>");
ci.year++;
test = e_concat("", "Car is <", ci, ">");
EXPECT_EQ(test, "Car is <Model: Ford, Year: 2021>");
ci.year++;
test = e_subst("Car is <{}>", ci);
EXPECT_EQ(test, "Car is <Model: Ford, Year: 2022>");
}
//! [Method2]
/*!
* @ingroup ConvertToStrExpr
* @ru @page method3 Способ 3
* Специализируйте шаблон `convert_to_strexpr` для вашего типа и создайте в нём статическую
* функцию `convert`, принимающую ваш объект и возвращающую строковое выражение, строковый объект
* simstr или std::basic_string.
* @en @page method3 Method 3
* Specialize the `convert_to_strexpr` template for your type and create a static
* `convert` function in it that takes your object and returns a string expression, a simstr string object,
* or std::basic_string.
* @ru @par Пример:
* @en @par Example:
* @~
* @snippet test_tostrexpr.cpp Method3
*/
//! [Method3]
struct animal {
std::string name_;
std::string sound_;
};
} //namespace simstr::tests
namespace simstr {
// Специализируем шаблон, задавая соответствие типа и его обёртки
// Specialize the template by specifying a match between the type and its wrapper
template<>
struct convert_to_strexpr<char, tests::animal> {
// Создаём функцию `convert`, которая вернёт строковое представление объекта
// Create a function `convert`, that will return a string representation of the object
static auto convert(const tests::animal& a) {
// Так делать нельзя - операция + складывает в выражение ссылки на временные объекты,
// которые разрушаются после ";", и возвращать такой объект нельзя.
// This can't be done - the operator+ adds references to temporary objects to the expression,
// which are destroyed after ";", and such an object cannot be returned.
//return "Animal: " + a.name_ + ", Sound: " + a.sound_;
// А вот такой можно - он не хранит ссылки на временные объекты
// But this one is possible - it doesn't store references to temporary objects
return e_concat("", "Animal: ", a.name_, ", Sound: ", a.sound_);
// Также можно возвращать просто std::string, stringa, lstringa
// You can also return just std::string, stringa, lstringa
}
};
} //namespace simstr
namespace simstr::tests {
TEST(ToStrExpr, CheckAnimal) {
animal cat{"Cat", "Meow"};
std::string test = "<"_ss + cat + ">";
EXPECT_EQ(test, "<Animal: Cat, Sound: Meow>");
const animal dog{"Dog", "Woof"};
test = e_concat("", "<", dog, ">");
EXPECT_EQ(test, "<Animal: Dog, Sound: Woof>");
test = e_subst("\\_{}_/", animal{"Snake", "Pssstt"});
EXPECT_EQ(test, "\\_Animal: Snake, Sound: Pssstt_/");
}
//! [Method3]
/*!
* @ingroup ConvertToStrExpr
* @ru @page method4 Способ 4
* Просто в своём типе сделайте функцию `template<typename K> auto to_strexpr()const`, которая возвращает
* строковое выражение или строковый объект.
* @en @page method4 Method 4
* Simply create a `template<typename K> auto to_strexpr()const` function in your type that returns a
* string expression or string object.
* @ru @par Пример:
* @en @par Example:
* @~
* @snippet test_tostrexpr.cpp Method4
*/
//! [Method4]
struct test {
int number;
int from;
// Сделаем две отдельные реализации: для char (попроще) и для остальных типов (там придётся возвращать не литералы, а simple_str, и требуется копия)
// Let's make two separate implementations: for char (simpler) and for other types (there we'll have to return not literals, but simple_str, and a copy is required)
template<typename K> requires (std::is_same_v<K, char>)
auto to_strexpr() const {
return e_concat("", "test ", number, " from ", from);
}
template<typename K> requires (!std::is_same_v<K, char>)
auto to_strexpr() const {
// uni_string возвращает локальный объект, а ссылку на них нельзя возвращать из функции,
// поэтому в e_concat надо форсировать сохранение по копии, а не по ссылке.
// uni_string returns a local object, and references to them cannot be returned from a function,
// so in e_concat we need to force saving by copy, not by reference.
return e_concat(force_copy{empty_expr<K>{}}, force_copy{uni_string(K, "test ")}, number, force_copy{uni_string(K, " from ")}, from);
}
};
TEST(ToStrExpr, CheckTest) {
test t1{1, 10};
std::string t = "Begin <"_ss + t1 + ">";
EXPECT_EQ(t, "Begin <test 1 from 10>");
const test t2{8, 12};
t = e_concat("", "<", t2, ">");
EXPECT_EQ(t, "<test 8 from 12>");
t = e_subst("<{}>", test{99, 100});
EXPECT_EQ(t, "<test 99 from 100>");
// Проверим работу для не char
// Let's check the work for non-char
std::wstring wt = L"aaa "_ss + test{99, 100};
EXPECT_EQ(wt, L"aaa test 99 from 100");
std::u16string ut = u"aaa "_ss + test{99, 100};
EXPECT_EQ(ut, u"aaa test 99 from 100");
}
//! [Method4]
TEST(ToStrExpr, ConcatCustom) {
std::string tt;
std::string c = e_concat(eea + "," + " ", u8"bb", tt, 1, e_if(true, "--"), e_hex<HexFlags::Short>(16), 1.2, test{10, 30});
EXPECT_EQ(c, "bb, , 1, --, 0x10, 1.2, test 10 from 30");
std::string_view text = "testes";
int count = 10;
std::string t = e_concat("", text, " = ", count, " times.");
EXPECT_EQ(t, "testes = 10 times.");
}
TEST(ToStrExpr, SubstCustom) {
const auto ttt = "test"_ss;
int ii = 3;
const test tr{10, 10};
std::string t = e_subst("Test {{--}} {}={}, {}", ttt, tr, ii);
EXPECT_EQ(t, "Test {--} test=test 10 from 10, 3");
t = e_subst("Test {2}={1}, {2}, {1}", "test", 2);
EXPECT_EQ(t, "Test 2=test, 2, test");
std::u16string u16t = e_subst(u"Test {}={}, {}", u"test", 2, u"test"sv);
EXPECT_EQ(u16t, u"Test test=2, test");
}
} // namespace simstr::tests