diff --git a/BenchMarkReport_0.md b/BenchMarkReport_0.md deleted file mode 100644 index d56ab3cb..00000000 --- a/BenchMarkReport_0.md +++ /dev/null @@ -1,58 +0,0 @@ -# Reflection Template Library (RTL) — Benchmark Report - -This document presents benchmark results for the **Reflection Template Library (RTL)**. -The goal was to measure the runtime overhead of reflective function calls compared to direct calls and `std::function`, under increasing workloads. - ---- - -## Benchmark Setup - -We tested: - -- **Direct calls** (baseline). -- **`std::function` calls** and method calls. -- **RTL reflective calls** (free functions and member methods, with and without return values). - -Each benchmark was repeated across workloads of increasing complexity, with times measured in nanoseconds. - ---- - -## Results Summary - -| Workload | Direct Call (ns) | Reflected Call Overhead (ns) | Reflected Method Overhead (ns) | Notes (With Return) | -|-----------------|------------------|------------------------------|--------------------------------|---------------------| -| baseline_40ns | 39.0 / 44.7 | +2.5 | +6.6 | +10.6 / +14.3 | -| workload_80ns | 82.4 / 82.5 | ~0 | ~0 | +12.5 / +15.6 | -| workload_100ns | 94.2 / 100.0 | +1.4 | +8.8 | +12.0 / +16.0 | -| workload_150ns* | 139.0 / 158.0 | +2–3 | +14–17 | +12–13 / +17–19 | - -\*Three independent runs were recorded at ~150 ns workload; numbers are consistent. - ---- - -## Insights - -- **Constant Overhead** - Reflection overhead remains almost constant across workloads: - - No-return functions: **+2–6 ns**. - - Return-value functions: **+10–20 ns**. - -- **Percentage Overhead Shrinks** - - At the 40 ns baseline, overhead was ~25%. - - By ~150 ns workloads, overhead dropped below 10%. - -- **No Scaling Penalty** - The overhead does not grow with function complexity. - This indicates that RTL adds only a fixed, predictable cost per call, with no hidden allocations. - -- **Performance-Culture Friendly** - This aligns with C++’s ethos: *you only pay a small, predictable cost when you use reflection*. - ---- - -## Conclusion - -The Reflection Template Library (RTL) demonstrates: - -- **Runtime reflection with constant, minimal overhead**. -- **Predictable cost model**: ~10–20 ns for reflective calls with returns. diff --git a/BenchMarkReports/BenchMarkReport_arm.md b/BenchMarkReports/BenchMarkReport_arm.md new file mode 100644 index 00000000..07d9d0e7 --- /dev/null +++ b/BenchMarkReports/BenchMarkReport_arm.md @@ -0,0 +1,154 @@ +RTL Benchmarking Analysis Report + +Date: 2025-09-08 +Platform: Android tablet running Ubuntu via Turmax VM +CPU: 8 cores @ 1804.8 MHz +VM Environment: Ubuntu inside Turmax app +Load Average During Benchmarks: 3.9–6.9 +Note: CPU scaling enabled; real-time measurements may include slight noise. + + +--- + +1. Benchmark Setup + +All benchmarks measure call dispatch time for various call types under different workloads: + +Direct Call: Native C++ function calls. + +std::function Call: Calls wrapped in std::function. + +std::function Method Call: Member functions wrapped in std::function. + +Reflected Call: RTL reflection free function dispatch. + +Reflected Method Call: RTL reflection method dispatch. + + +Two variants measured: + +No-Return: Functions with void return type. + +With-Return: Functions returning a value. + + +Iterations per benchmark varied depending on workload and time resolution, from millions of iterations at ~100 ns calls to hundreds of thousands at ~1 µs calls. + + +--- + +2. OS & Platform Context + +Android environment running Ubuntu via Turmax VM introduces: + +CPU scheduling variability + +CPU frequency scaling + +Minor memory virtualization overhead + + +Despite this, benchmark results are stable and reproducible, with only small variations across runs (~2–5%). + +Load averages during tests were moderate-to-high (3.9–6.9), confirming RTL performance is robust under system stress. + + + +--- + +3. Benchmark Results Summary + +3.1 No-Return Calls + +Call Type Time Range (ns) Overhead vs Direct + +Direct Call 106–1176 0% +std::function 108–1448 5–23% +std::function Method 113–1247 7–10% +Reflected Call 110–1234 8–10% +Reflected Method 120–1260 10–14% + + +Observations: + +Reflection overhead is modest and predictable. + +Reflected free calls scale well, occasionally slightly cheaper than direct calls due to CPU cache effects. + +Method calls are ~10–14% slower than direct calls at peak workload. + + +3.2 With-Return Calls + +Call Type Time Range (ns) Overhead vs Direct + +Direct Call 133–1292 0% +std::function 135–1296 0–5% +std::function Method 143–1300 0–4% +Reflected Call 177–1345 3–6% +Reflected Method 192–1376 5–10% + + +Observations: + +Return value dispatch adds ~50–80 ns per call consistently. + +Reflected methods with return are the heaviest, but overhead remains bounded below 10%. + +Scaling is linear even at extreme workloads (hundreds of thousands of calls in µs range). + + + +--- + +4. Scaling Insights + +1. Direct and std::function calls scale linearly with workload; predictable performance. + + +2. Reflected calls scale well — overhead remains bounded, even at ultra-heavy call frequencies (~1+ µs/call). + + +3. Methods cost slightly more than free functions (~10%), consistent across workload. + + +4. Return-value functions consistently add ~50–80 ns, regardless of workload. + + +5. Minor run-to-run variation is attributable to VM CPU scheduling and frequency scaling, not RTL inefficiency. + + + + +--- + +5. Implications for RTL Usage + +Dynamic Workloads: Reflection can safely handle millions of calls without becoming a bottleneck. + +Game Engines / Scripting / Tooling: RTL is suitable for runtime event dispatch, editor tooling, and serialization/deserialization tasks. + +Micro-optimization: For extremely hot loops (<10 ns per call), direct calls or std::function may still be preferred. + +Overall: RTL provides a balanced tradeoff between dynamic flexibility and runtime performance. + + + +--- + +6. Conclusion + +RTL reflection overhead is modest and predictable: + +~5–10% for free function reflection + +~10–14% for method reflection + +Return-value adds ~50–80 ns consistently + + +Even in heavy workloads (~1 µs per call), reflection remains viable for high-frequency dynamic systems. + +This confirms RTL’s practicality in real-world applications, including heavy scripting, runtime tools, and editor-driven dynamic systems. + + diff --git a/BenchMarkReports/rtl-bm-raw-logs-linux.md b/BenchMarkReports/rtl-bm-raw-logs-linux.md new file mode 100644 index 00000000..09611905 --- /dev/null +++ b/BenchMarkReports/rtl-bm-raw-logs-linux.md @@ -0,0 +1,693 @@ +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 5.13 ns 5.13 ns 135919976 +rtl_bench::BenchMark::stdFunctionCall_noReturn 7.76 ns 7.76 ns 94666728 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 7.25 ns 7.25 ns 95301804 +rtl_bench::BenchMark::reflectedCall_noReturn 8.84 ns 8.84 ns 78729071 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 12.8 ns 12.8 ns 54304726 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 10.9 ns 10.9 ns 64504012 +rtl_bench::BenchMark::stdFunctionCall_withReturn 11.3 ns 11.3 ns 62169837 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 11.3 ns 11.3 ns 62025636 +rtl_bench::BenchMark::reflectedCall_withReturn 19.7 ns 19.7 ns 34449012 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 24.2 ns 24.2 ns 28818816 + + +Run on (16 X 2365.46 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 0.40, 0.22, 0.10 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 5.13 ns 5.13 ns 132976781 +rtl_bench::BenchMark::stdFunctionCall_noReturn 7.67 ns 7.66 ns 89565266 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 7.49 ns 7.49 ns 90664223 +rtl_bench::BenchMark::reflectedCall_noReturn 9.09 ns 9.08 ns 75820200 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 12.9 ns 12.9 ns 52811968 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 11.1 ns 11.1 ns 63236228 +rtl_bench::BenchMark::stdFunctionCall_withReturn 11.3 ns 11.3 ns 62114941 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 11.3 ns 11.3 ns 62173322 +rtl_bench::BenchMark::reflectedCall_withReturn 20.1 ns 20.1 ns 34688477 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 24.4 ns 24.4 ns 28344154 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 0.49, 0.25, 0.11 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 5.12 ns 5.12 ns 135119531 +rtl_bench::BenchMark::stdFunctionCall_noReturn 7.49 ns 7.49 ns 93438823 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 7.38 ns 7.37 ns 89833458 +rtl_bench::BenchMark::reflectedCall_noReturn 8.97 ns 8.96 ns 77159534 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 12.8 ns 12.8 ns 53713548 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 10.9 ns 10.8 ns 64448503 +rtl_bench::BenchMark::stdFunctionCall_withReturn 11.3 ns 11.3 ns 62186623 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 11.3 ns 11.3 ns 61775887 +rtl_bench::BenchMark::reflectedCall_withReturn 21.1 ns 21.1 ns 33369106 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 25.3 ns 25.3 ns 28330205 + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 43.5 ns 43.4 ns 16140035 +rtl_bench::BenchMark::stdFunctionCall_noReturn 43.5 ns 43.5 ns 16022738 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 46.4 ns 46.4 ns 15125120 +rtl_bench::BenchMark::reflectedCall_noReturn 45.0 ns 45.0 ns 15619923 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 53.0 ns 53.0 ns 13172672 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 47.2 ns 47.2 ns 14672175 +rtl_bench::BenchMark::stdFunctionCall_withReturn 46.9 ns 46.9 ns 14944416 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 47.9 ns 47.9 ns 13860992 +rtl_bench::BenchMark::reflectedCall_withReturn 59.8 ns 59.8 ns 11560810 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 66.3 ns 66.3 ns 10551881 + + +Run on (16 X 2759.67 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.89, 1.58, 0.71 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 43.3 ns 43.3 ns 16255535 +rtl_bench::BenchMark::stdFunctionCall_noReturn 43.9 ns 43.9 ns 15980619 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 46.9 ns 46.9 ns 15033010 +rtl_bench::BenchMark::reflectedCall_noReturn 44.7 ns 44.7 ns 15594562 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 52.0 ns 52.0 ns 13109978 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 46.0 ns 46.0 ns 15172547 +rtl_bench::BenchMark::stdFunctionCall_withReturn 46.4 ns 46.4 ns 15047246 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 49.5 ns 49.4 ns 14209101 +rtl_bench::BenchMark::reflectedCall_withReturn 60.2 ns 60.2 ns 11739374 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 65.6 ns 65.6 ns 10567973 + + +Run on (16 X 3463.13 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.54, 1.56, 0.72 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 42.7 ns 42.7 ns 16337775 +rtl_bench::BenchMark::stdFunctionCall_noReturn 43.0 ns 43.0 ns 16271330 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 44.7 ns 44.7 ns 15666732 +rtl_bench::BenchMark::reflectedCall_noReturn 44.7 ns 44.7 ns 15661281 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 52.8 ns 52.8 ns 13150690 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 47.5 ns 47.5 ns 14694843 +rtl_bench::BenchMark::stdFunctionCall_withReturn 47.7 ns 47.7 ns 14654741 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 48.0 ns 48.0 ns 14583577 +rtl_bench::BenchMark::reflectedCall_withReturn 59.3 ns 59.2 ns 11665284 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 66.1 ns 66.1 ns 10264640 + + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 93.1 ns 93.0 ns 7452049 +rtl_bench::BenchMark::stdFunctionCall_noReturn 85.5 ns 85.5 ns 8160664 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 85.6 ns 85.6 ns 8170267 +rtl_bench::BenchMark::reflectedCall_noReturn 87.3 ns 87.3 ns 8019372 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 96.3 ns 96.3 ns 7320818 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 97.7 ns 97.7 ns 7185010 +rtl_bench::BenchMark::stdFunctionCall_withReturn 97.8 ns 97.8 ns 7143808 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 98.2 ns 98.2 ns 7136742 +rtl_bench::BenchMark::reflectedCall_withReturn 110 ns 110 ns 6331574 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 109 ns 109 ns 6428569 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 1.86, 1.52, 0.81 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 93.0 ns 93.0 ns 7505449 +rtl_bench::BenchMark::stdFunctionCall_noReturn 86.4 ns 86.4 ns 8293576 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 86.0 ns 86.0 ns 7970089 +rtl_bench::BenchMark::reflectedCall_noReturn 86.7 ns 86.7 ns 7903218 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 99.0 ns 99.0 ns 7252173 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 99.1 ns 99.1 ns 7127303 +rtl_bench::BenchMark::stdFunctionCall_withReturn 100 ns 100 ns 7127599 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 96.1 ns 96.1 ns 6960473 +rtl_bench::BenchMark::reflectedCall_withReturn 108 ns 108 ns 6488518 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 110 ns 110 ns 6402141 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 1.65, 1.48, 0.81 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 89.6 ns 89.6 ns 7704175 +rtl_bench::BenchMark::stdFunctionCall_noReturn 84.2 ns 84.2 ns 8221287 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 84.1 ns 84.1 ns 8287490 +rtl_bench::BenchMark::reflectedCall_noReturn 84.5 ns 84.5 ns 8258013 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 96.8 ns 96.8 ns 7220738 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 94.6 ns 94.6 ns 7379540 +rtl_bench::BenchMark::stdFunctionCall_withReturn 94.2 ns 94.2 ns 7376416 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 95.8 ns 95.8 ns 7303837 +rtl_bench::BenchMark::reflectedCall_withReturn 107 ns 107 ns 6513129 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 110 ns 110 ns 6376445 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 3.45, 1.93, 1.05 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 145 ns 145 ns 4777413 +rtl_bench::BenchMark::stdFunctionCall_noReturn 158 ns 158 ns 4431253 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 158 ns 158 ns 4414950 +rtl_bench::BenchMark::reflectedCall_noReturn 150 ns 150 ns 4656282 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 160 ns 160 ns 4374654 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 163 ns 163 ns 4264835 +rtl_bench::BenchMark::stdFunctionCall_withReturn 164 ns 164 ns 4268809 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 165 ns 165 ns 4241611 +rtl_bench::BenchMark::reflectedCall_withReturn 177 ns 177 ns 3955011 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 177 ns 177 ns 3946072 + + +Run on (16 X 2754.8 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 3.08, 1.90, 1.04 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 143 ns 143 ns 4875747 +rtl_bench::BenchMark::stdFunctionCall_noReturn 155 ns 155 ns 4459259 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 156 ns 156 ns 4467358 +rtl_bench::BenchMark::reflectedCall_noReturn 149 ns 149 ns 4693753 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 161 ns 161 ns 4341051 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 161 ns 161 ns 4285692 +rtl_bench::BenchMark::stdFunctionCall_withReturn 162 ns 162 ns 4334995 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 163 ns 163 ns 4318397 +rtl_bench::BenchMark::reflectedCall_withReturn 174 ns 174 ns 4017771 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 178 ns 178 ns 3961999 + + +Run on (16 X 2969.86 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.54, 1.84, 1.04 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 143 ns 143 ns 4764039 +rtl_bench::BenchMark::stdFunctionCall_noReturn 156 ns 156 ns 4469178 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 157 ns 157 ns 4456946 +rtl_bench::BenchMark::reflectedCall_noReturn 150 ns 150 ns 4642233 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 161 ns 161 ns 4333830 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 162 ns 162 ns 4324427 +rtl_bench::BenchMark::stdFunctionCall_withReturn 163 ns 163 ns 4298995 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 163 ns 163 ns 4276257 +rtl_bench::BenchMark::reflectedCall_withReturn 175 ns 175 ns 3993045 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 178 ns 178 ns 3935333 + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 333 ns 333 ns 2102913 +rtl_bench::BenchMark::stdFunctionCall_noReturn 321 ns 321 ns 2185634 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 318 ns 318 ns 2240800 +rtl_bench::BenchMark::reflectedCall_noReturn 314 ns 313 ns 2239171 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 318 ns 318 ns 2204379 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 340 ns 340 ns 2073976 +rtl_bench::BenchMark::stdFunctionCall_withReturn 338 ns 338 ns 2077093 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 338 ns 338 ns 2075401 +rtl_bench::BenchMark::reflectedCall_withReturn 341 ns 340 ns 2054536 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 341 ns 341 ns 2044551 + + +Run on (16 X 1745.17 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.10, 1.96, 1.18 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 311 ns 311 ns 2248437 +rtl_bench::BenchMark::stdFunctionCall_noReturn 294 ns 294 ns 2377622 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 295 ns 295 ns 2368740 +rtl_bench::BenchMark::reflectedCall_noReturn 298 ns 297 ns 2359583 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 302 ns 301 ns 2309840 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 316 ns 315 ns 2221511 +rtl_bench::BenchMark::stdFunctionCall_withReturn 315 ns 315 ns 2228403 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 318 ns 318 ns 2210030 +rtl_bench::BenchMark::reflectedCall_withReturn 332 ns 332 ns 2106466 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 333 ns 333 ns 2094067 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 1.93, 1.92, 1.18 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 313 ns 313 ns 2236927 +rtl_bench::BenchMark::stdFunctionCall_noReturn 294 ns 294 ns 2375376 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 296 ns 296 ns 2367683 +rtl_bench::BenchMark::reflectedCall_noReturn 288 ns 288 ns 2435142 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 293 ns 292 ns 2385426 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 306 ns 306 ns 2292899 +rtl_bench::BenchMark::stdFunctionCall_withReturn 308 ns 308 ns 2272770 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 307 ns 307 ns 2285690 +rtl_bench::BenchMark::reflectedCall_withReturn 324 ns 324 ns 2165729 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 329 ns 329 ns 2131439 + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 427 ns 426 ns 1640259 +rtl_bench::BenchMark::stdFunctionCall_noReturn 418 ns 418 ns 1673663 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 412 ns 412 ns 1663531 +rtl_bench::BenchMark::reflectedCall_noReturn 403 ns 402 ns 1744466 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 414 ns 414 ns 1694049 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 439 ns 439 ns 1594234 +rtl_bench::BenchMark::stdFunctionCall_withReturn 439 ns 439 ns 1588323 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 442 ns 441 ns 1589325 +rtl_bench::BenchMark::reflectedCall_withReturn 474 ns 474 ns 1473335 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 485 ns 485 ns 1447302 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.62, 2.16, 1.34 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 429 ns 429 ns 1630936 +rtl_bench::BenchMark::stdFunctionCall_noReturn 423 ns 423 ns 1658743 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 415 ns 414 ns 1689553 +rtl_bench::BenchMark::reflectedCall_noReturn 407 ns 406 ns 1716778 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 417 ns 417 ns 1681352 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 445 ns 445 ns 1572865 +rtl_bench::BenchMark::stdFunctionCall_withReturn 447 ns 447 ns 1567737 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 450 ns 450 ns 1555132 +rtl_bench::BenchMark::reflectedCall_withReturn 470 ns 470 ns 1487432 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 467 ns 467 ns 1508687 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.18, 2.08, 1.33 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 426 ns 426 ns 1642497 +rtl_bench::BenchMark::stdFunctionCall_noReturn 426 ns 426 ns 1635642 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 425 ns 425 ns 1648210 +rtl_bench::BenchMark::reflectedCall_noReturn 399 ns 399 ns 1757243 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 409 ns 409 ns 1716411 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 438 ns 438 ns 1598323 +rtl_bench::BenchMark::stdFunctionCall_withReturn 437 ns 437 ns 1602346 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 442 ns 442 ns 1587073 +rtl_bench::BenchMark::reflectedCall_withReturn 458 ns 458 ns 1523923 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 481 ns 481 ns 1456282 + + + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 502 ns 502 ns 1371875 +rtl_bench::BenchMark::stdFunctionCall_noReturn 501 ns 501 ns 1369311 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 497 ns 497 ns 1395926 +rtl_bench::BenchMark::reflectedCall_noReturn 496 ns 496 ns 1412410 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 501 ns 501 ns 1000000 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 540 ns 540 ns 1295965 +rtl_bench::BenchMark::stdFunctionCall_withReturn 540 ns 540 ns 1268086 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 551 ns 550 ns 1261480 +rtl_bench::BenchMark::reflectedCall_withReturn 558 ns 558 ns 1263226 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 564 ns 564 ns 1235554 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 3.46, 2.52, 1.55 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 519 ns 519 ns 1341196 +rtl_bench::BenchMark::stdFunctionCall_noReturn 523 ns 523 ns 1340750 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 524 ns 523 ns 1337374 +rtl_bench::BenchMark::reflectedCall_noReturn 517 ns 517 ns 1349960 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 506 ns 506 ns 1377893 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 554 ns 554 ns 1263461 +rtl_bench::BenchMark::stdFunctionCall_withReturn 552 ns 552 ns 1266256 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 566 ns 566 ns 1227643 +rtl_bench::BenchMark::reflectedCall_withReturn 577 ns 577 ns 1215818 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 580 ns 580 ns 1202552 + + +Run on (16 X 2781.79 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 3.09, 2.47, 1.54 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 495 ns 495 ns 1388676 +rtl_bench::BenchMark::stdFunctionCall_noReturn 497 ns 497 ns 1407687 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 497 ns 497 ns 1416107 +rtl_bench::BenchMark::reflectedCall_noReturn 489 ns 489 ns 1430916 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 501 ns 501 ns 1000000 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 535 ns 535 ns 1304378 +rtl_bench::BenchMark::stdFunctionCall_withReturn 530 ns 530 ns 1301609 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 543 ns 543 ns 1278572 +rtl_bench::BenchMark::reflectedCall_withReturn 556 ns 556 ns 1257309 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 557 ns 557 ns 1251417 + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 757 ns 757 ns 916685 +rtl_bench::BenchMark::stdFunctionCall_noReturn 829 ns 829 ns 842191 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 827 ns 827 ns 845414 +rtl_bench::BenchMark::reflectedCall_noReturn 837 ns 837 ns 835169 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 823 ns 823 ns 852284 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 860 ns 859 ns 815094 +rtl_bench::BenchMark::stdFunctionCall_withReturn 859 ns 858 ns 815626 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 864 ns 864 ns 810770 +rtl_bench::BenchMark::reflectedCall_withReturn 887 ns 886 ns 789280 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 875 ns 875 ns 798536 + + +Run on (16 X 1945.38 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 3.11, 2.54, 1.66 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 758 ns 757 ns 906520 +rtl_bench::BenchMark::stdFunctionCall_noReturn 791 ns 791 ns 880864 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 780 ns 780 ns 900359 +rtl_bench::BenchMark::reflectedCall_noReturn 799 ns 799 ns 875178 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 804 ns 804 ns 873071 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 834 ns 834 ns 843143 +rtl_bench::BenchMark::stdFunctionCall_withReturn 842 ns 842 ns 832123 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 842 ns 842 ns 828542 +rtl_bench::BenchMark::reflectedCall_withReturn 867 ns 867 ns 804433 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 934 ns 933 ns 748890 + + +Run on (16 X 3246.61 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.87, 2.50, 1.66 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 753 ns 753 ns 918702 +rtl_bench::BenchMark::stdFunctionCall_noReturn 785 ns 785 ns 892075 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 780 ns 780 ns 896138 +rtl_bench::BenchMark::reflectedCall_noReturn 799 ns 799 ns 876522 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 788 ns 788 ns 883587 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 836 ns 836 ns 839415 +rtl_bench::BenchMark::stdFunctionCall_withReturn 838 ns 838 ns 832219 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 841 ns 840 ns 830053 +rtl_bench::BenchMark::reflectedCall_withReturn 849 ns 849 ns 823196 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 916 ns 915 ns 754851 + + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 1100 ns 1100 ns 632363 +rtl_bench::BenchMark::stdFunctionCall_noReturn 1054 ns 1054 ns 662974 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 1040 ns 1040 ns 674205 +rtl_bench::BenchMark::reflectedCall_noReturn 1046 ns 1045 ns 670240 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 1070 ns 1070 ns 651628 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 1122 ns 1122 ns 624551 +rtl_bench::BenchMark::stdFunctionCall_withReturn 1133 ns 1132 ns 619889 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 1135 ns 1135 ns 617640 +rtl_bench::BenchMark::reflectedCall_withReturn 1159 ns 1158 ns 602541 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 1156 ns 1156 ns 603317 + + +Run on (16 X 2028.18 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.62, 2.26, 1.67 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 1138 ns 1138 ns 613322 +rtl_bench::BenchMark::stdFunctionCall_noReturn 1101 ns 1101 ns 635065 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 1100 ns 1100 ns 638960 +rtl_bench::BenchMark::reflectedCall_noReturn 1116 ns 1116 ns 626865 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 1116 ns 1116 ns 625500 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 1218 ns 1218 ns 575604 +rtl_bench::BenchMark::stdFunctionCall_withReturn 1210 ns 1210 ns 577096 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 1214 ns 1214 ns 577554 +rtl_bench::BenchMark::reflectedCall_withReturn 1232 ns 1232 ns 567417 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 1256 ns 1256 ns 557420 + + +Run on (16 X 3889.87 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.37, 2.22, 1.66 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 1124 ns 1124 ns 618683 +rtl_bench::BenchMark::stdFunctionCall_noReturn 1087 ns 1087 ns 644721 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 1087 ns 1087 ns 647622 +rtl_bench::BenchMark::reflectedCall_noReturn 1118 ns 1118 ns 626140 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 1077 ns 1077 ns 650312 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 1150 ns 1150 ns 607736 +rtl_bench::BenchMark::stdFunctionCall_withReturn 1150 ns 1149 ns 611164 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 1148 ns 1147 ns 611430 +rtl_bench::BenchMark::reflectedCall_withReturn 1168 ns 1167 ns 599467 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 1210 ns 1209 ns 577476 + + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 1792 ns 1792 ns 389736 +rtl_bench::BenchMark::stdFunctionCall_noReturn 1826 ns 1826 ns 382731 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 1824 ns 1823 ns 384223 +rtl_bench::BenchMark::reflectedCall_noReturn 1843 ns 1842 ns 381120 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 1852 ns 1852 ns 378798 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 1906 ns 1906 ns 367308 +rtl_bench::BenchMark::stdFunctionCall_withReturn 1898 ns 1897 ns 369064 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 1886 ns 1886 ns 371488 +rtl_bench::BenchMark::reflectedCall_withReturn 1914 ns 1914 ns 365682 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 1912 ns 1912 ns 366439 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.51, 2.26, 1.72 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 1790 ns 1789 ns 389620 +rtl_bench::BenchMark::stdFunctionCall_noReturn 1799 ns 1798 ns 389231 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 1813 ns 1813 ns 386364 +rtl_bench::BenchMark::reflectedCall_noReturn 1850 ns 1850 ns 378291 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 1859 ns 1858 ns 376985 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 1915 ns 1915 ns 365091 +rtl_bench::BenchMark::stdFunctionCall_withReturn 1906 ns 1906 ns 367659 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 1909 ns 1908 ns 366869 +rtl_bench::BenchMark::reflectedCall_withReturn 1923 ns 1923 ns 364394 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 1939 ns 1939 ns 360718 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 2.28, 2.22, 1.71 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 1794 ns 1794 ns 388550 +rtl_bench::BenchMark::stdFunctionCall_noReturn 1794 ns 1794 ns 390699 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 1816 ns 1815 ns 385694 +rtl_bench::BenchMark::reflectedCall_noReturn 1850 ns 1850 ns 379327 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 1841 ns 1841 ns 380463 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 1906 ns 1906 ns 366691 +rtl_bench::BenchMark::stdFunctionCall_withReturn 1915 ns 1915 ns 364899 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 1915 ns 1915 ns 365671 +rtl_bench::BenchMark::reflectedCall_withReturn 1918 ns 1918 ns 365007 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 1922 ns 1922 ns 363882 + + + +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 2577 ns 2577 ns 271061 +rtl_bench::BenchMark::stdFunctionCall_noReturn 2593 ns 2593 ns 268859 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 2609 ns 2609 ns 268339 +rtl_bench::BenchMark::reflectedCall_noReturn 2696 ns 2696 ns 260166 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 2695 ns 2695 ns 259237 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 2792 ns 2792 ns 250546 +rtl_bench::BenchMark::stdFunctionCall_withReturn 2786 ns 2785 ns 251093 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 2785 ns 2785 ns 251791 +rtl_bench::BenchMark::reflectedCall_withReturn 2814 ns 2813 ns 248843 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 2780 ns 2779 ns 251869 + + +Run on (16 X 4181.03 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 1.51, 1.36, 1.42 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 2583 ns 2583 ns 270337 +rtl_bench::BenchMark::stdFunctionCall_noReturn 2590 ns 2589 ns 269402 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 2605 ns 2605 ns 268387 +rtl_bench::BenchMark::reflectedCall_noReturn 2671 ns 2671 ns 261357 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 2671 ns 2670 ns 261626 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 2763 ns 2763 ns 253027 +rtl_bench::BenchMark::stdFunctionCall_withReturn 2760 ns 2760 ns 253960 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 2767 ns 2767 ns 253570 +rtl_bench::BenchMark::reflectedCall_withReturn 2793 ns 2792 ns 250558 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 2816 ns 2815 ns 247024 + + +Run on (16 X 800 MHz CPU s) +CPU Caches: + L1 Data 48 KiB (x8) + L1 Instruction 32 KiB (x8) + L2 Unified 1280 KiB (x8) + L3 Unified 20480 KiB (x1) +Load Average: 1.03, 1.26, 1.38 +------------------------------------------------------------------------------------------------- +Benchmark Time CPU Iterations +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_noReturn 2591 ns 2591 ns 270477 +rtl_bench::BenchMark::stdFunctionCall_noReturn 2590 ns 2590 ns 269857 +rtl_bench::BenchMark::stdFunctionMethodCall_noReturn 2607 ns 2606 ns 268289 +rtl_bench::BenchMark::reflectedCall_noReturn 2683 ns 2682 ns 260304 +rtl_bench::BenchMark::reflectedMethodCall_noReturn 2710 ns 2709 ns 258250 +------------------------------------------------------------------------------------------------- +rtl_bench::BenchMark::directCall_withReturn 2800 ns 2800 ns 248906 +rtl_bench::BenchMark::stdFunctionCall_withReturn 2795 ns 2794 ns 250415 +rtl_bench::BenchMark::stdFunctionMethodCall_withReturn 2797 ns 2797 ns 249372 +rtl_bench::BenchMark::reflectedCall_withReturn 2804 ns 2803 ns 249544 +rtl_bench::BenchMark::reflectedMethodCall_withReturn 2813 ns 2812 ns 248149 \ No newline at end of file diff --git a/MyReflection.json b/MyReflection.json deleted file mode 100644 index 597d75c2..00000000 --- a/MyReflection.json +++ /dev/null @@ -1 +0,0 @@ -[{"function": "getMagnitude","namespace": "complex","functorId": [{"containerId": "35","index": "8","returnId": "46","hash_code": "358046","signature": "d (std::nullptr_t)"}]},{"function": "setImaginary","namespace": "complex","functorId": [{"containerId": "45","index": "1","returnId": "17","hash_code": "451017","signature": "void (d)"}]},{"function": "setReal","namespace": "complex","functorId": [{"containerId": "45","index": "0","returnId": "17","hash_code": "450017","signature": "void (d)"}]},{"function": "getComplexNumAsString","functorId": [{"containerId": "35","index": "7","returnId": "3","hash_code": "35703","signature": "std::string (std::nullptr_t)"}]},{"function": "reverseString","functorId": [{"containerId": "35","index": "6","returnId": "3","hash_code": "35603","signature": "std::string (std::nullptr_t)"}, {"containerId": "44","index": "0","returnId": "3","hash_code": "44003","signature": "std::string (std::string)"}, {"containerId": "36","index": "1","returnId": "3","hash_code": "36103","signature": "std::string (PKc)"}]},{"method": "reset","namespace": "nsdate","record": "Event","functorId": [{"containerId": "22","index": "2","recordId": "15","returnId": "17","hash_code": "2221517","signature": "void N6nsdate5EventE::(std::nullptr_t)"}]},{"method": "Event::Event()","namespace": "nsdate","record": "Event","functorId": [{"containerId": "18","index": "1","recordId": "15","returnId": "15","hash_code": "1811515","signature": "N6nsdate5EventE::(N3rtl5allocE)"}]},{"method": "getTheDate","namespace": "nsdate","record": "Calender","functorId": [{"containerId": "22","index": "6","recordId": "16","returnId": "14","hash_code": "2261614","signature": "N6nsdate4DateE N6nsdate8CalenderE::(std::nullptr_t)"}]},{"method": "getSavedDate","namespace": "nsdate","record": "Calender","functorId": [{"containerId": "22","index": "8","recordId": "16","returnId": "14","hash_code": "2281614","signature": "N6nsdate4DateE N6nsdate8CalenderE::(std::nullptr_t)"}]},{"method": "getTheEvent","namespace": "nsdate","record": "Calender","functorId": [{"containerId": "22","index": "5","recordId": "16","returnId": "15","hash_code": "2251615","signature": "N6nsdate5EventE N6nsdate8CalenderE::(std::nullptr_t)"}]},{"method": "getSavedEvent","namespace": "nsdate","record": "Calender","functorId": [{"containerId": "22","index": "7","recordId": "16","returnId": "15","hash_code": "2271615","signature": "N6nsdate5EventE N6nsdate8CalenderE::(std::nullptr_t)"}]},{"method": "create","namespace": "nsdate","record": "Calender","functorId": [{"containerId": "35","index": "4","recordId": "16","returnId": "16","hash_code": "3541616","signature": "N6nsdate8CalenderE (std::nullptr_t)"}]},{"method": "Calender::Calender()","namespace": "nsdate","record": "Calender","functorId": [{"containerId": "18","index": "8","recordId": "16","returnId": "16","hash_code": "1881616","signature": "N6nsdate8CalenderE::(N3rtl5allocE)"}]},{"method": "getAsString","namespace": "nsdate","record": "Date","functorId": [{"containerId": "28","index": "0","recordId": "14","returnId": "3","hash_code": "280143","signature": "std::string N6nsdate4DateE::(std::nullptr_t) const"}]},{"method": "updateDate","namespace": "nsdate","record": "Date","functorId": [{"containerId": "20","index": "3","recordId": "14","returnId": "17","hash_code": "2031417","signature": "void N6nsdate4DateE::(std::string)"}]},{"method": "Date::Date()","namespace": "nsdate","record": "Date","functorId": [{"containerId": "18","index": "2","recordId": "14","returnId": "14","hash_code": "1821414","signature": "N6nsdate4DateE::(N3rtl5allocE)"}, {"containerId": "25","index": "0","recordId": "14","returnId": "14","hash_code": "2501414","signature": "N6nsdate4DateE::(N3rtl5allocE, std::string)"}, {"containerId": "26","index": "0","recordId": "14","returnId": "14","hash_code": "2601414","signature": "N6nsdate4DateE::(N3rtl5allocE, j, j, j)"}]},{"method": "empty","namespace": "std","record": "string","functorId": [{"containerId": "28","index": "5","recordId": "3","returnId": "9","hash_code": "28539","signature": "b std::string::(std::nullptr_t) const"}]},{"method": "string::string()","namespace": "std","record": "string","functorId": [{"containerId": "18","index": "11","recordId": "3","returnId": "3","hash_code": "181133","signature": "std::string::(N3rtl5allocE)"}]},{"method": "empty","namespace": "std","record": "string_view","functorId": [{"containerId": "28","index": "6","recordId": "2","returnId": "9","hash_code": "28629","signature": "b St17basic_string_viewIcSt11char_traitsIcEE::(std::nullptr_t) const"}]},{"method": "string_view::string_view()","namespace": "std","record": "string_view","functorId": [{"containerId": "18","index": "12","recordId": "2","returnId": "2","hash_code": "181222","signature": "St17basic_string_viewIcSt11char_traitsIcEE::(N3rtl5allocE)"}]},{"method": "getProfile","record": "Person","functorId": [{"containerId": "35","index": "3","recordId": "11","returnId": "3","hash_code": "353113","signature": "std::string (std::nullptr_t)"}, {"containerId": "39","index": "0","recordId": "11","returnId": "3","hash_code": "390113","signature": "std::string (b)"}, {"containerId": "41","index": "0","recordId": "11","returnId": "3","hash_code": "410113","signature": "std::string (std::string, m)"}]},{"method": "createConst","record": "Person","functorId": [{"containerId": "35","index": "2","recordId": "11","returnId": "11","hash_code": "3521111","signature": "6Person (std::nullptr_t)"}]},{"method": "getDefaults","record": "Person","functorId": [{"containerId": "35","index": "1","recordId": "11","returnId": "3","hash_code": "351113","signature": "std::string (std::nullptr_t)"}]},{"method": "updateLastName","record": "Person","functorId": [{"containerId": "37","index": "0","recordId": "11","returnId": "17","hash_code": "3701117","signature": "void 6Person::(std::string) const"}]},{"method": "getFirstName","record": "Person","functorId": [{"containerId": "22","index": "4","recordId": "11","returnId": "3","hash_code": "224113","signature": "std::string 6Person::(std::nullptr_t)"}]},{"method": "updateAddress","record": "Person","functorId": [{"containerId": "22","index": "3","recordId": "11","returnId": "17","hash_code": "2231117","signature": "void 6Person::(std::nullptr_t)"}, {"containerId": "20","index": "5","recordId": "11","returnId": "17","hash_code": "2051117","signature": "void 6Person::(std::string)"}, {"containerId": "28","index": "2","recordId": "11","returnId": "17","hash_code": "2821117","signature": "void 6Person::(std::nullptr_t) const"}, {"containerId": "37","index": "1","recordId": "11","returnId": "17","hash_code": "3711117","signature": "void 6Person::(std::string) const"}]},{"method": "createPtr","record": "Person","functorId": [{"containerId": "35","index": "0","recordId": "11","returnId": "11","hash_code": "3501111","signature": "PK6Person (std::nullptr_t)"}]},{"method": "Person::Person()","record": "Person","functorId": [{"containerId": "18","index": "4","recordId": "11","returnId": "11","hash_code": "1841111","signature": "6Person::(N3rtl5allocE)"}, {"containerId": "25","index": "2","recordId": "11","returnId": "11","hash_code": "2521111","signature": "6Person::(N3rtl5allocE, std::string)"}]},{"method": "updateBookInfo","record": "Book","functorId": [{"containerId": "22","index": "1","recordId": "10","returnId": "17","hash_code": "2211017","signature": "void 4Book::(std::nullptr_t)"}, {"containerId": "23","index": "0","recordId": "10","returnId": "17","hash_code": "2301017","signature": "void 4Book::(PKc, d, std::string)"}, {"containerId": "24","index": "0","recordId": "10","returnId": "17","hash_code": "2401017","signature": "void 4Book::(std::string, d, PKc)"}]},{"method": "addCopyrightTag","record": "Book","functorId": [{"containerId": "20","index": "2","recordId": "10","returnId": "17","hash_code": "2021017","signature": "void 4Book::(std::string)"}]},{"method": "getPublishedOn","record": "Book","functorId": [{"containerId": "22","index": "0","recordId": "10","returnId": "3","hash_code": "220103","signature": "std::string 4Book::(std::nullptr_t)"}]},{"method": "setAuthor","record": "Book","functorId": [{"containerId": "20","index": "0","recordId": "10","returnId": "17","hash_code": "2001017","signature": "void 4Book::(std::string)"}]},{"method": "setDescription","record": "Book","functorId": [{"containerId": "20","index": "1","recordId": "10","returnId": "17","hash_code": "2011017","signature": "void 4Book::(std::string)"}]},{"method": "addPreface","record": "Book","functorId": [{"containerId": "21","index": "0","recordId": "10","returnId": "17","hash_code": "2101017","signature": "void 4Book::(std::string, const std::string&)"}]},{"method": "Book::Book()","record": "Book","functorId": [{"containerId": "18","index": "0","recordId": "10","returnId": "10","hash_code": "1801010","signature": "4Book::(N3rtl5allocE)"}, {"containerId": "19","index": "0","recordId": "10","returnId": "10","hash_code": "1901010","signature": "4Book::(N3rtl5allocE, d, std::string)"}]},{"method": "getBookByTitle","record": "Library","functorId": [{"containerId": "30","index": "1","recordId": "13","returnId": "10","hash_code": "3011310","signature": "4Book (const std::string&)"}]},{"method": "addBook","record": "Library","functorId": [{"containerId": "40","index": "0","recordId": "13","returnId": "17","hash_code": "4001317","signature": "void (4Book)"}]},{"method": "Library::Library()","record": "Library","functorId": [{"containerId": "18","index": "7","recordId": "13","returnId": "13","hash_code": "1871313","signature": "7Library::(N3rtl5allocE)"}]},{"method": "setAnimalName","record": "Animal","functorId": [{"containerId": "29","index": "0","recordId": "12","returnId": "17","hash_code": "2901217","signature": "void 6Animal::(const std::string&)"}, {"containerId": "31","index": "0","recordId": "12","returnId": "17","hash_code": "3101217","signature": "void 6Animal::(std::string&)"}, {"containerId": "32","index": "0","recordId": "12","returnId": "17","hash_code": "3201217","signature": "void 6Animal::(const std::string&&)"}]},{"method": "getFamilyName","record": "Animal","functorId": [{"containerId": "28","index": "1","recordId": "12","returnId": "3","hash_code": "281123","signature": "std::string 6Animal::(std::nullptr_t) const"}]},{"method": "updateZooKeeper","record": "Animal","functorId": [{"containerId": "30","index": "0","recordId": "12","returnId": "3","hash_code": "300123","signature": "std::string (const std::string&)"}, {"containerId": "33","index": "0","recordId": "12","returnId": "3","hash_code": "330123","signature": "std::string (std::string&)"}, {"containerId": "34","index": "0","recordId": "12","returnId": "3","hash_code": "340123","signature": "std::string (const std::string&&)"}]},{"method": "setFamilyName","record": "Animal","functorId": [{"containerId": "20","index": "4","recordId": "12","returnId": "17","hash_code": "2041217","signature": "void 6Animal::(std::string)"}]},{"method": "Animal::Animal()","record": "Animal","functorId": [{"containerId": "18","index": "3","recordId": "12","returnId": "12","hash_code": "1831212","signature": "6Animal::(N3rtl5allocE)"}, {"containerId": "25","index": "1","recordId": "12","returnId": "12","hash_code": "2511212","signature": "6Animal::(N3rtl5allocE, std::string)"}]},{"method": "char::char()","record": "char","functorId": [{"containerId": "18","index": "6","recordId": "1","returnId": "1","hash_code": "18611","signature": "c::(N3rtl5allocE)"}]},{"method": "void::void()","record": "void","functorId": [{"containerId": "18","index": "5","recordId": "17","returnId": "17","hash_code": "1851717","signature": "void::(N3rtl5allocE)"}]}] \ No newline at end of file diff --git a/RTLBenchmarkApp/src/BenchMark.h b/RTLBenchmarkApp/src/BenchMark.h index 31b14437..2959aef8 100644 --- a/RTLBenchmarkApp/src/BenchMark.h +++ b/RTLBenchmarkApp/src/BenchMark.h @@ -15,30 +15,46 @@ using argStr_t = std::string_view; using retStr_t = std::string_view; -#define WORK_LOAD(S) (std::string(S) + std::string(S) + std::string(S) + std::string(S)) +#define WORK_LOAD(S) (std::string(S) + std::string(S)) + namespace rtl_bench { static std::optional g_msg; - NOINLINE static void sendMessage(argStr_t pMsg) { - g_msg = WORK_LOAD(pMsg); + NOINLINE static void sendMessage(argStr_t pMsg) + { + std::string str = WORK_LOAD(pMsg); + volatile auto* p = &str; + static_cast(p); + g_msg = str; } - NOINLINE static retStr_t getMessage(argStr_t pMsg) { - g_msg = WORK_LOAD(pMsg); + NOINLINE static retStr_t getMessage(argStr_t pMsg) + { + std::string str = WORK_LOAD(pMsg); + volatile auto* p = &str; + static_cast(p); + g_msg = str; return retStr_t(g_msg->c_str()); } struct Node { - NOINLINE void sendMessage(argStr_t pMsg) { - g_msg = WORK_LOAD(pMsg); + NOINLINE void sendMessage(argStr_t pMsg) + { + std::string str = WORK_LOAD(pMsg); + volatile auto* p = &str; + static_cast(p); + g_msg = str; } NOINLINE retStr_t getMessage(argStr_t pMsg) { - g_msg = WORK_LOAD(pMsg); + std::string str = WORK_LOAD(pMsg); + volatile auto* p = &str; + static_cast(p); + g_msg = str; return retStr_t(g_msg->c_str()); } }; @@ -64,7 +80,7 @@ namespace rtl_bench struct BenchMark { - static void directCall_noReturn(benchmark::State& state); + static void directCall_noReturn(benchmark::State& state); static void stdFunctionCall_noReturn(benchmark::State& state); @@ -83,5 +99,5 @@ namespace rtl_bench static void reflectedCall_withReturn(benchmark::State& state); static void reflectedMethodCall_withReturn(benchmark::State& state); - }; -} \ No newline at end of file + }; +} diff --git a/RTLBenchmarkApp/src/main.cpp b/RTLBenchmarkApp/src/main.cpp index dc55ee28..ecee3445 100644 --- a/RTLBenchmarkApp/src/main.cpp +++ b/RTLBenchmarkApp/src/main.cpp @@ -17,4 +17,4 @@ BENCHMARK(rtl_bench::BenchMark::stdFunctionMethodCall_withReturn); BENCHMARK(rtl_bench::BenchMark::reflectedCall_withReturn); BENCHMARK(rtl_bench::BenchMark::reflectedMethodCall_withReturn); -BENCHMARK_MAIN(); +BENCHMARK_MAIN(); \ No newline at end of file