|
3-phase PV router
|
Performance benchmarks for FastDivision. More...
#include <Arduino.h>#include <unity.h>#include "../bench_report.h"#include "../bench_timer.h"#include "../halt_after_tests.h"#include "FastDivision.h"#include "FastDivision.cpp"
Go to the source code of this file.
Functions | |
| void | loop () |
| void | reportBenchmark (const char *name, uint32_t fastTime, uint32_t stdTime) |
| Reports benchmark results to Serial. | |
| void | setUp (void) |
| void | setup () |
| void | tearDown (void) |
| void | test_perf_cycle_estimation (void) |
| void | test_perf_divmod10_large_values (void) |
| void | test_perf_divmod10_small_values (void) |
| void | test_perf_divu10_large_values (void) |
| void | test_perf_divu10_medium_values (void) |
| void | test_perf_divu10_small_values (void) |
| void | test_perf_summary (void) |
Variables | |
| constexpr uint32_t | ITERATIONS = 10000UL |
| volatile uint16_t | v_result16 |
| volatile uint32_t | v_result32 |
| volatile uint8_t | v_result8 |
Performance benchmarks for FastDivision.
Measures execution time of AVR assembly fast division functions compared to standard C division operators.
Runs in CI in the simavr simulator (uno_sim environment): simavr is cycle-accurate, so the timings are exact and the same from run to run. On a connected board: pio test -e uno -f "*test_fastdivision_perf*"
Every result is also printed as a BENCH line (bench_report.h), for the CI benchmark history.
Definition in file test_main.cpp.
| void loop | ( | ) |
| void reportBenchmark | ( | const char * | name, |
| uint32_t | fastTime, | ||
| uint32_t | stdTime ) |
Reports benchmark results to Serial.
Definition at line 49 of file test_main.cpp.


| void setUp | ( | void | ) |
Definition at line 34 of file test_main.cpp.
| void setup | ( | ) |
Definition at line 315 of file test_main.cpp.
| void tearDown | ( | void | ) |
Definition at line 38 of file test_main.cpp.
| void test_perf_cycle_estimation | ( | void | ) |
Definition at line 241 of file test_main.cpp.


| void test_perf_divmod10_large_values | ( | void | ) |
Definition at line 202 of file test_main.cpp.


| void test_perf_divmod10_small_values | ( | void | ) |
Definition at line 167 of file test_main.cpp.


| void test_perf_divu10_large_values | ( | void | ) |
Definition at line 133 of file test_main.cpp.


| void test_perf_divu10_medium_values | ( | void | ) |
Definition at line 103 of file test_main.cpp.


| void test_perf_divu10_small_values | ( | void | ) |
Definition at line 72 of file test_main.cpp.


| void test_perf_summary | ( | void | ) |
|
constexpr |
Definition at line 27 of file test_main.cpp.
| volatile uint16_t v_result16 |
Definition at line 30 of file test_main.cpp.
| volatile uint32_t v_result32 |
Definition at line 31 of file test_main.cpp.
| volatile uint8_t v_result8 |
Definition at line 32 of file test_main.cpp.