Module compact

Module compact 

Source
Expand description

Compact data structures for 8KB WASM cores

Optimized for agentic chip with 256 cores × 8KB each. Total budget: ~8KB per core for complete min-cut state.

Structs§

BitSet256
Bit-packed membership set (256 vertices = 32 bytes) Much smaller than RoaringBitmap for small vertex counts
BitSet256Iter
CompactAdjacency
Compact adjacency list (fixed size, ~2KB)
CompactCoreState
Memory budget breakdown for 8KB core:
CompactEdge
Compact edge representation (8 bytes)
CompactWitness
Compact witness (40 bytes total)
CoreResult
Result communicated back from core (16 bytes)

Constants§

MAX_EDGES_PER_CORE
Maximum edges per core (reduced to fit in 8KB total) Budget breakdown:
MAX_VERTICES_PER_CORE
Maximum vertices per core (fits in 8KB budget)

Type Aliases§

CompactEdgeId
Compact edge ID (u16)
CompactVertexId
Compact vertex ID (u16 saves 6 bytes vs u64)