From e57ceaac907c4c04242028fc7068cdcdbbe48657 Mon Sep 17 00:00:00 2001 From: Byeongjee Kang Date: Sat, 22 Aug 2026 12:32:13 -0400 Subject: [PATCH 1/2] Replace stringsearch with stringsearch_fixed in benchmarks and results --- benchmarks/intermittent/stringsearch.c | 15 +- benchmarks/intermittent/stringsearch_fixed.c | 152 ------------------ results/chunking_overhead/chunked.csv | 2 +- results/intermittent/baseline.csv | 2 +- results/intermittent/baseline_results.py | 2 +- results/intermittent/report.md | 24 +-- results/intermittent/run_all.sh | 2 +- results/intermittent/stringsearch/milp.csv | 11 ++ .../intermittent/stringsearch/rockclimb.csv | 11 ++ .../intermittent/stringsearch/schematic.csv | 11 ++ .../intermittent/stringsearch/schematicO3.csv | 11 ++ .../intermittent/stringsearch_fixed/milp.csv | 11 -- .../stringsearch_fixed/rockclimb.csv | 11 -- .../stringsearch_fixed/schematic.csv | 11 -- .../stringsearch_fixed/schematicO3.csv | 11 -- results/intermittent/summarize.py | 2 +- results/intermittent/summary.csv | 80 ++++----- results/milp.csv | 6 +- results/milp_debug.csv | 6 +- results/rockclimb.csv | 6 +- results/rockclimb_debug.csv | 6 +- results/schematic.csv | 6 +- results/schematicO3.csv | 6 +- results/schematicO3_debug.csv | 6 +- results/schematic_debug.csv | 6 +- results/uninstrumented.csv | 2 +- 26 files changed, 135 insertions(+), 284 deletions(-) delete mode 100644 benchmarks/intermittent/stringsearch_fixed.c create mode 100644 results/intermittent/stringsearch/milp.csv create mode 100644 results/intermittent/stringsearch/rockclimb.csv create mode 100644 results/intermittent/stringsearch/schematic.csv create mode 100644 results/intermittent/stringsearch/schematicO3.csv delete mode 100644 results/intermittent/stringsearch_fixed/milp.csv delete mode 100644 results/intermittent/stringsearch_fixed/rockclimb.csv delete mode 100644 results/intermittent/stringsearch_fixed/schematic.csv delete mode 100644 results/intermittent/stringsearch_fixed/schematicO3.csv diff --git a/benchmarks/intermittent/stringsearch.c b/benchmarks/intermittent/stringsearch.c index aad1e5af..0a3b8ee8 100644 --- a/benchmarks/intermittent/stringsearch.c +++ b/benchmarks/intermittent/stringsearch.c @@ -13,16 +13,20 @@ // --- Configuration --- #define NUM_PATTERNS 26 #define TEXT_LEN 512 +#define MAX_PATTERN_LEN 12 // --- Mutable globals (MILP candidates) --- static uint32_t table[256] __attribute__((used, section(".fram"))); static uint32_t len __attribute__((used, section(".fram"))); -static char *findme __attribute__((used, section(".fram"))); +static uint32_t findme_idx __attribute__((used, section(".fram"))); // --- Const data --- -static const char *find_strings[NUM_PATTERNS] = { +/* Stored as a 2-D char array rather than an array of pointers: a pointer array + * in memory has a target-dependent element stride, which breaks the native + * (64-bit) trace replay of IR that was optimized for MSP430's 16-bit pointers. */ +static const char find_strings[NUM_PATTERNS][MAX_PATTERN_LEN] = { "Kur", "gent", "lass", "suns", "for", "xxx", "long", "have", "where", "xxxxxx", "xxxxxx", "pense", "pow", "xxxxx", "Yo", "and", "faded", "20", "you", "bac", "an", "way", "possibili", "fat", "imag", "th"}; @@ -63,8 +67,6 @@ FORCE_INLINE void init_search(const char *pattern) { __loop_tripcount(16); table[(unsigned char)pattern[i]] = len - i - 1; } - - findme = (char *)pattern; } FORCE_INLINE const char *strsearch(const char *pattern, const char *text) { @@ -92,7 +94,7 @@ FORCE_INLINE const char *strsearch(const char *pattern, const char *text) { if (shift == 0) { // Check for match const char *here = &text[pos - len + 1]; - const char *a = findme; + const char *a = find_strings[findme_idx]; const char *b = here; uint32_t matched = 1; uint32_t j; @@ -122,7 +124,8 @@ __attribute__((noinline)) int main(void) { for (i = 0; i < NUM_PATTERNS; i++) { __loop_tripcount(NUM_PATTERNS); - findme = (char *)find_strings[i]; + findme_idx = (uint32_t)i; + const char *findme = find_strings[findme_idx]; // Compute pattern length manually (no strlen) len = 0; diff --git a/benchmarks/intermittent/stringsearch_fixed.c b/benchmarks/intermittent/stringsearch_fixed.c deleted file mode 100644 index 97bc1b25..00000000 --- a/benchmarks/intermittent/stringsearch_fixed.c +++ /dev/null @@ -1,152 +0,0 @@ -/* -** Pratt-Boyer-Moore string search benchmark. -** Preprocessed for intermittent computing checkpoint insertion. -** Original by Jerry Coffin (1991), Public Domain. -** -** Variant of stringsearch.c that compiles under MILP and SCHEMATIC; see the -** comment on find_strings for what differs and why. Finds the same 20 matches -** as stringsearch.c. -*/ - -#include "benchmark.h" -#include "loop_tripcount.h" -#include - -#define FORCE_INLINE static inline __attribute__((always_inline)) - -// --- Configuration --- -#define NUM_PATTERNS 26 -#define TEXT_LEN 512 -#define MAX_PATTERN_LEN 12 - -// --- Mutable globals (MILP candidates) --- - -static uint32_t table[256] __attribute__((used, section(".fram"))); -static uint32_t len __attribute__((used, section(".fram"))); -static uint32_t findme_idx __attribute__((used, section(".fram"))); - -// --- Const data --- - -/* Stored as a 2-D char array rather than an array of pointers: a pointer array - * in memory has a target-dependent element stride, which breaks the native - * (64-bit) trace replay of IR that was optimized for MSP430's 16-bit pointers. */ -static const char find_strings[NUM_PATTERNS][MAX_PATTERN_LEN] = { - "Kur", "gent", "lass", "suns", "for", "xxx", "long", "have", "where", - "xxxxxx", "xxxxxx", "pense", "pow", "xxxxx", "Yo", "and", "faded", "20", - "you", "bac", "an", "way", "possibili", "fat", "imag", "th"}; - -static const char search_text[] = "KurtVonnegutsCommencementAddressatMITLadiesandgentlemen" - "oftheclassof97WearsunscreenIfIcouldofferyouonlyonetip" - "forthefuturesunscreenwouldbeitThelongtermbenefitsof" - "sunscreenhavebeenprovedbyscientistswhereastherestof" - "myadvicehasnobasismorereliablethanmyownmeandering" - "experienceIwilldispensethisadvicenowEnjoythepowerand" - "beautyofyouryouthOhnevermindYouwillnotunderstandthe" - "powerandbeautyofyouryouthuntiltheyvefadedButtrustme" - "in20yearsyoulllookbackatphotosofyourselfandrecallin" - "awayyoucantgraspnowhowmuchpossibilitylaybefore"; - -// --- Helper functions --- - -FORCE_INLINE void init_search(const char *pattern) { - uint32_t i; - - // Compute pattern length - len = 0; - const char *p = pattern; - while (*p) { - __loop_tripcount(16); - len++; - p++; - } - - // Fill table with default skip distance - for (i = 0; i < 256; i++) { - __loop_tripcount(256); - table[i] = len; - } - - // Set skip distances for pattern characters - for (i = 0; i < len; i++) { - __loop_tripcount(16); - table[(unsigned char)pattern[i]] = len - i - 1; - } -} - -FORCE_INLINE const char *strsearch(const char *pattern, const char *text) { - uint32_t shift = 0; - uint32_t pos = len - 1; - uint32_t limit = 0; - - // Compute text length - const char *tp = text; - while (*tp) { - __loop_tripcount(TEXT_LEN); - limit++; - tp++; - } - - while (pos < limit) { - __loop_tripcount(TEXT_LEN); - - // Skip loop: advance by table lookup - while (pos < limit && (shift = table[(unsigned char)text[pos]]) > 0) { - __loop_tripcount(TEXT_LEN); - pos += shift; - } - - if (shift == 0) { - // Check for match - const char *here = &text[pos - len + 1]; - const char *a = find_strings[findme_idx]; - const char *b = here; - uint32_t matched = 1; - uint32_t j; - for (j = 0; j < len; j++) { - __loop_tripcount(16); - if (a[j] != b[j]) { - matched = 0; - break; - } - } - if (matched) { - return here; - } else { - pos++; - } - } - } - return (const char *)0; -} - -// --- Main --- - -__attribute__((noinline)) int main(void) { - BENCH_INIT(); - volatile int total_found = 0; - int i; - - for (i = 0; i < NUM_PATTERNS; i++) { - __loop_tripcount(NUM_PATTERNS); - findme_idx = (uint32_t)i; - const char *findme = find_strings[findme_idx]; - - // Compute pattern length manually (no strlen) - len = 0; - const char *p = findme; - while (*p) { - __loop_tripcount(16); - len++; - p++; - } - - init_search(findme); - const char *result = strsearch(findme, search_text); - if (result) { - total_found++; - } - } - - BENCH_EXIT(total_found); - return total_found; -} diff --git a/results/chunking_overhead/chunked.csv b/results/chunking_overhead/chunked.csv index 351cd375..a51e821d 100644 --- a/results/chunking_overhead/chunked.csv +++ b/results/chunking_overhead/chunked.csv @@ -11,4 +11,4 @@ sensor_fusion,10uF,ok,859,25121.86,1 poly1305,10uF,ok,923,475356.64,1 cuckoo_filter,10uF,ok,761,41320.7,1 sha256,10uF,ok,1388,90038.68,1 -stringsearch_fixed,10uF,ok,1236,35354.39,1 +stringsearch,10uF,ok,1236,35354.39,1 diff --git a/results/intermittent/baseline.csv b/results/intermittent/baseline.csv index ebf49fb7..e39b5e63 100644 --- a/results/intermittent/baseline.csv +++ b/results/intermittent/baseline.csv @@ -11,4 +11,4 @@ sensor_fusion,613, poly1305,68, cuckoo_filter,4048, sha256_fixed,131, -stringsearch_fixed,20, +stringsearch,20, diff --git a/results/intermittent/baseline_results.py b/results/intermittent/baseline_results.py index b9a751d3..5384a2fa 100644 --- a/results/intermittent/baseline_results.py +++ b/results/intermittent/baseline_results.py @@ -29,7 +29,7 @@ "poly1305", "cuckoo_filter", "sha256_fixed", - "stringsearch_fixed", + "stringsearch", ] setup_logging("INFO") diff --git a/results/intermittent/report.md b/results/intermittent/report.md index 6b4aabe9..9986cae0 100644 --- a/results/intermittent/report.md +++ b/results/intermittent/report.md @@ -29,7 +29,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 (68) | 10/10 / 10/10 / 1366 / 81 / 22.26 | 10/10 / 10/10 / 4409 / 172 / 61.56 | 10/10 / 10/10 / 2949 / 142 / 44.93 | 10/10 / 10/10 / 2089 / 105 / 32.94 | | cuckoo_filter (4048) | 10/10 / 10/10 / 169 / 3 / 1.69 | 10/10 / 10/10 / 1902 / 71 / 26.46 | 10/10 / 10/10 / 1018 / 49 / 15.46 | 10/10 / 10/10 / 178 / 3 / 1.80 | | sha256_fixed (131) | 10/10 / 10/10 / 184 / 9 / 2.44 | 10/10 / 10/10 / 1098 / 35 / 14.31 | 10/10 / 10/10 / 425 / 13 / 5.63 | 10/10 / 10/10 / 346 / 15 / 4.86 | -| stringsearch_fixed (20) | 10/10 / 10/10 / 208 / 2 / 1.98 | 9/10 / 9/9 / 7991 / 360 / 118.34 | 10/10 / 10/10 / 600 / 19 / 7.63 | 10/10 / 10/10 / 232 / 5 / 2.45 | +| stringsearch (20) | 10/10 / 10/10 / 208 / 2 / 1.98 | 9/10 / 9/9 / 7991 / 360 / 118.34 | 10/10 / 10/10 / 600 / 19 / 7.63 | 10/10 / 10/10 / 232 / 5 / 2.45 | ## Per trace: waits by benchmark x algorithm (`inc` = incomplete) @@ -49,7 +49,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 132 | 322 | 275 | 185 | | cuckoo_filter | 14 | 131 | 88 | 14 | | sha256_fixed | 18 | 76 | 37 | 34 | -| stringsearch_fixed | 15 | 609 | 46 | 17 | +| stringsearch | 15 | 609 | 46 | 17 | ### trace 2 @@ -67,7 +67,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 131 | 409 | 279 | 193 | | cuckoo_filter | 15 | 175 | 95 | 17 | | sha256_fixed | 18 | 96 | 41 | 33 | -| stringsearch_fixed | 21 | 813 | 59 | 21 | +| stringsearch | 21 | 813 | 59 | 21 | ### trace 3 @@ -85,7 +85,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 129 | 666 | 341 | 243 | | cuckoo_filter | 20 | 304 | 121 | 21 | | sha256_fixed | 17 | 181 | 56 | 33 | -| stringsearch_fixed | 25 | 1513 | 84 | 29 | +| stringsearch | 25 | 1513 | 84 | 29 | ### trace 4 @@ -103,7 +103,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 137 | 525 | 285 | 185 | | cuckoo_filter | 18 | 224 | 105 | 18 | | sha256_fixed | 19 | 138 | 42 | 34 | -| stringsearch_fixed | 25 | inc | 63 | 29 | +| stringsearch | 25 | inc | 63 | 29 | ### trace 5 @@ -121,7 +121,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 138 | 402 | 288 | 215 | | cuckoo_filter | 18 | 175 | 101 | 21 | | sha256_fixed | 19 | 102 | 43 | 35 | -| stringsearch_fixed | 22 | 849 | 61 | 23 | +| stringsearch | 22 | 849 | 61 | 23 | ### trace 6 @@ -139,7 +139,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 131 | 383 | 273 | 203 | | cuckoo_filter | 17 | 161 | 98 | 17 | | sha256_fixed | 17 | 91 | 34 | 33 | -| stringsearch_fixed | 19 | 761 | 54 | 22 | +| stringsearch | 19 | 761 | 54 | 22 | ### trace 7 @@ -157,7 +157,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 128 | 391 | 273 | 190 | | cuckoo_filter | 16 | 177 | 94 | 17 | | sha256_fixed | 17 | 99 | 41 | 33 | -| stringsearch_fixed | 21 | 795 | 56 | 21 | +| stringsearch | 21 | 795 | 56 | 21 | ### trace 8 @@ -175,7 +175,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 148 | 559 | 323 | 252 | | cuckoo_filter | 20 | 247 | 117 | 21 | | sha256_fixed | 20 | 136 | 49 | 37 | -| stringsearch_fixed | 26 | 1182 | 74 | 28 | +| stringsearch | 26 | 1182 | 74 | 28 | ### trace 9 @@ -193,7 +193,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 137 | 365 | 298 | 204 | | cuckoo_filter | 18 | 151 | 97 | 18 | | sha256_fixed | 19 | 89 | 38 | 35 | -| stringsearch_fixed | 19 | 728 | 51 | 20 | +| stringsearch | 19 | 728 | 51 | 20 | ### trace 10 @@ -211,7 +211,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | poly1305 | 155 | 387 | 314 | 219 | | cuckoo_filter | 13 | 157 | 102 | 14 | | sha256_fixed | 20 | 90 | 44 | 39 | -| stringsearch_fixed | 15 | 741 | 52 | 22 | +| stringsearch | 15 | 741 | 52 | 22 | ## Per benchmark x algorithm x trace @@ -323,7 +323,7 @@ Cell: `ok` = completed (stop pulse + __nvm_done) and return code equals the unin | schematic | ok w=37 rec=1 t=2.58s | ok w=41 rec=0 t=1.86s | ok w=56 rec=0 t=1.05s | ok w=42 rec=0 t=11.13s | ok w=43 rec=2 t=8.08s | ok w=34 rec=0 t=1.65s | ok w=41 rec=0 t=6.56s | ok w=49 rec=4 t=6.99s | ok w=38 rec=0 t=8.42s | ok w=44 rec=6 t=7.95s | | schematicO3 | ok w=34 rec=1 t=2.53s | ok w=33 rec=0 t=1.62s | ok w=33 rec=0 t=0.67s | ok w=34 rec=1 t=8.67s | ok w=35 rec=2 t=6.27s | ok w=33 rec=0 t=1.61s | ok w=33 rec=0 t=5.52s | ok w=37 rec=3 t=5.51s | ok w=35 rec=2 t=8.33s | ok w=39 rec=6 t=7.91s | -### stringsearch_fixed (baseline result 20) +### stringsearch (baseline result 20) | algo | tr1 | tr2 | tr3 | tr4 | tr5 | tr6 | tr7 | tr8 | tr9 | tr10 | |---|---|---|---|---|---|---|---|---|---|---| diff --git a/results/intermittent/run_all.sh b/results/intermittent/run_all.sh index 647a8e3d..050bae5e 100755 --- a/results/intermittent/run_all.sh +++ b/results/intermittent/run_all.sh @@ -3,7 +3,7 @@ # traces. Resumable: a (benchmark, algo) CSV with one row per trace is skipped; # a partial one (interrupted run) is deleted and redone. cd "$(dirname "$0")/../.." || exit 1 -BENCHMARKS="aes crc rsa dijkstra qsort activity_recognition bitcount chacha20 sensor_fusion poly1305 cuckoo_filter sha256_fixed stringsearch_fixed" +BENCHMARKS="aes crc rsa dijkstra qsort activity_recognition bitcount chacha20 sensor_fusion poly1305 cuckoo_filter sha256_fixed stringsearch" ALGOS="milp rockclimb schematic schematicO3" TRACES=1,2,3,4,5,6,7,8,9,10 NTRACES=10 diff --git a/results/intermittent/stringsearch/milp.csv b/results/intermittent/stringsearch/milp.csv new file mode 100644 index 00000000..6a82e851 --- /dev/null +++ b/results/intermittent/stringsearch/milp.csv @@ -0,0 +1,11 @@ +benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result +stringsearch,board,1,ok,5,317,667,2.28,195335.25,,15,0,20 +stringsearch,board,2,ok,5,317,667,3.23,705316.37,,21,0,20 +stringsearch,board,3,ok,5,317,667,4.15,306573.92,,25,0,20 +stringsearch,board,4,ok,5,317,667,7.77,5238685.13,,25,0,20 +stringsearch,board,5,ok,5,317,667,5.65,3164907.24,,22,1,20 +stringsearch,board,6,ok,5,317,667,2.97,1111396.51,,19,0,20 +stringsearch,board,7,ok,5,317,667,4.71,3070378.24,,21,0,20 +stringsearch,board,8,ok,5,317,667,5.07,2388693.79,,26,1,20 +stringsearch,board,9,ok,5,317,667,6.12,3381397.35,,19,0,20 +stringsearch,board,10,ok,5,317,667,1.95,195066.87,,15,0,20 diff --git a/results/intermittent/stringsearch/rockclimb.csv b/results/intermittent/stringsearch/rockclimb.csv new file mode 100644 index 00000000..67aa138c --- /dev/null +++ b/results/intermittent/stringsearch/rockclimb.csv @@ -0,0 +1,11 @@ +benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result +stringsearch,board,1,ok,8,1,0,50.82,48771746.86,,609,19,20 +stringsearch,board,2,ok,8,1,0,63.25,60649105.41,,813,15,20 +stringsearch,board,3,ok,8,1,0,60.41,56538987.04,,1513,14,20 +stringsearch,board,4,incomplete,8,1,0,209.59,,,,, +stringsearch,board,5,ok,8,1,0,170.01,167435070.55,,849,54,20 +stringsearch,board,6,ok,8,1,0,75.17,73326835.21,,761,14,20 +stringsearch,board,7,ok,8,1,0,130.51,128763235.09,,795,0,20 +stringsearch,board,8,ok,8,1,0,189.73,187146437.18,,1182,121,20 +stringsearch,board,9,ok,8,1,0,183.63,180833671.24,,728,0,20 +stringsearch,board,10,ok,8,1,0,163.35,161628023.13,,741,123,20 diff --git a/results/intermittent/stringsearch/schematic.csv b/results/intermittent/stringsearch/schematic.csv new file mode 100644 index 00000000..364c1254 --- /dev/null +++ b/results/intermittent/stringsearch/schematic.csv @@ -0,0 +1,11 @@ +benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result +stringsearch,board,1,ok,6,3,599,4.81,2684370.54,,46,1,20 +stringsearch,board,2,ok,6,3,599,6.91,4325362.96,,59,1,20 +stringsearch,board,3,ok,6,3,599,5.26,1305452.47,,84,0,20 +stringsearch,board,4,ok,6,3,599,16.45,13936256.96,,63,0,20 +stringsearch,board,5,ok,6,3,599,13.67,11185165.0,,61,3,20 +stringsearch,board,6,ok,6,3,599,6.58,4695178.15,,54,1,20 +stringsearch,board,7,ok,6,3,599,10.77,9028889.63,,56,0,20 +stringsearch,board,8,ok,6,3,599,12.77,10154306.97,,74,6,20 +stringsearch,board,9,ok,6,3,599,13.65,10910445.66,,51,1,20 +stringsearch,board,10,ok,6,3,599,9.85,8061779.88,,52,6,20 diff --git a/results/intermittent/stringsearch/schematicO3.csv b/results/intermittent/stringsearch/schematicO3.csv new file mode 100644 index 00000000..c0c66f1e --- /dev/null +++ b/results/intermittent/stringsearch/schematicO3.csv @@ -0,0 +1,11 @@ +benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result +stringsearch,board,1,ok,4,2,810,2.34,222568.19,,17,0,20 +stringsearch,board,2,ok,4,2,810,3.35,722558.65,,21,0,20 +stringsearch,board,3,ok,4,2,810,4.24,356535.47,,29,0,20 +stringsearch,board,4,ok,4,2,810,8.49,6036410.19,,29,0,20 +stringsearch,board,5,ok,4,2,810,5.77,3190619.46,,23,1,20 +stringsearch,board,6,ok,4,2,810,3.02,1125077.85,,22,0,20 +stringsearch,board,7,ok,4,2,810,4.78,3085789.27,,21,0,20 +stringsearch,board,8,ok,4,2,810,4.99,2404458.99,,28,1,20 +stringsearch,board,9,ok,4,2,810,6.19,3424477.75,,20,0,20 +stringsearch,board,10,ok,4,2,810,5.69,3967698.43,,22,3,20 diff --git a/results/intermittent/stringsearch_fixed/milp.csv b/results/intermittent/stringsearch_fixed/milp.csv deleted file mode 100644 index 0ad333da..00000000 --- a/results/intermittent/stringsearch_fixed/milp.csv +++ /dev/null @@ -1,11 +0,0 @@ -benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result -stringsearch_fixed,board,1,ok,5,317,667,2.28,195335.25,,15,0,20 -stringsearch_fixed,board,2,ok,5,317,667,3.23,705316.37,,21,0,20 -stringsearch_fixed,board,3,ok,5,317,667,4.15,306573.92,,25,0,20 -stringsearch_fixed,board,4,ok,5,317,667,7.77,5238685.13,,25,0,20 -stringsearch_fixed,board,5,ok,5,317,667,5.65,3164907.24,,22,1,20 -stringsearch_fixed,board,6,ok,5,317,667,2.97,1111396.51,,19,0,20 -stringsearch_fixed,board,7,ok,5,317,667,4.71,3070378.24,,21,0,20 -stringsearch_fixed,board,8,ok,5,317,667,5.07,2388693.79,,26,1,20 -stringsearch_fixed,board,9,ok,5,317,667,6.12,3381397.35,,19,0,20 -stringsearch_fixed,board,10,ok,5,317,667,1.95,195066.87,,15,0,20 diff --git a/results/intermittent/stringsearch_fixed/rockclimb.csv b/results/intermittent/stringsearch_fixed/rockclimb.csv deleted file mode 100644 index 00b64053..00000000 --- a/results/intermittent/stringsearch_fixed/rockclimb.csv +++ /dev/null @@ -1,11 +0,0 @@ -benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result -stringsearch_fixed,board,1,ok,8,1,0,50.82,48771746.86,,609,19,20 -stringsearch_fixed,board,2,ok,8,1,0,63.25,60649105.41,,813,15,20 -stringsearch_fixed,board,3,ok,8,1,0,60.41,56538987.04,,1513,14,20 -stringsearch_fixed,board,4,incomplete,8,1,0,209.59,,,,, -stringsearch_fixed,board,5,ok,8,1,0,170.01,167435070.55,,849,54,20 -stringsearch_fixed,board,6,ok,8,1,0,75.17,73326835.21,,761,14,20 -stringsearch_fixed,board,7,ok,8,1,0,130.51,128763235.09,,795,0,20 -stringsearch_fixed,board,8,ok,8,1,0,189.73,187146437.18,,1182,121,20 -stringsearch_fixed,board,9,ok,8,1,0,183.63,180833671.24,,728,0,20 -stringsearch_fixed,board,10,ok,8,1,0,163.35,161628023.13,,741,123,20 diff --git a/results/intermittent/stringsearch_fixed/schematic.csv b/results/intermittent/stringsearch_fixed/schematic.csv deleted file mode 100644 index 300334fc..00000000 --- a/results/intermittent/stringsearch_fixed/schematic.csv +++ /dev/null @@ -1,11 +0,0 @@ -benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result -stringsearch_fixed,board,1,ok,6,3,599,4.81,2684370.54,,46,1,20 -stringsearch_fixed,board,2,ok,6,3,599,6.91,4325362.96,,59,1,20 -stringsearch_fixed,board,3,ok,6,3,599,5.26,1305452.47,,84,0,20 -stringsearch_fixed,board,4,ok,6,3,599,16.45,13936256.96,,63,0,20 -stringsearch_fixed,board,5,ok,6,3,599,13.67,11185165.0,,61,3,20 -stringsearch_fixed,board,6,ok,6,3,599,6.58,4695178.15,,54,1,20 -stringsearch_fixed,board,7,ok,6,3,599,10.77,9028889.63,,56,0,20 -stringsearch_fixed,board,8,ok,6,3,599,12.77,10154306.97,,74,6,20 -stringsearch_fixed,board,9,ok,6,3,599,13.65,10910445.66,,51,1,20 -stringsearch_fixed,board,10,ok,6,3,599,9.85,8061779.88,,52,6,20 diff --git a/results/intermittent/stringsearch_fixed/schematicO3.csv b/results/intermittent/stringsearch_fixed/schematicO3.csv deleted file mode 100644 index c132d2b0..00000000 --- a/results/intermittent/stringsearch_fixed/schematicO3.csv +++ /dev/null @@ -1,11 +0,0 @@ -benchmark,capacitor,trace,status,region_boundaries,compilation_time_ms,profiling_time_ms,replay_seconds,execution_time_us,runtime_region_boundary_calls,runtime_wait_count,runtime_recovery_boots,result -stringsearch_fixed,board,1,ok,4,2,810,2.34,222568.19,,17,0,20 -stringsearch_fixed,board,2,ok,4,2,810,3.35,722558.65,,21,0,20 -stringsearch_fixed,board,3,ok,4,2,810,4.24,356535.47,,29,0,20 -stringsearch_fixed,board,4,ok,4,2,810,8.49,6036410.19,,29,0,20 -stringsearch_fixed,board,5,ok,4,2,810,5.77,3190619.46,,23,1,20 -stringsearch_fixed,board,6,ok,4,2,810,3.02,1125077.85,,22,0,20 -stringsearch_fixed,board,7,ok,4,2,810,4.78,3085789.27,,21,0,20 -stringsearch_fixed,board,8,ok,4,2,810,4.99,2404458.99,,28,1,20 -stringsearch_fixed,board,9,ok,4,2,810,6.19,3424477.75,,20,0,20 -stringsearch_fixed,board,10,ok,4,2,810,5.69,3967698.43,,22,3,20 diff --git a/results/intermittent/summarize.py b/results/intermittent/summarize.py index 1c0a76ae..0b0651d6 100644 --- a/results/intermittent/summarize.py +++ b/results/intermittent/summarize.py @@ -17,7 +17,7 @@ "poly1305", "cuckoo_filter", "sha256_fixed", - "stringsearch_fixed", + "stringsearch", ] ALGOS = ["milp", "rockclimb", "schematic", "schematicO3"] TRACES = [str(i) for i in range(1, 11)] diff --git a/results/intermittent/summary.csv b/results/intermittent/summary.csv index 0302586d..0c1a0d10 100644 --- a/results/intermittent/summary.csv +++ b/results/intermittent/summary.csv @@ -479,43 +479,43 @@ sha256_fixed,schematicO3,7,ok,yes,yes,131,131,33,0,5518529.97,7.27,5 sha256_fixed,schematicO3,8,ok,yes,yes,131,131,37,3,5506938.82,8.11,5 sha256_fixed,schematicO3,9,ok,yes,yes,131,131,35,2,8329421.63,11.15,5 sha256_fixed,schematicO3,10,ok,yes,yes,131,131,39,6,7910655.87,9.66,5 -stringsearch_fixed,milp,1,ok,yes,yes,20,20,15,0,195335.25,2.28,5 -stringsearch_fixed,milp,2,ok,yes,yes,20,20,21,0,705316.37,3.23,5 -stringsearch_fixed,milp,3,ok,yes,yes,20,20,25,0,306573.92,4.15,5 -stringsearch_fixed,milp,4,ok,yes,yes,20,20,25,0,5238685.13,7.77,5 -stringsearch_fixed,milp,5,ok,yes,yes,20,20,22,1,3164907.24,5.65,5 -stringsearch_fixed,milp,6,ok,yes,yes,20,20,19,0,1111396.51,2.97,5 -stringsearch_fixed,milp,7,ok,yes,yes,20,20,21,0,3070378.24,4.71,5 -stringsearch_fixed,milp,8,ok,yes,yes,20,20,26,1,2388693.79,5.07,5 -stringsearch_fixed,milp,9,ok,yes,yes,20,20,19,0,3381397.35,6.12,5 -stringsearch_fixed,milp,10,ok,yes,yes,20,20,15,0,195066.87,1.95,5 -stringsearch_fixed,rockclimb,1,ok,yes,yes,20,20,609,19,48771746.86,50.82,8 -stringsearch_fixed,rockclimb,2,ok,yes,yes,20,20,813,15,60649105.41,63.25,8 -stringsearch_fixed,rockclimb,3,ok,yes,yes,20,20,1513,14,56538987.04,60.41,8 -stringsearch_fixed,rockclimb,4,incomplete,no,,,20,,,,209.59,8 -stringsearch_fixed,rockclimb,5,ok,yes,yes,20,20,849,54,167435070.55,170.01,8 -stringsearch_fixed,rockclimb,6,ok,yes,yes,20,20,761,14,73326835.21,75.17,8 -stringsearch_fixed,rockclimb,7,ok,yes,yes,20,20,795,0,128763235.09,130.51,8 -stringsearch_fixed,rockclimb,8,ok,yes,yes,20,20,1182,121,187146437.18,189.73,8 -stringsearch_fixed,rockclimb,9,ok,yes,yes,20,20,728,0,180833671.24,183.63,8 -stringsearch_fixed,rockclimb,10,ok,yes,yes,20,20,741,123,161628023.13,163.35,8 -stringsearch_fixed,schematic,1,ok,yes,yes,20,20,46,1,2684370.54,4.81,6 -stringsearch_fixed,schematic,2,ok,yes,yes,20,20,59,1,4325362.96,6.91,6 -stringsearch_fixed,schematic,3,ok,yes,yes,20,20,84,0,1305452.47,5.26,6 -stringsearch_fixed,schematic,4,ok,yes,yes,20,20,63,0,13936256.96,16.45,6 -stringsearch_fixed,schematic,5,ok,yes,yes,20,20,61,3,11185165.0,13.67,6 -stringsearch_fixed,schematic,6,ok,yes,yes,20,20,54,1,4695178.15,6.58,6 -stringsearch_fixed,schematic,7,ok,yes,yes,20,20,56,0,9028889.63,10.77,6 -stringsearch_fixed,schematic,8,ok,yes,yes,20,20,74,6,10154306.97,12.77,6 -stringsearch_fixed,schematic,9,ok,yes,yes,20,20,51,1,10910445.66,13.65,6 -stringsearch_fixed,schematic,10,ok,yes,yes,20,20,52,6,8061779.88,9.85,6 -stringsearch_fixed,schematicO3,1,ok,yes,yes,20,20,17,0,222568.19,2.34,4 -stringsearch_fixed,schematicO3,2,ok,yes,yes,20,20,21,0,722558.65,3.35,4 -stringsearch_fixed,schematicO3,3,ok,yes,yes,20,20,29,0,356535.47,4.24,4 -stringsearch_fixed,schematicO3,4,ok,yes,yes,20,20,29,0,6036410.19,8.49,4 -stringsearch_fixed,schematicO3,5,ok,yes,yes,20,20,23,1,3190619.46,5.77,4 -stringsearch_fixed,schematicO3,6,ok,yes,yes,20,20,22,0,1125077.85,3.02,4 -stringsearch_fixed,schematicO3,7,ok,yes,yes,20,20,21,0,3085789.27,4.78,4 -stringsearch_fixed,schematicO3,8,ok,yes,yes,20,20,28,1,2404458.99,4.99,4 -stringsearch_fixed,schematicO3,9,ok,yes,yes,20,20,20,0,3424477.75,6.19,4 -stringsearch_fixed,schematicO3,10,ok,yes,yes,20,20,22,3,3967698.43,5.69,4 +stringsearch,milp,1,ok,yes,yes,20,20,15,0,195335.25,2.28,5 +stringsearch,milp,2,ok,yes,yes,20,20,21,0,705316.37,3.23,5 +stringsearch,milp,3,ok,yes,yes,20,20,25,0,306573.92,4.15,5 +stringsearch,milp,4,ok,yes,yes,20,20,25,0,5238685.13,7.77,5 +stringsearch,milp,5,ok,yes,yes,20,20,22,1,3164907.24,5.65,5 +stringsearch,milp,6,ok,yes,yes,20,20,19,0,1111396.51,2.97,5 +stringsearch,milp,7,ok,yes,yes,20,20,21,0,3070378.24,4.71,5 +stringsearch,milp,8,ok,yes,yes,20,20,26,1,2388693.79,5.07,5 +stringsearch,milp,9,ok,yes,yes,20,20,19,0,3381397.35,6.12,5 +stringsearch,milp,10,ok,yes,yes,20,20,15,0,195066.87,1.95,5 +stringsearch,rockclimb,1,ok,yes,yes,20,20,609,19,48771746.86,50.82,8 +stringsearch,rockclimb,2,ok,yes,yes,20,20,813,15,60649105.41,63.25,8 +stringsearch,rockclimb,3,ok,yes,yes,20,20,1513,14,56538987.04,60.41,8 +stringsearch,rockclimb,4,incomplete,no,,,20,,,,209.59,8 +stringsearch,rockclimb,5,ok,yes,yes,20,20,849,54,167435070.55,170.01,8 +stringsearch,rockclimb,6,ok,yes,yes,20,20,761,14,73326835.21,75.17,8 +stringsearch,rockclimb,7,ok,yes,yes,20,20,795,0,128763235.09,130.51,8 +stringsearch,rockclimb,8,ok,yes,yes,20,20,1182,121,187146437.18,189.73,8 +stringsearch,rockclimb,9,ok,yes,yes,20,20,728,0,180833671.24,183.63,8 +stringsearch,rockclimb,10,ok,yes,yes,20,20,741,123,161628023.13,163.35,8 +stringsearch,schematic,1,ok,yes,yes,20,20,46,1,2684370.54,4.81,6 +stringsearch,schematic,2,ok,yes,yes,20,20,59,1,4325362.96,6.91,6 +stringsearch,schematic,3,ok,yes,yes,20,20,84,0,1305452.47,5.26,6 +stringsearch,schematic,4,ok,yes,yes,20,20,63,0,13936256.96,16.45,6 +stringsearch,schematic,5,ok,yes,yes,20,20,61,3,11185165.0,13.67,6 +stringsearch,schematic,6,ok,yes,yes,20,20,54,1,4695178.15,6.58,6 +stringsearch,schematic,7,ok,yes,yes,20,20,56,0,9028889.63,10.77,6 +stringsearch,schematic,8,ok,yes,yes,20,20,74,6,10154306.97,12.77,6 +stringsearch,schematic,9,ok,yes,yes,20,20,51,1,10910445.66,13.65,6 +stringsearch,schematic,10,ok,yes,yes,20,20,52,6,8061779.88,9.85,6 +stringsearch,schematicO3,1,ok,yes,yes,20,20,17,0,222568.19,2.34,4 +stringsearch,schematicO3,2,ok,yes,yes,20,20,21,0,722558.65,3.35,4 +stringsearch,schematicO3,3,ok,yes,yes,20,20,29,0,356535.47,4.24,4 +stringsearch,schematicO3,4,ok,yes,yes,20,20,29,0,6036410.19,8.49,4 +stringsearch,schematicO3,5,ok,yes,yes,20,20,23,1,3190619.46,5.77,4 +stringsearch,schematicO3,6,ok,yes,yes,20,20,22,0,1125077.85,3.02,4 +stringsearch,schematicO3,7,ok,yes,yes,20,20,21,0,3085789.27,4.78,4 +stringsearch,schematicO3,8,ok,yes,yes,20,20,28,1,2404458.99,4.99,4 +stringsearch,schematicO3,9,ok,yes,yes,20,20,20,0,3424477.75,6.19,4 +stringsearch,schematicO3,10,ok,yes,yes,20,20,22,3,3967698.43,5.69,4 diff --git a/results/milp.csv b/results/milp.csv index 8ce46b5a..fe814e3d 100644 --- a/results/milp.csv +++ b/results/milp.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,5,5,2,21,37888,557,41992.95,0,0,0,3,regional,22 sha256-5uF,5uF,ok,29,42,23,30,4,346,66960,663,95836.97,0,0,0,6,regional,5831,23976,839,2216,yes,99,0,,140,,1 sha256-10uF,10uF,ok,38,54,14,18,6,244,58624,677,94415.11,0,0,0,6,regional,4087,16830,307,830,yes,79,0,,98,,1 sha256-50uF,50uF,ok,31,45,8,9,3,112,45856,591,92852.04,0,0,0,6,regional,1999,7782,104,236,yes,18,1,__local_main.lengthPad.i:5,26,,1 -stringsearch_fixed-5uF,5uF,ok,32,46,18,24,4,254,48384,641,36119.99,0,0,0,4,regional,966,3908,425,1141,yes,6,0,,206,,1 -stringsearch_fixed-10uF,10uF,ok,32,46,18,24,4,273,49936,542,35651.68,0,0,0,4,regional,966,3908,425,1141,yes,6,0,,233,,1 -stringsearch_fixed-50uF,50uF,ok,29,42,16,21,2,92,44704,572,33331.04,0,0,0,4,regional,789,3159,358,952,yes,0,1,len:16,58,,1 +stringsearch-5uF,5uF,ok,32,46,18,24,4,254,48384,641,36119.99,0,0,0,4,regional,966,3908,425,1141,yes,6,0,,206,,1 +stringsearch-10uF,10uF,ok,32,46,18,24,4,273,49936,542,35651.68,0,0,0,4,regional,966,3908,425,1141,yes,6,0,,233,,1 +stringsearch-50uF,50uF,ok,29,42,16,21,2,92,44704,572,33331.04,0,0,0,4,regional,789,3159,358,952,yes,0,1,len:16,58,,1 diff --git a/results/milp_debug.csv b/results/milp_debug.csv index 409c9920..eb463819 100644 --- a/results/milp_debug.csv +++ b/results/milp_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,5,5,2,20,38048,415,43086.28,4,0,0,3,regional,22 sha256-5uF,5uF,ok,29,42,23,30,4,357,68272,692,95400.56,34,0,0,6,regional,5831,23976,839,2216,yes,99,0,,154,131,1 sha256-10uF,10uF,ok,38,54,14,18,6,238,58576,547,94245.18,18,0,0,6,regional,4087,16830,307,830,yes,79,0,,95,131,1 sha256-50uF,50uF,ok,31,45,8,9,3,114,47856,565,93044.65,5,0,0,6,regional,1999,7782,104,236,yes,18,1,__local_main.lengthPad.i:5,32,131,1 -stringsearch_fixed-5uF,5uF,ok,32,46,18,24,4,258,48304,425,36213.78,88,0,0,4,regional,966,3908,425,1141,yes,6,0,,220,20,1 -stringsearch_fixed-10uF,10uF,ok,32,46,18,24,4,222,48224,447,35712.16,59,0,0,4,regional,966,3908,425,1141,yes,6,0,,182,20,1 -stringsearch_fixed-50uF,50uF,ok,29,42,16,21,2,81,44544,423,33349.23,26,0,0,4,regional,789,3159,358,952,yes,0,1,len:16,55,20,1 +stringsearch-5uF,5uF,ok,32,46,18,24,4,258,48304,425,36213.78,88,0,0,4,regional,966,3908,425,1141,yes,6,0,,220,20,1 +stringsearch-10uF,10uF,ok,32,46,18,24,4,222,48224,447,35712.16,59,0,0,4,regional,966,3908,425,1141,yes,6,0,,182,20,1 +stringsearch-50uF,50uF,ok,29,42,16,21,2,81,44544,423,33349.23,26,0,0,4,regional,789,3159,358,952,yes,0,1,len:16,55,20,1 diff --git a/results/rockclimb.csv b/results/rockclimb.csv index 71515508..bd22d96b 100644 --- a/results/rockclimb.csv +++ b/results/rockclimb.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,33,50,5,1,22960,0,93344.68,3149,4048,1 sha256-5uF,5uF,ok,69,97,11,95,28848,0,101828.39,0,,1 sha256-10uF,10uF,ok,69,97,11,91,28736,0,101830.2,0,,1 sha256-50uF,50uF,ok,69,97,11,91,28560,0,101825.36,0,,1 -stringsearch_fixed-5uF,5uF,ok,41,60,8,4,22976,0,275707.56,0,,1 -stringsearch_fixed-10uF,10uF,ok,41,60,8,4,23280,0,275710.82,0,,1 -stringsearch_fixed-50uF,50uF,ok,41,60,8,4,22928,0,275716.85,0,,1 +stringsearch-5uF,5uF,ok,41,60,8,4,22976,0,275707.56,0,,1 +stringsearch-10uF,10uF,ok,41,60,8,4,23280,0,275710.82,0,,1 +stringsearch-50uF,50uF,ok,41,60,8,4,22928,0,275716.85,0,,1 diff --git a/results/rockclimb_debug.csv b/results/rockclimb_debug.csv index e723d33d..d809825d 100644 --- a/results/rockclimb_debug.csv +++ b/results/rockclimb_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,33,50,5,1,22848,0,93330.99,3149,4048,1 sha256-5uF,5uF,ok,69,97,11,92,28640,0,103261.11,975,131,1 sha256-10uF,10uF,ok,69,97,11,91,28800,0,103255.57,975,131,1 sha256-50uF,50uF,ok,69,97,11,91,28656,0,103257.86,975,131,1 -stringsearch_fixed-5uF,5uF,ok,41,60,8,4,23168,0,296401.54,17481,20,1 -stringsearch_fixed-10uF,10uF,ok,41,60,8,4,23008,0,296398.24,17481,20,1 -stringsearch_fixed-50uF,50uF,ok,41,60,8,4,23120,0,296392.79,17481,20,1 +stringsearch-5uF,5uF,ok,41,60,8,4,23168,0,296401.54,17481,20,1 +stringsearch-10uF,10uF,ok,41,60,8,4,23008,0,296398.24,17481,20,1 +stringsearch-50uF,50uF,ok,41,60,8,4,23120,0,296392.79,17481,20,1 diff --git a/results/schematic.csv b/results/schematic.csv index 4a4b83b5..9fec638d 100644 --- a/results/schematic.csv +++ b/results/schematic.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,79,102,4,11,30304,687,247327.81,22,308,308,0,0,4048,8 sha256-5uF,5uF,ok,65,86,7,30,32144,786,111485.49,0,0,0,0,0,,87,7,14,1,7,1 sha256-10uF,10uF,ok,65,86,4,32,32064,786,110924.46,0,0,0,0,0,,87,4,14,1,4,1 sha256-50uF,50uF,ok,65,86,1,59,32032,786,110275.21,0,0,0,0,0,,87,1,14,1,1,1 -stringsearch_fixed-5uF,5uF,ok,49,63,7,13,31376,735,113186.25,0,0,0,0,0,,25,5,9,1,7,1 -stringsearch_fixed-10uF,10uF,ok,49,63,3,16,31200,735,82253.62,0,0,0,0,0,,25,3,9,1,3,1 -stringsearch_fixed-50uF,50uF,ok,49,63,2,28,31408,735,83997.56,0,0,0,0,0,,25,1,9,1,2,1 +stringsearch-5uF,5uF,ok,49,63,7,13,31376,735,113186.25,0,0,0,0,0,,25,5,9,1,7,1 +stringsearch-10uF,10uF,ok,49,63,3,16,31200,735,82253.62,0,0,0,0,0,,25,3,9,1,3,1 +stringsearch-50uF,50uF,ok,49,63,2,28,31408,735,83997.56,0,0,0,0,0,,25,1,9,1,2,1 diff --git a/results/schematicO3.csv b/results/schematicO3.csv index da714f75..4f453700 100644 --- a/results/schematicO3.csv +++ b/results/schematicO3.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,1,1,29504,749,46454.45,3,42,42,0,0,4048,3,1,4,1 sha256-5uF,5uF,ok,29,42,6,6,31632,676,98273.4,0,0,0,0,0,,6,6,10,1,6,1 sha256-10uF,10uF,ok,29,42,4,30,31584,676,98118.18,0,0,0,0,0,,6,4,10,1,4,1 sha256-50uF,50uF,ok,29,42,1,10,31568,676,98250.83,0,0,0,0,0,,6,0,10,1,1,1 -stringsearch_fixed-5uF,5uF,ok,29,42,4,9,31248,746,38679.98,0,0,0,0,0,,4,3,7,1,4,1 -stringsearch_fixed-10uF,10uF,ok,29,42,4,9,31200,746,38283.57,0,0,0,0,0,,4,3,7,1,4,1 -stringsearch_fixed-50uF,50uF,ok,29,42,4,9,31264,746,38082.03,0,0,0,0,0,,4,3,7,1,4,1 +stringsearch-5uF,5uF,ok,29,42,4,9,31248,746,38679.98,0,0,0,0,0,,4,3,7,1,4,1 +stringsearch-10uF,10uF,ok,29,42,4,9,31200,746,38283.57,0,0,0,0,0,,4,3,7,1,4,1 +stringsearch-50uF,50uF,ok,29,42,4,9,31264,746,38082.03,0,0,0,0,0,,4,3,7,1,4,1 diff --git a/results/schematicO3_debug.csv b/results/schematicO3_debug.csv index faad66aa..45d7f3df 100644 --- a/results/schematicO3_debug.csv +++ b/results/schematicO3_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,1,1,29488,482,46462.4,3,42,42,0,0,4048,3,1,4,1, sha256-5uF,5uF,ok,29,42,6,6,31696,679,98578.42,33,462,462,0,0,131,6,6,10,1,6,1 sha256-10uF,10uF,ok,29,42,4,30,31728,679,98610.35,31,434,434,0,0,131,6,4,10,1,4,1 sha256-50uF,50uF,ok,29,42,1,10,31568,679,98394.64,7,98,98,0,0,131,6,0,10,1,1,1 -stringsearch_fixed-5uF,5uF,ok,29,42,4,9,31216,711,39066.45,113,1582,1582,0,0,20,4,3,7,1,4,1 -stringsearch_fixed-10uF,10uF,ok,29,42,4,9,31232,711,38587.46,89,1246,1246,0,0,20,4,3,7,1,4,1 -stringsearch_fixed-50uF,50uF,ok,29,42,4,9,31328,711,38346.75,77,1078,1078,0,0,20,4,3,7,1,4,1 +stringsearch-5uF,5uF,ok,29,42,4,9,31216,711,39066.45,113,1582,1582,0,0,20,4,3,7,1,4,1 +stringsearch-10uF,10uF,ok,29,42,4,9,31232,711,38587.46,89,1246,1246,0,0,20,4,3,7,1,4,1 +stringsearch-50uF,50uF,ok,29,42,4,9,31328,711,38346.75,77,1078,1078,0,0,20,4,3,7,1,4,1 diff --git a/results/schematic_debug.csv b/results/schematic_debug.csv index 094b5c2f..9ae2a5b3 100644 --- a/results/schematic_debug.csv +++ b/results/schematic_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,79,102,4,11,30368,511,247333.41,22,308,308,0,0,4048,8 sha256-5uF,5uF,ok,65,86,7,30,32064,622,111960.8,83,1162,1162,0,0,131,87,7,14,1,7,1 sha256-10uF,10uF,ok,65,86,4,34,31952,622,111301.75,50,700,700,0,0,131,87,4,14,1,4,1 sha256-50uF,50uF,ok,65,86,1,62,32016,622,110584.91,16,224,224,0,0,131,87,1,14,1,1,1 -stringsearch_fixed-5uF,5uF,ok,49,63,7,13,31280,758,114276.72,312,4368,4368,0,0,20,25,5,9,1,7,1 -stringsearch_fixed-10uF,10uF,ok,49,63,3,16,31360,758,82896.34,146,2044,2044,0,0,20,25,3,9,1,3,1 -stringsearch_fixed-50uF,50uF,ok,49,63,2,27,31360,758,84252.02,66,924,924,0,0,20,25,1,9,1,2,1 +stringsearch-5uF,5uF,ok,49,63,7,13,31280,758,114276.72,312,4368,4368,0,0,20,25,5,9,1,7,1 +stringsearch-10uF,10uF,ok,49,63,3,16,31360,758,82896.34,146,2044,2044,0,0,20,25,3,9,1,3,1 +stringsearch-50uF,50uF,ok,49,63,2,27,31360,758,84252.02,66,924,924,0,0,20,25,1,9,1,2,1 diff --git a/results/uninstrumented.csv b/results/uninstrumented.csv index d7ac0f60..e16ebecc 100644 --- a/results/uninstrumented.csv +++ b/results/uninstrumented.csv @@ -11,4 +11,4 @@ sensor_fusion,ok,367,25029.82,1 poly1305,ok,457,475495.65,1 cuckoo_filter,ok,445,41990.8,1 sha256,ok,379,88640.11,1 -stringsearch_fixed,ok,361,33074.97,1 +stringsearch,ok,361,33074.97,1 From 2b5069ad5b9de1f2a94c73932c17c17fb3be299e Mon Sep 17 00:00:00 2001 From: Byeongjee Kang Date: Sat, 22 Aug 2026 12:58:20 -0400 Subject: [PATCH 2/2] Restore the findme pointer global in stringsearch and re-measure --- benchmarks/intermittent/stringsearch.c | 9 +++++---- results/chunking_overhead/chunked.csv | 2 +- results/milp.csv | 6 +++--- results/milp_debug.csv | 6 +++--- results/rockclimb.csv | 6 +++--- results/rockclimb_debug.csv | 6 +++--- results/schematic.csv | 6 +++--- results/schematicO3.csv | 6 +++--- results/schematicO3_debug.csv | 6 +++--- results/schematic_debug.csv | 6 +++--- results/uninstrumented.csv | 2 +- 11 files changed, 31 insertions(+), 30 deletions(-) diff --git a/benchmarks/intermittent/stringsearch.c b/benchmarks/intermittent/stringsearch.c index 0a3b8ee8..612ffa1e 100644 --- a/benchmarks/intermittent/stringsearch.c +++ b/benchmarks/intermittent/stringsearch.c @@ -19,7 +19,7 @@ static uint32_t table[256] __attribute__((used, section(".fram"))); static uint32_t len __attribute__((used, section(".fram"))); -static uint32_t findme_idx __attribute__((used, section(".fram"))); +static char *findme __attribute__((used, section(".fram"))); // --- Const data --- @@ -67,6 +67,8 @@ FORCE_INLINE void init_search(const char *pattern) { __loop_tripcount(16); table[(unsigned char)pattern[i]] = len - i - 1; } + + findme = (char *)pattern; } FORCE_INLINE const char *strsearch(const char *pattern, const char *text) { @@ -94,7 +96,7 @@ FORCE_INLINE const char *strsearch(const char *pattern, const char *text) { if (shift == 0) { // Check for match const char *here = &text[pos - len + 1]; - const char *a = find_strings[findme_idx]; + const char *a = findme; const char *b = here; uint32_t matched = 1; uint32_t j; @@ -124,8 +126,7 @@ __attribute__((noinline)) int main(void) { for (i = 0; i < NUM_PATTERNS; i++) { __loop_tripcount(NUM_PATTERNS); - findme_idx = (uint32_t)i; - const char *findme = find_strings[findme_idx]; + findme = (char *)find_strings[i]; // Compute pattern length manually (no strlen) len = 0; diff --git a/results/chunking_overhead/chunked.csv b/results/chunking_overhead/chunked.csv index a51e821d..431ebf66 100644 --- a/results/chunking_overhead/chunked.csv +++ b/results/chunking_overhead/chunked.csv @@ -11,4 +11,4 @@ sensor_fusion,10uF,ok,859,25121.86,1 poly1305,10uF,ok,923,475356.64,1 cuckoo_filter,10uF,ok,761,41320.7,1 sha256,10uF,ok,1388,90038.68,1 -stringsearch,10uF,ok,1236,35354.39,1 +stringsearch,10uF,ok,684,36199.73,1 diff --git a/results/milp.csv b/results/milp.csv index fe814e3d..79216785 100644 --- a/results/milp.csv +++ b/results/milp.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,5,5,2,21,37888,557,41992.95,0,0,0,3,regional,22 sha256-5uF,5uF,ok,29,42,23,30,4,346,66960,663,95836.97,0,0,0,6,regional,5831,23976,839,2216,yes,99,0,,140,,1 sha256-10uF,10uF,ok,38,54,14,18,6,244,58624,677,94415.11,0,0,0,6,regional,4087,16830,307,830,yes,79,0,,98,,1 sha256-50uF,50uF,ok,31,45,8,9,3,112,45856,591,92852.04,0,0,0,6,regional,1999,7782,104,236,yes,18,1,__local_main.lengthPad.i:5,26,,1 -stringsearch-5uF,5uF,ok,32,46,18,24,4,254,48384,641,36119.99,0,0,0,4,regional,966,3908,425,1141,yes,6,0,,206,,1 -stringsearch-10uF,10uF,ok,32,46,18,24,4,273,49936,542,35651.68,0,0,0,4,regional,966,3908,425,1141,yes,6,0,,233,,1 -stringsearch-50uF,50uF,ok,29,42,16,21,2,92,44704,572,33331.04,0,0,0,4,regional,789,3159,358,952,yes,0,1,len:16,58,,1 +stringsearch-5uF,5uF,ok,32,46,18,24,4,242,50416,555,36149.09,0,0,0,4,regional,956,3872,411,1109,yes,6,0,,187,,1 +stringsearch-10uF,10uF,ok,32,46,18,24,4,253,49584,512,35686.26,0,0,0,4,regional,956,3872,411,1109,yes,6,0,,199,,1 +stringsearch-50uF,50uF,ok,29,42,16,21,2,91,44624,459,32548.53,0,0,0,4,regional,779,3123,344,920,yes,0,2,len:16;findme:16,42,,1 diff --git a/results/milp_debug.csv b/results/milp_debug.csv index eb463819..76f2dcb4 100644 --- a/results/milp_debug.csv +++ b/results/milp_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,5,5,2,20,38048,415,43086.28,4,0,0,3,regional,22 sha256-5uF,5uF,ok,29,42,23,30,4,357,68272,692,95400.56,34,0,0,6,regional,5831,23976,839,2216,yes,99,0,,154,131,1 sha256-10uF,10uF,ok,38,54,14,18,6,238,58576,547,94245.18,18,0,0,6,regional,4087,16830,307,830,yes,79,0,,95,131,1 sha256-50uF,50uF,ok,31,45,8,9,3,114,47856,565,93044.65,5,0,0,6,regional,1999,7782,104,236,yes,18,1,__local_main.lengthPad.i:5,32,131,1 -stringsearch-5uF,5uF,ok,32,46,18,24,4,258,48304,425,36213.78,88,0,0,4,regional,966,3908,425,1141,yes,6,0,,220,20,1 -stringsearch-10uF,10uF,ok,32,46,18,24,4,222,48224,447,35712.16,59,0,0,4,regional,966,3908,425,1141,yes,6,0,,182,20,1 -stringsearch-50uF,50uF,ok,29,42,16,21,2,81,44544,423,33349.23,26,0,0,4,regional,789,3159,358,952,yes,0,1,len:16,55,20,1 +stringsearch-5uF,5uF,ok,32,46,18,24,4,252,51120,435,36292.43,88,0,0,4,regional,956,3872,411,1109,yes,6,0,,204,20,1 +stringsearch-10uF,10uF,ok,32,46,18,24,4,233,48976,405,35788.48,59,0,0,4,regional,956,3872,411,1109,yes,6,0,,185,20,1 +stringsearch-50uF,50uF,ok,29,42,16,21,2,75,44304,395,32595.18,26,0,0,4,regional,779,3123,344,920,yes,0,2,len:16;findme:16,37,20,1 diff --git a/results/rockclimb.csv b/results/rockclimb.csv index bd22d96b..4a17298d 100644 --- a/results/rockclimb.csv +++ b/results/rockclimb.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,33,50,5,1,22960,0,93344.68,3149,4048,1 sha256-5uF,5uF,ok,69,97,11,95,28848,0,101828.39,0,,1 sha256-10uF,10uF,ok,69,97,11,91,28736,0,101830.2,0,,1 sha256-50uF,50uF,ok,69,97,11,91,28560,0,101825.36,0,,1 -stringsearch-5uF,5uF,ok,41,60,8,4,22976,0,275707.56,0,,1 -stringsearch-10uF,10uF,ok,41,60,8,4,23280,0,275710.82,0,,1 -stringsearch-50uF,50uF,ok,41,60,8,4,22928,0,275716.85,0,,1 +stringsearch-5uF,5uF,ok,41,60,8,5,23264,0,274234.22,0,,1 +stringsearch-10uF,10uF,ok,41,60,8,4,23152,0,274228.75,0,,1 +stringsearch-50uF,50uF,ok,41,60,8,4,23104,0,274229.54,0,,1 diff --git a/results/rockclimb_debug.csv b/results/rockclimb_debug.csv index d809825d..1aa1f295 100644 --- a/results/rockclimb_debug.csv +++ b/results/rockclimb_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,33,50,5,1,22848,0,93330.99,3149,4048,1 sha256-5uF,5uF,ok,69,97,11,92,28640,0,103261.11,975,131,1 sha256-10uF,10uF,ok,69,97,11,91,28800,0,103255.57,975,131,1 sha256-50uF,50uF,ok,69,97,11,91,28656,0,103257.86,975,131,1 -stringsearch-5uF,5uF,ok,41,60,8,4,23168,0,296401.54,17481,20,1 -stringsearch-10uF,10uF,ok,41,60,8,4,23008,0,296398.24,17481,20,1 -stringsearch-50uF,50uF,ok,41,60,8,4,23120,0,296392.79,17481,20,1 +stringsearch-5uF,5uF,ok,41,60,8,4,23008,0,295885.44,17481,20,1 +stringsearch-10uF,10uF,ok,41,60,8,4,23088,0,295868.32,17481,20,1 +stringsearch-50uF,50uF,ok,41,60,8,4,23168,0,295865.12,17481,20,1 diff --git a/results/schematic.csv b/results/schematic.csv index 9fec638d..f61c7830 100644 --- a/results/schematic.csv +++ b/results/schematic.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,79,102,4,11,30304,687,247327.81,22,308,308,0,0,4048,8 sha256-5uF,5uF,ok,65,86,7,30,32144,786,111485.49,0,0,0,0,0,,87,7,14,1,7,1 sha256-10uF,10uF,ok,65,86,4,32,32064,786,110924.46,0,0,0,0,0,,87,4,14,1,4,1 sha256-50uF,50uF,ok,65,86,1,59,32032,786,110275.21,0,0,0,0,0,,87,1,14,1,1,1 -stringsearch-5uF,5uF,ok,49,63,7,13,31376,735,113186.25,0,0,0,0,0,,25,5,9,1,7,1 -stringsearch-10uF,10uF,ok,49,63,3,16,31200,735,82253.62,0,0,0,0,0,,25,3,9,1,3,1 -stringsearch-50uF,50uF,ok,49,63,2,28,31408,735,83997.56,0,0,0,0,0,,25,1,9,1,2,1 +stringsearch-5uF,5uF,ok,49,63,7,16,31312,589,112743.12,0,0,0,0,0,,24,5,9,1,7,1 +stringsearch-10uF,10uF,ok,49,63,3,16,31216,589,83307.13,0,0,0,0,0,,24,3,9,1,3,1 +stringsearch-50uF,50uF,ok,49,63,2,27,31296,589,83950.12,0,0,0,0,0,,24,1,9,1,2,1 diff --git a/results/schematicO3.csv b/results/schematicO3.csv index 4f453700..90e3df0e 100644 --- a/results/schematicO3.csv +++ b/results/schematicO3.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,1,1,29504,749,46454.45,3,42,42,0,0,4048,3,1,4,1 sha256-5uF,5uF,ok,29,42,6,6,31632,676,98273.4,0,0,0,0,0,,6,6,10,1,6,1 sha256-10uF,10uF,ok,29,42,4,30,31584,676,98118.18,0,0,0,0,0,,6,4,10,1,4,1 sha256-50uF,50uF,ok,29,42,1,10,31568,676,98250.83,0,0,0,0,0,,6,0,10,1,1,1 -stringsearch-5uF,5uF,ok,29,42,4,9,31248,746,38679.98,0,0,0,0,0,,4,3,7,1,4,1 -stringsearch-10uF,10uF,ok,29,42,4,9,31200,746,38283.57,0,0,0,0,0,,4,3,7,1,4,1 -stringsearch-50uF,50uF,ok,29,42,4,9,31264,746,38082.03,0,0,0,0,0,,4,3,7,1,4,1 +stringsearch-5uF,5uF,ok,29,42,4,9,31184,494,38649.08,0,0,0,0,0,,4,3,7,1,4,1 +stringsearch-10uF,10uF,ok,29,42,4,9,31232,494,38247.46,0,0,0,0,0,,4,3,7,1,4,1 +stringsearch-50uF,50uF,ok,29,42,4,9,31248,494,38048.85,0,0,0,0,0,,4,3,7,1,4,1 diff --git a/results/schematicO3_debug.csv b/results/schematicO3_debug.csv index 45d7f3df..bdb45f7a 100644 --- a/results/schematicO3_debug.csv +++ b/results/schematicO3_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,18,26,1,1,29488,482,46462.4,3,42,42,0,0,4048,3,1,4,1, sha256-5uF,5uF,ok,29,42,6,6,31696,679,98578.42,33,462,462,0,0,131,6,6,10,1,6,1 sha256-10uF,10uF,ok,29,42,4,30,31728,679,98610.35,31,434,434,0,0,131,6,4,10,1,4,1 sha256-50uF,50uF,ok,29,42,1,10,31568,679,98394.64,7,98,98,0,0,131,6,0,10,1,1,1 -stringsearch-5uF,5uF,ok,29,42,4,9,31216,711,39066.45,113,1582,1582,0,0,20,4,3,7,1,4,1 -stringsearch-10uF,10uF,ok,29,42,4,9,31232,711,38587.46,89,1246,1246,0,0,20,4,3,7,1,4,1 -stringsearch-50uF,50uF,ok,29,42,4,9,31328,711,38346.75,77,1078,1078,0,0,20,4,3,7,1,4,1 +stringsearch-5uF,5uF,ok,29,42,4,9,31184,485,39012.27,113,1582,1582,0,0,20,4,3,7,1,4,1 +stringsearch-10uF,10uF,ok,29,42,4,9,31168,485,38531.79,89,1246,1246,0,0,20,4,3,7,1,4,1 +stringsearch-50uF,50uF,ok,29,42,4,9,31184,485,38292.51,77,1078,1078,0,0,20,4,3,7,1,4,1 diff --git a/results/schematic_debug.csv b/results/schematic_debug.csv index 9ae2a5b3..973e2535 100644 --- a/results/schematic_debug.csv +++ b/results/schematic_debug.csv @@ -35,6 +35,6 @@ cuckoo_filter-50uF,50uF,ok,79,102,4,11,30368,511,247333.41,22,308,308,0,0,4048,8 sha256-5uF,5uF,ok,65,86,7,30,32064,622,111960.8,83,1162,1162,0,0,131,87,7,14,1,7,1 sha256-10uF,10uF,ok,65,86,4,34,31952,622,111301.75,50,700,700,0,0,131,87,4,14,1,4,1 sha256-50uF,50uF,ok,65,86,1,62,32016,622,110584.91,16,224,224,0,0,131,87,1,14,1,1,1 -stringsearch-5uF,5uF,ok,49,63,7,13,31280,758,114276.72,312,4368,4368,0,0,20,25,5,9,1,7,1 -stringsearch-10uF,10uF,ok,49,63,3,16,31360,758,82896.34,146,2044,2044,0,0,20,25,3,9,1,3,1 -stringsearch-50uF,50uF,ok,49,63,2,27,31360,758,84252.02,66,924,924,0,0,20,25,1,9,1,2,1 +stringsearch-5uF,5uF,ok,49,63,7,13,31312,511,113984.3,306,4284,4284,0,0,20,24,5,9,1,7,1 +stringsearch-10uF,10uF,ok,49,63,3,16,31312,511,83778.09,146,2044,2044,0,0,20,24,3,9,1,3,1 +stringsearch-50uF,50uF,ok,49,63,2,27,31296,511,83614.34,66,924,924,0,0,20,24,1,9,1,2,1 diff --git a/results/uninstrumented.csv b/results/uninstrumented.csv index e16ebecc..5a394e77 100644 --- a/results/uninstrumented.csv +++ b/results/uninstrumented.csv @@ -11,4 +11,4 @@ sensor_fusion,ok,367,25029.82,1 poly1305,ok,457,475495.65,1 cuckoo_filter,ok,445,41990.8,1 sha256,ok,379,88640.11,1 -stringsearch,ok,361,33074.97,1 +stringsearch,ok,324,33559.5,1