Repository navigation
Commit 4ccaf8f
committed
datalog: a match env is a list of bindings, not a balanced map
A rule binds a few variables, and a join extends an env once per bound column of each candidate row: the IMap path
copy and rebalance per binding was most of a solve (callgrind of s2c --mem: Coll.balance + Coll.insert on D.Val
4.4 G of 7.2 G Ir). A binding is now consed onto a list and found by a scan. s2c compiling itself 540.9M ->
529.2M instructions:u (-2.2%); s2c --mem on itself 7.45G -> 3.66G (-51%); emitted C and --mem output identical.1 parent 5d7e9e8 commit 4ccaf8f
2 files changed
Lines changed: 90 additions & 91 deletions
0 commit comments