From e5a620916c8f13a5a22d24b7fd5a802139bf575f Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 19 Oct 2026 06:15:12 +0100 Subject: A message's rows read by position where they are, not from a copy of them: input.rows[k] made the rows a list value (LIST_VALUE copies every row) and read the copy, so each read cost the rows' count (140's box layout: 99,067 ns a node, 4,737 now, the answers the same); rows_at in make check (a literal, a computed and a looped position, through a let and a fn's argument, past the last failing the event); no other module of aup's, Pure's or Vega's changes --- compiler/compile.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler') diff --git a/compiler/compile.c b/compiler/compile.c index 0fcaa1b..5c88b97 100644 --- a/compiler/compile.c +++ b/compiler/compile.c @@ -3738,6 +3738,11 @@ static Kind value(Compiler *c, const Expr *e, bool handler, int height) { return field_value(r, field); } case E_INDEX: { + int given = e->count == 2 ? rows_list(c, e->args[0]) : -1; + if (given >= 0) { /* a message's rows' item at a position: read where they are, not from a copy of them */ + item_of(c, e->args[1], handler, height, given); + return item_value(c, e, given); + } Kind base = value(c, e->args[0], handler, height); if (base.type == LIST && e->count == 2) { /* a list value's item at a position */ int reg = bind_list(c, e, base); -- cgit v1.2.3