fix: do misc work

- add macos compile note in compile manual.
- add DoNotOptimize in benchmark.
This commit is contained in:
yyc12345 committed 2025-10-03 22:47:30 +08:00
1 parent c6c450f6fa
commit 8e0865384d
2 files changed
+4 -1

No files matched your search

+2
View File
@@ -11,6 +11,7 @@ namespace yyccbench::string::op {
std::u8string_view strl = u8" \thello\r\n"sv, words = u8" \t\r\n"sv;
for (auto _ : state) {
auto rv = OP::strip(strl, words);
benchmark::DoNotOptimize(rv);
}
}
BENCHMARK(BM_StringStrip)->Name("StringStrip");
@@ -19,6 +20,7 @@ namespace yyccbench::string::op {
std::u8string_view strl = u8" \thello\r\n"sv, words = u8" \t\r\n"sv;
for (auto _ : state) {
auto rv = OP::trim(strl, words);
benchmark::DoNotOptimize(rv);
}
}
BENCHMARK(BM_StringTrim)->Name("StringTrim");