SwiftCollections.FixedMathSharp
7.1.0
dotnet add package SwiftCollections.FixedMathSharp --version 7.1.0
NuGet\Install-Package SwiftCollections.FixedMathSharp -Version 7.1.0
<PackageReference Include="SwiftCollections.FixedMathSharp" Version="7.1.0" />
<PackageVersion Include="SwiftCollections.FixedMathSharp" Version="7.1.0" />
<PackageReference Include="SwiftCollections.FixedMathSharp" />
paket add SwiftCollections.FixedMathSharp --version 7.1.0
#r "nuget: SwiftCollections.FixedMathSharp, 7.1.0"
#:package SwiftCollections.FixedMathSharp@7.1.0
#addin nuget:?package=SwiftCollections.FixedMathSharp&version=7.1.0
#tool nuget:?package=SwiftCollections.FixedMathSharp&version=7.1.0
SwiftCollections
![]()
Specialized .NET collections for hot paths that need tighter control over storage, allocation, iteration, and spatial queries.
The BCL collections are excellent defaults. SwiftCollections is for the code where profiling says the default is no longer enough: simulation loops, games, spatial indexing, deterministic runtimes, and allocation-sensitive tooling.
Why SwiftCollections?
- Low-allocation lists, queues, stacks, hash tables, buckets, packed sets, sparse sets, and sparse maps.
- Dense iteration and stable or generation-checked handles for entity-style workloads.
- BVH, spatial hash, and octree queries over
System.Numericsvolumes. - Fixed-point query companions powered by FixedMathSharp.
- Explicit state-backed serialization, with Standard and Lean package variants.
- Benchmarks and full reachable coverage enforced as part of the repository workflow.
Install
Choose one package family:
| Need | Package |
|---|---|
| Core collections with MemoryPack | SwiftCollections |
| Core collections without the MemoryPack runtime | SwiftCollections.Lean |
| FixedMathSharp spatial queries with MemoryPack | SwiftCollections.FixedMathSharp |
| FixedMathSharp spatial queries without the MemoryPack runtime | SwiftCollections.FixedMathSharp.Lean |
dotnet add package SwiftCollections
Or install a companion package when you need fixed-point query volumes. NuGet brings in the matching SwiftCollections and FixedMathSharp packages:
dotnet add package SwiftCollections.FixedMathSharp
Use the matching .Lean packages as a pair. Lean keeps the collection APIs but
removes the MemoryPack runtime; it is useful when your application owns its
serialization stack or wants the smaller dependency surface.
A quick taste
SwiftGenerationalBucket<T> gives you dense storage with handles that stop
resolving after their slot is reused:
using System;
using SwiftCollections;
var actors = new SwiftGenerationalBucket<string>();
SwiftHandle player = actors.Add("player");
if (actors.TryGet(player, out string actor))
{
Console.WriteLine(actor);
}
actors.Remove(player);
For externally owned compact integer IDs, start with SwiftSparseSet or
SwiftSparseMap<T>. For broad-phase queries, start with SwiftBVH<TKey>,
SwiftSpatialHash<TKey>, or SwiftOctree<TKey>.
Learn more
- Library overview and container guide
- Core API reference
- Spatial query API
- Coverage report
- Contributing and local validation
Using Unity? The maintained
SwiftCollections-Unity packages
add Unity-serializable adapters, Bounds conversions, GameObject pooling, and
FixedMathSharp integration.
Compatibility
The libraries target netstandard2.1 and net8.0. CI validates Standard and
Lean builds on Windows and Linux.
Questions and discussion are welcome in the Discord community. SwiftCollections is available under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- FixedMathSharp (>= 7.1.0)
- SwiftCollections (>= 7.0.0)
-
net8.0
- FixedMathSharp (>= 7.1.0)
- SwiftCollections (>= 7.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SwiftCollections.FixedMathSharp:
| Package | Downloads |
|---|---|
|
GridForge
A high-performance, deterministic rectangular and hex-prism voxel grid system for spatial partitioning, simulation, and game development. |
|
|
Gravitas
High-performance, engine-agnostic fixed-point physics for deterministic 2D, 3D, and mixed-dimension lockstep games and simulations. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.1.0 | 44 | 8/26/2026 |
| 7.0.0 | 206 | 8/5/2026 |
| 6.0.0 | 180 | 7/1/2026 |
| 5.1.1 | 163 | 6/24/2026 |
| 5.1.0 | 117 | 6/22/2026 |
| 5.0.2 | 203 | 6/20/2026 |
| 5.0.1 | 232 | 6/16/2026 |
| 5.0.0 | 123 | 6/10/2026 |
| 4.1.1 | 120 | 5/30/2026 |
| 4.1.0 | 115 | 5/26/2026 |
| 4.0.5 | 118 | 5/19/2026 |
| 4.0.4 | 117 | 5/10/2026 |
| 4.0.3 | 114 | 5/7/2026 |
| 4.0.2 | 119 | 5/3/2026 |
| 4.0.0 | 116 | 4/16/2026 |