Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 115 to 116

Compare

+12 −1 in 3 places
Lines 95–103 at 116 (were 95–100 at 115)
9595 /** The set, made from #in the first time it's asked for: a view keeps a byte per atom, not a copy of the set (#46). */
9696 #set: AtomSet | undefined;
9797 readonly #stable: StableSet<AtomId> | undefined;
98+ /** Fixed-size memo for immutable indexed membership, independent of history size. */
99+ #membershipSeq = new Float64Array(256).fill(-1);
100+ #membershipValue = new Uint8Array(256);
98101 #files = new Map<string, FileState>();
99102 /** Every file the set wrote in, sorted; worked out the first time it's asked for. */
100103 #knownList: string[] | undefined;
Lines 168–181 at 116 (were 165–171 at 115)
165168
166169 /** Whether the atom with this seq is in the set. */
167170 #has(seq: number): boolean {
168− if (this.#stable) return this.#stable.has(this.graph.idOfSeq(seq));
171+ if (this.#stable) {
172+ const slot = seq % this.#membershipSeq.length;
173+ if (this.#membershipSeq[slot] === seq) return this.#membershipValue[slot] === 1;
174+ const present = this.#stable.has(this.graph.idOfSeq(seq));
175+ this.#membershipSeq[slot] = seq;
176+ this.#membershipValue[slot] = present ? 1 : 0;
177+ return present;
178+ }
169179 return seq < this.#in.length && this.#in[seq] === 1;
170180 }
171181
Lines 508–514 at 116 (were 498–503 at 115)
498508 */
499509 weight(): number {
500510 let n = this.#in.byteLength;
511+ n += 2 * ARRAY_HEADER_BYTES + this.#membershipSeq.byteLength + this.#membershipValue.byteLength;
501512 n += ARRAY_HEADER_BYTES + REFERENCE_BYTES * this.#movers.length;
502513 n += MAP_HEADER_BYTES; // #files exists from construction.
503514 n += MAP_HEADER_BYTES; // #fileOf exists from construction.
MCP
compare on this site's /mcp
CLI
abso diff 115 116 src/engine/view.ts --json
JSON
/christopher/abso-core/compare/115..116?file=src%2Fengine%2Fview.ts&format=json