Skip to content

Commit a37d0b3

Browse files
committed
gperf
1 parent caf5c13 commit a37d0b3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

section4/gperf.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,21 @@ auto make_match = []()
4242

4343
void case1()
4444
{
45-
auto p = make_cpu_profiler("case1.perf");
45+
auto cp = make_cpu_profiler("case1.perf");
4646

4747
auto str = "neir:automata"s;
4848

49+
#if 1
50+
auto reg = make_regex(R"(^(\w+)\:(\w+)$)");
51+
auto what = make_match();
52+
#endif
53+
4954
for(int i = 0; i < 1000; i++) {
5055

56+
#if 0
5157
auto reg = make_regex(R"(^(\w+)\:(\w+)$)");
5258
auto what = make_match();
59+
#endif
5360

5461
assert(regex_match(str, what, reg));
5562
}

0 commit comments

Comments
 (0)