+The biggest remaining lever is **Lever B: a flat, interned atom core**, modeled on MORK's actual representation (`/home/user/Dev/mork-latest-linalg/kernel`, `mork::__mork_expr`): expressions encoded as a contiguous byte/int sequence with `Arity(n)` / `SymbolSize(k)+bytes` / `NewVar` / `VarRef(i)` tags, symbols interned to ids, stored in a PathMap radix trie. The payoff is large — `atomEq` becomes a byte compare, traversal is a cache-friendly linear scan, allocation collapses, and `getTypes`/match results become memoizable by id. The current profile's top costs (`mettaEval` allocation, `getTypes`, Map lookups) are exactly what it targets.
0 commit comments