Skip to content

Commit 10c9f74

Browse files
authored
Concluding Optimizations
- Refactored cloning code flow (major update). - Implemented granular level optimizations. - Added forced inlining and noexcept(s) on hot paths. - Applied likely/unlikely compiler hints for performance. - Completed benchmarking setup. - Added benchmark statistics for calls returning string and string_view. - RTL dispatch machinery now only 1–2 ns slower than `std::function` in micro-benchmarking. - Reflection cost remains consistent with workload scaling, indistinguishable from `std::function`. - Reflection overhead is negligible for reasonable workloads, performing on par with `std::function`.
2 parents f008cc0 + d60c9f3 commit 10c9f74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4248
-1514
lines changed

BenchMarkReports/BenchMarkReport_arm.md

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

BenchMarkReports/rtl-bm-raw-logs-linux.md

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

CxxTestDesignPatternsUsingRTL/CxxTestProxyDesignPattern/inc/Proxy.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace proxy_test
1919
{
2020
const auto orgMethod = OriginalReflection::getClass()->getMethod(pFunctionName);
2121
if (!orgMethod.has_value()) {
22-
return { rtl::error::FunctionNotRegisterd, rtl::RObject{ } };
22+
return { rtl::error::FunctionNotRegistered, rtl::RObject{ } };
2323
}
2424
if (orgMethod->hasSignature<_args...>()) {
2525
return orgMethod->bind(m_originalObj).call(std::forward<_args>(params)...);
@@ -44,7 +44,7 @@ namespace proxy_test
4444
{
4545
const auto orgMethod = OriginalReflection::getClass()->getMethod(pFunctionName);
4646
if (!orgMethod.has_value()) {
47-
return { rtl::error::FunctionNotRegisterd, rtl::RObject{ } };
47+
return { rtl::error::FunctionNotRegistered, rtl::RObject{ } };
4848
}
4949
if (orgMethod->hasSignature<_args...>()) {
5050
return orgMethod->bind().call(std::forward<_args>(params)...);

CxxTestProps/src/Date.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ namespace nsdate
151151
vector<string> date;
152152
for (size_t i = 0; i < pDateStr.length(); i++)
153153
{
154-
if (pDateStr.at(i) == '/') {
154+
if (pDateStr[i] == '/') {
155155
date.push_back(strBuf);
156156
strBuf.clear();
157157
}
158158
else {
159-
strBuf.push_back(pDateStr.at(i));
159+
strBuf.push_back(pDateStr[i]);
160160
}
161161
}
162162
m_day = stoi(date[0]);
@@ -208,12 +208,12 @@ namespace nsdate
208208
vector<string> date;
209209
for (size_t i = 0; i < pDateStr.length(); i++)
210210
{
211-
if (pDateStr.at(i) == '/') {
211+
if (pDateStr[i] == '/') {
212212
date.push_back(strBuf);
213213
strBuf.clear();
214214
}
215215
else {
216-
strBuf.push_back(pDateStr.at(i));
216+
strBuf.push_back(pDateStr[i]);
217217
}
218218
}
219219
m_day = stoi(date[0]);

RTLBenchmarkApp/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ set(CXX_EXE_NAME RTLBenchmarkApp)
4646
# ===============================
4747
add_executable(${CXX_EXE_NAME}
4848
src/main.cpp
49-
src/BenchMark.cpp # <-- added
50-
src/BenchMark.h # <-- optional (for IDE visibility)
49+
src/BenchMark.h
50+
src/BenchMark.cpp
51+
src/StandardCall.h
52+
src/StandardCall.cpp
53+
src/ReflectedCall.h
54+
src/ReflectedCall.cpp
5155
)
5256

5357

0 commit comments

Comments
 (0)