From b81d8bc8249ee35e87ea630413a311460e85eec0 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 5 Oct 2026 17:38:03 +0100 Subject: Text keys (023): a list knows the text field it is keyed by; an event's list keyed by a text is HASHED from its first item, its table's slots holding the texts' hashes (FNV-1a), a match the key cell's bytes too; HAS and a field by key read the table; its order made by a merge sort (the first eight bytes as a number, then all). A FIND whose index only an ITEM_SET of its list takes, the code between in a line finding by key alone, sets the item where it was found (PLAN_ROW: a HASHED list's slot, no position made). words 453 to 217 ms (5.8x C) text_keys_equivalence: adds, has, fields by key, sets where found, positions, runs, removes and clears against a tree keyed by the text --- core/module-run.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/module-run.h') diff --git a/core/module-run.h b/core/module-run.h index 74f188b..fac77a4 100644 --- a/core/module-run.h +++ b/core/module-run.h @@ -6,7 +6,7 @@ #include "module.h" /* An item's or a key's op->plan: its cell a text; a FIND joined to the ITEM_GET after it. */ -enum { PLAN_TEXT = 1, PLAN_JOINED = 2 }; +enum { PLAN_TEXT = 1, PLAN_JOINED = 2, PLAN_ROW = 4 }; /* An item instruction's argument: its list and its field. */ static inline uint32_t list_of(uint32_t arg) { return arg & 0xFFFF; } -- cgit v1.2.3