Skip to content

Commit 52b5fb7

Browse files
committed
cleanup.
1 parent 524adff commit 52b5fb7

File tree

5 files changed

+5
-84
lines changed

5 files changed

+5
-84
lines changed

RTLBenchmarkApp/src/BenchMark.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -102,36 +102,6 @@ namespace rtl_bench
102102
}
103103

104104

105-
namespace rtl_bench
106-
{
107-
void BenchMark::BM_FunctionCall(benchmark::State& state)
108-
{
109-
static std::function getMsg = [](const str_type& pMsg) {
110-
return getMessage(pMsg);
111-
};
112-
113-
for (auto _ : state)
114-
{
115-
benchmark::DoNotOptimize(getMsg(g_longStr));
116-
}
117-
}
118-
119-
void BenchMark::BM_LambdaFunc(benchmark::State& state)
120-
{
121-
static rtl::detail::LambdaFunction<const std::string> obj;
122-
123-
static auto _ = []() {
124-
obj.init(getMessage);
125-
return 0;
126-
}();
127-
128-
for (auto _ : state) {
129-
benchmark::DoNotOptimize(obj(g_longStr));
130-
}
131-
}
132-
}
133-
134-
135105
namespace rtl_bench
136106
{
137107
void BenchMark::reflectedCall_noReturn(benchmark::State& state)

RTLBenchmarkApp/src/BenchMark.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
# define NOINLINE
1515
#endif
1616

17-
using str_type = std::string; //*/ std::string_view;
17+
using str_type = /*std::string; //*/ std::string_view;
1818

1919
namespace rtl_bench
2020
{
2121
static std::optional<std::string> g_msg;
2222

2323
NOINLINE static void sendMessage(str_type pMsg) {
24-
std::string result = pMsg + pMsg;
24+
std::string result = std::string(pMsg) + std::string(pMsg);
2525
result = result + result;
2626
result = result + result;
2727
g_msg = pMsg;
2828
}
2929

3030
NOINLINE static str_type getMessage(str_type pMsg) {
31-
std::string result = pMsg + pMsg;
31+
std::string result = std::string(pMsg) + std::string(pMsg);
3232
result = result + result;
3333
result = result + result;
3434
g_msg = pMsg;
@@ -38,7 +38,7 @@ namespace rtl_bench
3838
struct Node
3939
{
4040
NOINLINE void sendMessage(str_type pMsg) {
41-
std::string result = pMsg + pMsg;
41+
std::string result = std::string(pMsg) + std::string(pMsg);
4242
result = result + result;
4343
result = result + result;
4444
g_msg = pMsg;
@@ -47,7 +47,7 @@ namespace rtl_bench
4747

4848
NOINLINE str_type getMessage(str_type pMsg)
4949
{
50-
std::string result = pMsg + pMsg;
50+
std::string result = std::string(pMsg) + std::string(pMsg);
5151
result = result + result;
5252
result = result + result;
5353
g_msg = pMsg;
@@ -95,9 +95,5 @@ namespace rtl_bench
9595
static void reflectedCall_withReturn(benchmark::State& state);
9696

9797
static void reflectedMethodCall_withReturn(benchmark::State& state);
98-
99-
static void BM_FunctionCall(benchmark::State& state);
100-
101-
static void BM_LambdaFunc(benchmark::State& state);
10298
};
10399
}

RTLBenchmarkApp/src/main.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,4 @@ BENCHMARK(rtl_bench::BenchMark::stdFunctionCall_withReturn);
1717
BENCHMARK(rtl_bench::BenchMark::reflectedCall_withReturn);
1818
BENCHMARK(rtl_bench::BenchMark::reflectedMethodCall_withReturn);
1919

20-
BENCHMARK(rtl_bench::BenchMark::BM_LambdaFunc);
21-
BENCHMARK(rtl_bench::BenchMark::BM_FunctionCall);
22-
2320
BENCHMARK_MAIN();

ReflectionTemplateLib/detail/inc/LambdaFunction.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

ReflectionTemplateLib/detail/src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ set(LOCAL_SOURCES
99

1010
SET(LOCAL_HEADERS
1111

12-
"${PROJECT_SOURCE_DIR}/detail/inc/LambdaFunction.h"
1312
"${PROJECT_SOURCE_DIR}/detail/inc/CallReflector.h"
1413
"${PROJECT_SOURCE_DIR}/detail/inc/CxxReflection.h"
1514
"${PROJECT_SOURCE_DIR}/detail/inc/FunctionCaller.h"

0 commit comments

Comments
 (0)