Performance
Allocation behavior, benchmark results, and the limits of what they show.
The measured fixed-capacity traversal paths allocate zero managed bytes, including the four-worker paths. At 100,000 entities, [EachBlock] with a plain indexed loop matches a handwritten baseline, and [Each] is about 16% slower. A named query runs at about the speed of [Each].
Dense movement at 100,000 entities
All cases use the same Position and Velocity structs, initial values, and per-row arithmetic, with untracked components. The Vector256 case writes that arithmetic with explicit SIMD. The handwritten baseline has no scheduler. Archevolt’s numbers include schedule dispatch, resource access, lease checks, and query traversal.
| Case | Median (µs) | Median (ns/entity) |
|---|---|---|
| Handwritten | 84.51 | 0.845 |
Generated [Each] |
98.12 | 0.981 |
Generated [EachBlock], indexed loop |
84.46 | 0.845 |
Generated [EachBlock], Vector256 |
20.62 | 0.206 |
Named query, foreach over rows |
84.59 | 0.846 |
Measured on an AMD Ryzen 9 5950X, Windows 11, .NET 11.0.0-rc.2, Release, BenchmarkDotNet 0.16.0-preview.2. Each value is the median of three separate process runs. The named-query row comes from a later run on .NET 11.0.0-rc.3, in which [Each] measured 98.44 µs.
Things that cost
- Structural churn allocates.
- Small workloads can cost more to dispatch in parallel than to run serially.
- Writable access stamps a change on tracked components even when the value is equal.
Reproduce
dotnet run --project benchmarks/Archevolt.Benchmarks -c Release -- --quick
dotnet run --project benchmarks/Archevolt.Benchmarks -c Release -- --filter "*MovementBenchmarks*" --job short
./scripts/measure.ps1 -Mode All
measure.ps1 runs the matrix, BenchmarkDotNet comparison, and JIT disassembly (-Mode Matrix, Bdn, or Disassembly run them separately). It fails if any command fails or BenchmarkDotNet does not execute all comparison cases.
The v1 performance report records the workload matrix, handwritten and Arch comparisons, allocations, native storage, generated code sizes, and JIT and AOT inspection. It predates table storage and .NET 11, so its numbers are not comparable with the table above.