aboutsummaryrefslogtreecommitdiffstats
path: root/core/module-list.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 07:59:15 +0100
committereunhhu <[email protected]>2026-10-19 07:59:15 +0100
commit1c1133ce8258dad367aad3b7c8eee0083aecf772 (patch)
treec939ae2e9ba6a2a220f1633fef107f9514ebb55b /core/module-list.h
parentf1bb9de4ac72136a1b0722ce77ac4ea6fd4fa413 (diff)
downloadpure-1c1133ce8258dad367aad3b7c8eee0083aecf772.tar.gz
pure-1c1133ce8258dad367aad3b7c8eee0083aecf772.zip
A list value of numbers copied whole (140's LIST_VALUE review, no new opcode, no change to what a module means): nest() made every list value item by item into a new tree (64 ns an item, 250 ns a copy fixed); an event's list in FLAT arrays, not keyed, its cells numbers, bools and integers, is now copied column by column (pure_list_copied: 600 items 38,268 to 985 ns, 60 items 3,926 to 324); UAX #14's nine lists a line 6,917 to 6,445 ns a code point (-6.8%, the same instructions); JSON tree's, HTTP's and inflate's (trees: texts or lists in their records, or few) as they were; copied_lists in test-module (random lists against item by item, then each changed apart; trees, keys and texts not copied so)
Diffstat (limited to 'core/module-list.h')
-rw-r--r--core/module-list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/module-list.h b/core/module-list.h
index 13c2550..98fd5d7 100644
--- a/core/module-list.h
+++ b/core/module-list.h
@@ -214,6 +214,10 @@ bool pure_list_takes(const PureList *, int key, size_t n, const double *keys, si
size_t pure_list_add_many(PureList *, size_t n, const double *const *fields);
/* What it keeps its items in now: 0 a tree, 1 FLAT arrays, 2 DENSE (for tests and counts). */
unsigned pure_list_form(const PureList *);
+/* A new event's list with the items of one in FLAT arrays, not keyed, its cells numbers, bools and integers: its
+ * columns copied whole (what inserting its items one by one into a new list gives, in its form). NULL for any other
+ * list (copy it item by item) or without memory. */
+PureList *pure_list_copied(const PureList *);
/* Field of the item whose key_field is key, in a list ordered by key_field
* (seek, then get, as one: a DENSE list reads it at its key); false when no
* item has key. */