SPECIALIZED COLLECTIONS FOR .NET HOT PATHS

Put your data where the work is.

SwiftCollections gives simulations, games, spatial systems, and allocation-sensitive tools tighter control over storage, dense iteration, handles, pooling, and broad-phase queries.

Start with the workload

Compact integer IDs

Use sparse sets and maps for constant-time lookup plus dense iteration when your system already owns small non-negative IDs.

Stable handles

Use buckets for reusable slots, or generation-checked buckets when stale references must stop resolving after a slot is reused.

Spatial queries

Choose BVH, spatial hash, or octree structures for broad-phase searches over floating-point or FixedMathSharp-backed bounds.

Pick a package family

Standard

SwiftCollections includes the core collections and MemoryPack support.

Lean

SwiftCollections.Lean keeps the collection APIs without the MemoryPack runtime dependency.

FixedMathSharp

Add the matching SwiftCollections.FixedMathSharp companion for deterministic fixed-point query volumes.

Unity packages

Use the maintained Unity host for serializable authoring adapters, Bounds conversion, GameObject pooling, and samples.

Resources

The API reference is generated from the source XML documentation. The overview explains tradeoffs, ID density constraints, serialization state, spatial query semantics, and the development workflow.