aboutsummaryrefslogtreecommitdiffstats
path: root/core/module-jit.c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-05 13:24:59 +0100
committereunhhu <[email protected]>2026-10-05 13:24:59 +0100
commit6b4580607efa698abdc07718f00c6cbdb425c210 (patch)
tree0cad9cddfd332140ecce47d17e439573f32ea11e /core/module-jit.c
parent5a3466e8ff4d8f3c4271719b90858b7d08697dcd (diff)
downloadpure-6b4580607efa698abdc07718f00c6cbdb425c210.tar.gz
pure-6b4580607efa698abdc07718f00c6cbdb425c210.zip
Research 124's suite: seven kinds of work in one event each (roots, knapsack, sort, join, words, matmul, BFS), each against the C one would write, in one process with the same inputs and answers; PURE_AHEAD=0 to measure the code without reading ahead
Diffstat (limited to 'core/module-jit.c')
-rw-r--r--core/module-jit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/module-jit.c b/core/module-jit.c
index 140d9b4..415f1ff 100644
--- a/core/module-jit.c
+++ b/core/module-jit.c
@@ -2472,6 +2472,8 @@ static bool has_round(const Ahead *a, int n) {
static void plan_ahead(Block *k, unsigned li) {
const PureModule *m = k->m;
LoopAt *l = &k->loops[li];
+ const char *ahead = getenv("PURE_AHEAD"); /* 0: none (measuring what the code costs without it, research 124) */
+ if (ahead && !strcmp(ahead, "0")) return;
if (!l->walk && m->code[l->at].arg & PURE_LOOP_INTEGER) return;
Ahead a = {0};
int stack[PURE_MODULE_STACK + 2], local[PURE_MODULE_LOCALS];