aboutsummaryrefslogtreecommitdiff
path: root/src/kompsos.ads
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2026-01-24 01:11:17 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2026-01-24 01:11:17 +1300
commit7b201fc0587e8012189f7b1f245734e117e4975c (patch)
tree8201d7ccea0d6cf4a809614e8e7b4c818f3af79b /src/kompsos.ads
parent28d132c2823d7dfa21190bf746f9f39dd59a40d8 (diff)
Unrolled linked lists for StateHEADmaster
Diffstat (limited to 'src/kompsos.ads')
-rw-r--r--src/kompsos.ads18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/kompsos.ads b/src/kompsos.ads
index d1e19be..b8629fb 100644
--- a/src/kompsos.ads
+++ b/src/kompsos.ads
@@ -459,11 +459,23 @@ private
+ type Binding is record
+ Key : Variable;
+ Value : Term;
+ end record;
+
+ type Binding_Array is array (Positive range <>) of Binding;
+
+ -- Values of 2, 3, 4 here are honestly fairly similar, but of those, 4 seems to work best
+ Unroll_Max : constant Integer := 4;
+
+ subtype Valid_Count is Integer range 1 .. Unroll_Max;
+
type State_Component is limited record
Counter : Natural;
- Key : Variable;
- Value : Term;
- Next : aliased State;
+ Valid : Valid_Count;
+ Data : Binding_Array (Valid_Count'Range);
+ Next : State;
end record;
type State_Component_Access is access State_Component;