diff options
| author | eunhhu <[email protected]> | 2026-10-08 14:36:27 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-08 14:36:27 +0100 |
| commit | 33091dbffe19bcac00fb7863e24bf0fd445dadd0 (patch) | |
| tree | e69f40a688452b6d00bfcd86a160cc3957073b82 /research/experiments/041-batches | |
| parent | c7656b76297b15b2054b7476fb03880ab0115c89 (diff) | |
| download | pure-33091dbffe19bcac00fb7863e24bf0fd445dadd0.tar.gz pure-33091dbffe19bcac00fb7863e24bf0fd445dadd0.zip | |
Design 025: batch programs (132's A), the block's facts once at load and only values each batch: knapsack's per-batch cost measured at 0.90 us, 38% of its 11.5 ms (BATCH 1024 against 256 under a sampled profile: re-reading the block about 39%, value kinds 26%, list facts and dependence 22%, dispatch 14%), sum0's 0.33 us, matmul's inner-round dispatch about 13 ms and float-checked arithmetic about 22; five stages (facts at load, static kinds and list facts once a batch, typed kernels, fewer passes, the tails) with bars from those shares; 041 batch-costs data
Diffstat (limited to 'research/experiments/041-batches')
| -rw-r--r-- | research/experiments/041-batches/2026-10-08-batch-costs.jsonl | 85 | ||||
| -rwxr-xr-x | research/experiments/041-batches/runs.sh | 6 |
2 files changed, 90 insertions, 1 deletions
diff --git a/research/experiments/041-batches/2026-10-08-batch-costs.jsonl b/research/experiments/041-batches/2026-10-08-batch-costs.jsonl new file mode 100644 index 0000000..b3eba50 --- /dev/null +++ b/research/experiments/041-batches/2026-10-08-batch-costs.jsonl @@ -0,0 +1,85 @@ +{"note": "b9 core (735ba81), suite-run knapsack, PURE_JIT=0, BATCH 1024 and 256 builds (gcc -O2 -g, module-batch -O3), a 2 kHz sampled profile, ms a round by the in-process C's samples (6.24 ms); measured times 11.49 and 24.56 ms; batches a round about 4,900 and 19,400", "pure_ms": [11.49, 24.56]} +{"work": "knapsack", "function": "pass.constprop.0", "ms_1024": 1.644, "ms_256": 6.167} +{"work": "knapsack", "function": "batch_run", "ms_1024": 1.999, "ms_256": 6.003} +{"work": "knapsack", "function": "binary.constprop.0", "ms_1024": 3.751, "ms_256": 4.882} +{"work": "knapsack", "function": "rows_in.constprop.0", "ms_1024": 0.149, "ms_256": 0.728} +{"work": "knapsack", "function": "find.constprop.0", "ms_1024": 0.231, "ms_256": 0.806} +{"work": "knapsack", "function": "pure_list_cells", "ms_1024": 0.143, "ms_256": 0.687} +{"work": "knapsack", "function": "affine_of.constprop.0", "ms_1024": 0.141, "ms_256": 0.63} +{"work": "knapsack", "function": "read_of.part.0.constprop.0", "ms_1024": 0.109, "ms_256": 0.516} +{"work": "knapsack", "function": "branch.constprop.0", "ms_1024": 0.96, "ms_256": 1.291} +{"work": "knapsack", "function": "pure_batch_run", "ms_1024": 0.025, "ms_256": 0.326} +{"work": "knapsack", "function": "_init", "ms_1024": 0.026, "ms_256": 0.268} +{"work": "knapsack", "function": "cells_at.constprop.0", "ms_1024": 0.163, "ms_256": 0.332} +{"work": "knapsack", "function": "dense_keys", "ms_1024": 0.042, "ms_256": 0.192} +{"work": "knapsack", "function": "(other)", "ms_1024": 1.21, "ms_256": 1.343} +{"work": "knapsack", "function": "batches.constprop.0", "ms_1024": 0.039, "ms_256": 0.13} +{"work": "knapsack", "function": "pure_list_add_many", "ms_1024": 0.486, "ms_256": 0.562} +{"work": "knapsack", "function": "pure_list_takes", "ms_1024": 0.209, "ms_256": 0.249} +{"work": "knapsack", "function": "pure_list_get", "ms_1024": 0.121, "ms_256": 0.156} +{"work": "knapsack", "function": "pure_list_count", "ms_1024": 0.023, "ms_256": 0.05} +{"work": "knapsack", "function": "rounds_of.constprop.0", "ms_1024": 0.084, "ms_256": 0.102} +{"work": "knapsack", "function": "c_knapsack", "ms_1024": 6.24, "ms_256": 6.24} +{"work": "knapsack", "function": "widen", "ms_1024": 0.105, "ms_256": 0.045} +{"work": "knapsack", "line": "module-batch.c:1761", "ms_1024": 0.189, "ms_256": 0.688} +{"work": "knapsack", "line": "module-batch.c:1590", "ms_1024": 0.161, "ms_256": 0.653} +{"work": "knapsack", "line": "module-batch.c:189", "ms_1024": 0.138, "ms_256": 0.621} +{"work": "knapsack", "line": "module-batch.c:1087", "ms_1024": 0.164, "ms_256": 0.624} +{"work": "knapsack", "line": "module-batch.c:589", "ms_1024": 0.108, "ms_256": 0.519} +{"work": "knapsack", "line": "module-batch.c:1747", "ms_1024": 0.166, "ms_256": 0.501} +{"work": "knapsack", "line": "module-batch.c:1481", "ms_1024": 0.108, "ms_256": 0.408} +{"work": "knapsack", "line": "module-batch.c:468", "ms_1024": 0.074, "ms_256": 0.373} +{"work": "knapsack", "line": "module-batch.c:190", "ms_1024": 0.039, "ms_256": 0.308} +{"work": "knapsack", "line": "module-batch.c:2735", "ms_1024": 0.006, "ms_256": 0.27} +{"work": "knapsack", "line": "module-batch.c:695", "ms_1024": 0.086, "ms_256": 0.349} +{"work": "knapsack", "line": "module-batch.c:1440", "ms_1024": 0.075, "ms_256": 0.336} +{"work": "knapsack", "line": "module-batch.c:460", "ms_1024": 0.039, "ms_256": 0.291} +{"work": "knapsack", "line": "module-batch.c:1742", "ms_1024": 0.061, "ms_256": 0.306} +{"work": "knapsack", "line": "??:0", "ms_1024": 0.026, "ms_256": 0.268} +{"work": "knapsack", "line": "module-batch.c:2780", "ms_1024": 0.094, "ms_256": 0.318} +{"work": "knapsack", "line": "module-batch.c:1911", "ms_1024": 0.059, "ms_256": 0.281} +{"work": "knapsack", "line": "module-batch.c:880", "ms_1024": 0.034, "ms_256": 0.246} +{"work": "knapsack", "line": "module-batch.c:1480", "ms_1024": 0.056, "ms_256": 0.261} +{"work": "knapsack", "line": "module-batch.c:1812", "ms_1024": 0.05, "ms_256": 0.255} +{"work": "knapsack", "line": "module-batch.c:679", "ms_1024": 0.04, "ms_256": 0.233} +{"work": "knapsack", "line": "module-batch.c:1767", "ms_1024": 0.052, "ms_256": 0.238} +{"work": "knapsack", "line": "module-batch.c:491", "ms_1024": 0.037, "ms_256": 0.22} +{"work": "knapsack", "line": "module-batch.c:1589", "ms_1024": 0.064, "ms_256": 0.242} +{"work": "knapsack", "line": "module-batch.c:1834", "ms_1024": 0.056, "ms_256": 0.229} +{"work": "knapsack", "line": "module-batch.c:774", "ms_1024": 0.064, "ms_256": 0.235} +{"work": "knapsack", "line": "natural.h:39", "ms_1024": 4.021, "ms_256": 4.164} +{"work": "knapsack", "line": "module-batch.c:1439", "ms_1024": 0.036, "ms_256": 0.173} +{"work": "knapsack", "line": "module-batch.c:1437", "ms_1024": 0.053, "ms_256": 0.188} +{"work": "knapsack", "line": "module-batch.c:355", "ms_1024": 0.005, "ms_256": 0.14} +{"work": "knapsack", "line": "module-batch.c:617", "ms_1024": 0.058, "ms_256": 0.188} +{"work": "knapsack", "line": "module-batch.c:1751", "ms_1024": 0.031, "ms_256": 0.159} +{"work": "knapsack", "line": "module-list.c:1029", "ms_1024": 0.025, "ms_256": 0.153} +{"work": "knapsack", "line": "module-batch.c:720", "ms_1024": 0.023, "ms_256": 0.149} +{"work": "knapsack", "line": "module-batch.c:864", "ms_1024": 0.024, "ms_256": 0.15} +{"work": "knapsack", "line": "module-batch.c:680", "ms_1024": 0.039, "ms_256": 0.163} +{"work": "knapsack", "line": "module-batch.c:1147", "ms_1024": 0.038, "ms_256": 0.158} +{"work": "knapsack", "line": "module-batch.c:1014", "ms_1024": 0.024, "ms_256": 0.141} +{"work": "knapsack", "line": "module-list.c:1808", "ms_1024": 0.035, "ms_256": 0.152} +{"work": "knapsack", "line": "module-batch.c:1484", "ms_1024": 0.04, "ms_256": 0.156} +{"work": "knapsack", "line": "module-batch.c:328", "ms_1024": 0.008, "ms_256": 0.121} +{"work": "knapsack", "line": "module-batch.c:2206", "ms_1024": 0.048, "ms_256": 0.16} +{"work": "knapsack", "line": "module-batch.c:2782", "ms_1024": 0.049, "ms_256": 0.16} +{"work": "knapsack", "line": "module-batch.c:1478", "ms_1024": 0.034, "ms_256": 0.145} +{"work": "knapsack", "line": "module-batch.c:1723", "ms_1024": 0.088, "ms_256": 0.199} +{"work": "knapsack", "line": "module-batch.c:1438", "ms_1024": 0.041, "ms_256": 0.148} +{"work": "knapsack", "line": "module-list.c:1714", "ms_1024": 0.02, "ms_256": 0.119} +{"work": "knapsack", "line": "module-list.c:1807", "ms_1024": 0.014, "ms_256": 0.109} +{"work": "knapsack", "line": "module-batch.c:497", "ms_1024": 0.007, "ms_256": 0.101} +{"work": "knapsack", "line": "module-batch.c:1588", "ms_1024": 0.018, "ms_256": 0.107} +{"work": "knapsack", "line": "module-batch.c:1120", "ms_1024": 0.009, "ms_256": 0.096} +{"work": "knapsack", "line": "module-batch.c:1757", "ms_1024": 0.036, "ms_256": 0.124} +{"work": "knapsack", "line": "module-batch.c:2871", "ms_1024": 0.013, "ms_256": 0.098} +{"work": "knapsack", "line": "module-batch.c:209", "ms_1024": 0.045, "ms_256": 0.127} +{"work": "knapsack", "line": "module-batch.c:2783", "ms_1024": 0.02, "ms_256": 0.1} +{"work": "knapsack", "line": "module-batch.c:1492", "ms_1024": 0.025, "ms_256": 0.104} +{"work": "knapsack", "line": "module-batch.c:845", "ms_1024": 0.039, "ms_256": 0.115} +{"work": "knapsack", "line": "module-batch.c:1075", "ms_1024": 0.048, "ms_256": 0.121} +{"work": "knapsack", "line": "module-batch.c:1101", "ms_1024": 0.038, "ms_256": 0.106} +{"work": "knapsack", "line": "module-batch.c:1715", "ms_1024": 0.042, "ms_256": 0.103} +{"note":"time.c sum0 n=200000 (4M rounds), 21 rounds median, b9 BATCH 1024 then 256","module":"sum0.pmod","n":200000,"ms":8.633,"work":44000019,"out":4000000} +{"note":"time.c sum0 n=200000 (4M rounds), 21 rounds median, b9 BATCH 1024 then 256","module":"sum0.pmod","n":200000,"ms":12.544,"work":44000019,"out":4000000} diff --git a/research/experiments/041-batches/runs.sh b/research/experiments/041-batches/runs.sh index 6f3a4e8..876f249 100755 --- a/research/experiments/041-batches/runs.sh +++ b/research/experiments/041-batches/runs.sh @@ -47,4 +47,8 @@ esac # 2026-10-08-lanes.jsonl (research 132): b9's code with BATCH 1024, 512 and # 256 (core/module-batch.c's enum), suite-run 5 rounds twice (ms: the two # medians) and costs/time.c's sum0, ops0 and nest under icount 3 rounds: -# a batch's fixed cost is (the instructions' difference) / (the batches'). +# a batch's fixed cost is (the instructions' difference) / (the batches'), +# icount's 3 rounds counted: 3,000 and 12,000 batches for sum0 and ops0. +# 2026-10-08-batch-costs.jsonl (design 025): knapsack's time a round by +# function and line, b9's code at BATCH 1024 and 256 under a 2 kHz sampled +# profile (ms by the in-process C's samples); sum0's times at both. |
