Comparison with other ECS libraries
Which C# ECS is fastest? EasyEcs against Friflo.Engine.ECS, Arch and DefaultEcs, feature by feature: every benchmark sorted by lead, losses explained.
Which C# ECS is fastest depends on the work. EasyEcs is measured against Friflo.Engine.ECS, Arch and DefaultEcs in 37 head-to-head benchmarks: it is faster in 24, within the measurement error in 11 and slower in 2. The biggest leads are in the work a server does in bulk or now and then (saving, bulk changes, spawning, value queries, hierarchies, indexes, change detection); plain iteration over dense columns is close, because there the loop is bound by memory, not by the library. This page lists every result, sorted by lead, losses included and explained.
Head-to-head benchmarks EasyEcs is faster in
24/ 37Save 10,000 entities and load them back, vs DefaultEcs
30×fasterAdd a component to 100,000 entities by query, then remove it, vs Arch
15×fasterSpawn 10,000 entities beside 100,000, then destroy them, vs Friflo.Engine.ECS
2.75×fasterFeature by feature: how many times longer the next-fastest library takes
Each comparison does the same work in Friflo.Engine.ECS, Arch and DefaultEcs, each library's own idiomatic way, with identical results checked in setup. A bar is the fastest other library's time over EasyEcs' time (log scale).
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| What is measured | EasyEcs | Next fastest | vs EasyEcs |
|---|---|---|---|
| Save 10,000 entities and load them back | 146 μs | DefaultEcs 4.33 ms | 30× |
| Add a component to 100,000 entities by query, then remove it | 78.7 μs | Arch 1.21 ms | 15× |
| Spawn 10,000 entities beside 100,000, then destroy them | 138 μs | Friflo.Engine.ECS 380 μs | 2.75× |
| Query 100,000 players by value: a rating range, zone sums | 127 μs | Friflo.Engine.ECS 317 μs | 2.49× |
| Create 1,000 parent-child squads, destroy them in cascade | 452 μs | Friflo.Engine.ECS 1.06 ms | 2.35× |
| Count 100 inventories through an index (1 item traded) | 425 ns | DefaultEcs 838 ns | 1.97× |
| Add a status component to 5% of 100,000 entities, then remove it | 517 μs | Friflo.Engine.ECS 1.00 ms | 1.94× |
| Find the 10 of 100,000 entities written this tick | 507 ns | Arch 966 ns | 1.91× |
| Spawn 5,000 entities from a prefab, then destroy them | 164 μs | Friflo.Engine.ECS 276 μs | 1.68× |
| Create 100,000 three-component entities one by one in a fresh world, room reserved first | 2.60 ms | Arch 4.21 ms | 1.62× |
| Iterate one component over 100,000 entities | 37.7 μs | Friflo.Engine.ECS 59.9 μs | 1.59× |
| Put 10,000 of 100,000 entities to sleep, wake the last ones | 478 μs | DefaultEcs 745 μs | 1.56× |
| Create 100,000 three-component entities in a fresh world in one call (the others' fastest way) | 2.71 ms | Arch 4.21 ms | 1.56× |
| Count 100 inventories through an index (100 items traded) | 5.11 μs | DefaultEcs 7.87 μs | 1.54× |
| Iterate with a filter: the players among 100,000 entities | 11.3 μs | Friflo.Engine.ECS 16.6 μs | 1.46× |
| Find the 1,000 of 100,000 entities written this tick | 38.5 μs | Friflo.Engine.ECS 53.7 μs | 1.40× |
| Iterate with the entity handle of each row | 49.0 μs | Friflo.Engine.ECS 67.2 μs | 1.37× |
EasyEcs is measured against the three most used .NET ECS libraries: Friflo.Engine.ECS,
Arch and DefaultEcs, at the versions
pinned in benchmarks/EasyEcs.Comparison
(the chart labels name them). Every comparison ports the same work to each library through the path its docs
recommend, and checks in setup that every library computes the same result before anything is measured. This page
is the overview; the head-to-head pages (Arch, Friflo,
DefaultEcs) map the APIs side by side.
Feature by feature
Each row is one comparison: what it measures (linked to its section below), the time of EasyEcs, and the time of the fastest other library as a multiple of it, so 2× means that library takes twice as long. A library missing from a row has no such feature in its core package, or is not part of that comparison: the single operations run against Friflo only, the closest library on the full tick. The rows are sorted by the data, the biggest lead first, and a ratio marked "within error" is closer than the two rows' measurement errors added up.
Clear leads
The fastest other library takes at least 1.25 times as long as EasyEcs.
| What is measured | EasyEcs | Next fastest | Its time vs EasyEcs | The others |
|---|---|---|---|---|
| Save 10,000 entities and load them back | 146 μs | DefaultEcs 4.33 ms, 4.37 MB allocated | 30× | Friflo.Engine.ECS 143×, 6.52 MB allocated |
| Add a component to 100,000 entities by query, then remove it | 78.7 μs | Arch 1.21 ms | 15× | DefaultEcs 103×; Friflo.Engine.ECS 154×, 4.00 MB allocated |
| Spawn 10,000 entities beside 100,000, then destroy them | 138 μs | Friflo.Engine.ECS 380 μs | 2.75× | Arch 2.96×; DefaultEcs 9.7×, 313 KB allocated |
| Query 100,000 players by value: a rating range, zone sums | 127 μs | Friflo.Engine.ECS 317 μs | 2.49× | — |
| Create 1,000 parent-child squads, destroy them in cascade | 452 μs | Friflo.Engine.ECS 1.06 ms | 2.35× | — |
| Count 100 inventories through an index (1 item traded) | 425 ns | DefaultEcs 838 ns | 1.97× | Friflo.Engine.ECS 3.2× |
| Add a status component to 5% of 100,000 entities, then remove it | 517 μs | Friflo.Engine.ECS 1.00 ms | 1.94× | — |
| Find the 10 of 100,000 entities written this tick | 507 ns | Arch 966 ns | 1.91× | Friflo.Engine.ECS 2.85×; DefaultEcs 73× |
| Spawn 5,000 entities from a prefab, then destroy them | 164 μs | Friflo.Engine.ECS 276 μs | 1.68× | — |
| Create 100,000 three-component entities one by one in a fresh world, room reserved first | 2.60 ms, 3.44 MB allocated | Arch 4.21 ms, 4.62 MB allocated | 1.62× | Friflo.Engine.ECS 4.7×, 4.30 MB allocated |
| Iterate one component over 100,000 entities | 37.7 μs | Friflo.Engine.ECS 59.9 μs | 1.59× | — |
| Put 10,000 of 100,000 entities to sleep, wake the last ones | 478 μs | DefaultEcs 745 μs | 1.56× | Friflo.Engine.ECS 1.67×; Arch 2.63× |
| Create 100,000 three-component entities in a fresh world in one call (the others' fastest way) | 2.71 ms, 4.96 MB allocated | Arch 4.21 ms, 4.62 MB allocated | 1.56× | Friflo.Engine.ECS 4.5×, 4.30 MB allocated; DefaultEcs 6.3×, 19.1 MB allocated |
| Count 100 inventories through an index (100 items traded) | 5.11 μs | DefaultEcs 7.87 μs | 1.54× | Friflo.Engine.ECS 1.63× |
| Iterate with a filter: the players among 100,000 entities | 11.3 μs | Friflo.Engine.ECS 16.6 μs | 1.46× | — |
| Find the 1,000 of 100,000 entities written this tick | 38.5 μs | Friflo.Engine.ECS 53.7 μs | 1.40× | DefaultEcs 2.01×; Arch 2.18× |
| Iterate with the entity handle of each row | 49.0 μs | Friflo.Engine.ECS 67.2 μs | 1.37× | — |
Close
EasyEcs ahead by less than that; the full server tick is one of these rows.
| What is measured | EasyEcs | Next fastest | Its time vs EasyEcs | The others |
|---|---|---|---|---|
| Four independent systems over 100,000 entities, one after another | 395 μs | DefaultEcs 471 μs | 1.19× | — |
| Rewire 100 of 10,000 friend lists, walk 100 follower sets | 22.0 μs | Friflo.Engine.ECS 26.1 μs | 1.19× | — |
| Move 100,000 entities with SIMD over spans | 69.5 μs | Friflo.Engine.ECS 80.7 μs | 1.16× | — |
| Create 5,000 entities one by one, then destroy them | 190 μs | Friflo.Engine.ECS 215 μs | 1.13× | — |
| Add and remove a tag in the passes that find them (1,000 of 100,000) | 163 μs | Friflo.Engine.ECS 183 μs | 1.12× | Arch 6.9×, 448 KB allocated; DefaultEcs 79× |
| Put 100 of 100,000 entities to sleep, wake the last ones | 41.4 μs | Friflo.Engine.ECS 45.9 μs | 1.11× | Arch 2.00×; DefaultEcs 2.48× |
| Four independent systems over 100,000 entities, in parallel | 370 μs | DefaultEcs 405 μs | 1.09× (within error) | — |
| The full server tick: nine systems over 100,000 entities | 1.68 ms | Friflo.Engine.ECS 1.83 ms | 1.08× | Arch 3.4×, 535 KB allocated; DefaultEcs 3.7×, 60.9 KB allocated |
| Find the 1,000 of 100,000 entities that lost a component | 66.7 μs | Friflo.Engine.ECS 71.7 μs | 1.08× (within error) | DefaultEcs 1.61×; Arch 2.58× |
| The full server tick: nine systems over 10,000 entities | 175 μs | Friflo.Engine.ECS 183 μs | 1.05× (within error) | DefaultEcs 1.76×, 6.15 KB allocated; Arch 2.76×, 65.9 KB allocated |
| Iterate two components and a singleton | 212 μs | Friflo.Engine.ECS 222 μs | 1.05× (within error) | — |
| Scan 100,000 entities for the 10 written, without a change filter | 38.2 μs | Friflo.Engine.ECS 39.9 μs | 1.04× (within error) | Arch 2.40× |
| Move 100,000 entities: two components, per entity | 253 μs | Friflo.Engine.ECS 257 μs | 1.02× (within error) | — |
Where another library is faster
Each with the reason, read from the benchmark's source.
| What is measured | EasyEcs | Faster library | Its time vs EasyEcs | Why |
|---|---|---|---|---|
| Iterate three components over 100,000 entities | 71.0 μs | Friflo.Engine.ECS 70.7 μs | 0.99× (within error) | The same span loop over the same dense columns in both libraries: the loop is bound by memory, not by the library. |
| Add and remove a tag in the passes that find them (10 of 100,000) | 78.2 μs | Friflo.Engine.ECS 75.4 μs | 0.96× (within error) | Friflo defers the changes to its command buffer, so both of its passes are plain span loops. A [ForEach] that may change structure checks after every row that its table did not move, and over 100,000 rows that costs more than 10 deferred changes; from about 1,000 changes on, applying them at once is faster. |
| Iterate in batches, reading entity ids only where needed | 38.5 μs | Friflo.Engine.ECS 37.0 μs | 0.96× (within error) | The same loop over the same rows: Friflo's is written inline in the benchmark, EasyEcs' is generated from a batch [ForEach] method and runs as a system group. |
| Steer 100,000 agents on all cores (parallel query) | 766 μs | Arch 685 μs | 0.89× (within error) | Arch's and Friflo's runners keep worker threads of their own, which win when passes run back to back, as BenchmarkDotNet runs them. EasyEcs wakes thread-pool helpers only while they pay: in a real server tick a dedicated crew measured worse tail latency and more CPU per tick (D22). |
| Scan 100,000 entities for the 1,000 written, without a change filter | 61.4 μs | Friflo.Engine.ECS 53.7 μs | 0.88× | Not the way to do it in EasyEcs: the component is ITrackChanges, so each of the 1,000 writes also stamps its row's change tick, which [Changed<T>] needs and the scan ignores; Friflo's component is not tracked. [Changed<T>] does the same job faster than every library's scan. |
| Find the 10 of 100,000 entities that lost a component | 830 ns | Friflo.Engine.ECS 697 ns | 0.84× (within error) | Friflo's OnComponentRemoved event pushes each id into a list you keep as the removal happens, a cost per removal; [Removed<T>] finds the removals through per-block summaries, a fixed cost per pass that 10 removals do not cover. From 1,000 removals on, EasyEcs leads, with no subscription to write. |
| Create 100,000 three-component entities one by one in a fresh world, nothing reserved | 7.13 ms, 8.97 MB allocated | Arch 4.77 ms, 4.84 MB allocated | 0.67× | A fresh EasyEcs world grows its table and entity storage by doubling, and the arrays past 85,000 bytes land on the large object heap; together they pass the budget that sets off a full collection, once per new world (D28). Arch keeps entities in 16 KB chunks, which never reach that heap. Reserve the table with EnsureCapacity<T1..Tn>(count) or create the entities with CreateEntities, and EasyEcs is the fastest of the four. |
EasyEcs also does not run on Unity or runtimes older than .NET 10; the other three do.
Features
From each package's public API and the comparison ports, which compile against the real packages.
| Feature | EasyEcs | Friflo.Engine.ECS | Arch | DefaultEcs |
|---|---|---|---|---|
| Storage | archetype tables, presence bits per column | archetypes | archetypes in chunks | a pool per component type |
| Structural changes inside a query loop | ✅ immediate, each entity visited once | ❌ throws StructuralChangeException; CommandBuffer | ⚠️ not guarded; CommandBuffer | ⚠️ useBuffer sets or EntityCommandRecorder |
| Tags | ✅ empty components; removing one flips a bit | ✅ ITag (part of the archetype) | ⚠️ empty structs, moved like any component | ❌ |
| Singletons | ✅ ISingletonComponent, [ForEach] parameters | ⚠️ UniqueEntity | ❌ | ✅ World.Set<T> / Get<T> |
| Systems, ordering, groups | ✅ EcsSystem, [UpdateBefore<T>] / [UpdateAfter<T>], ISystemGroup, UpdateInterval | ✅ SystemRoot, SystemGroup, QuerySystem | ❌ in core (Arch.Extended) | ✅ ISystem<T>, SequentialSystem, AEntitySetSystem |
| Source-generated systems | ✅ [ForEach] → inlined struct jobs | ❌ | ❌ in core | ❌ |
| Generated named API per component | ✅ e.Position, HasX, SetX(...), IsDead, world.Battle | ❌ | ❌ | ❌ |
| Compile-time analyzer | ✅ EECS002-EECS034, with code fixes | ❌ | ❌ | ❌ |
| Chunk / span iteration | ✅ batch [ForEach] methods, ForEachBatch | ✅ Chunks | ✅ chunks | ✅ ReadOnlySpan<Entity> per system |
| Struct query jobs | ✅ IForEach, IForEachEntity, IForEachBatch | ✅ | ✅ IForEach, InlineQuery | – |
| Bulk changes | ✅ SetAll, RemoveAll, DisableAll, EnableAll | ✅ EntityBatch, ApplyBatch | ✅ add / remove by query | ❌ |
| Bulk create and destroy | ✅ CreateEntities, DestroyEntities(filter), Instantiate(prefab, span) | ⚠️ CreateEntityBatch; delete per entity | ⚠️ destroy by query | ❌ |
| Reserve a table before creating into it | ✅ EnsureCapacity<T1, …, Tn>(n) | ✅ EnsureCapacity on the store and the archetype | ✅ EnsureCapacity(signature, n) | – |
| Prefabs | ✅ Prefab: data outside every world | ⚠️ an entity of the store, copied with CloneEntity | ❌ | ⚠️ an entity copied with CopyTo(world) |
| Change tracking (rows written since a tick) | ✅ ITrackChanges, [Changed<T>], every ref write | ❌ | ❌ (events) | ✅ WhenChanged<T>() after NotifyChanged<T>() |
| Removal detection | ✅ [Removed<T>] | ⚠️ OnComponentRemoved events | ⚠️ SubscribeComponentRemoved events | ✅ WhenRemoved<T>() sets |
| Value index | ✅ IIndexed<TKey>, ordered walks and ranges | ✅ IIndexedComponent<TKey>, ranges | ❌ | ✅ EntityMap, EntityMultiMap |
| Tables split by a value | ✅ GroupBy<T> (IGroup) | – | – | – |
| Relations with reverse lookup | ✅ indexed EntityId, multi-target IRelation | ✅ ILinkComponent, ILinkRelation | ❌ in core | ❌ |
| Hierarchy | ✅ ChildOf, Children, cascading destroy | ✅ AddChild, ChildEntities | ❌ | ❌ |
| Disable a component, keep its value | ✅ Disable<T>() / Enable<T>() | ⚠️ whole entity (Enabled) | ❌ | ⚠️ whole entity, or a component (Disable<T>()) |
| Parallel systems | ✅ conflict-free stages from generated access | ❌ | ❌ | ✅ ParallelSystem<T> (you keep them independent) |
| Parallel query | ✅ [ForEach(Parallel = true)], analyzer-checked | ✅ QueryJob, ParallelJobRunner | ✅ InlineParallelQuery, JobScheduler | ✅ DefaultParallelRunner |
| Snapshots in memory | ✅ Capture / Restore | ❌ | ❌ | ❌ |
| Saves | ✅ binary Save / Load (Nino) | ✅ JSON | ❌ in core (Arch.Persistence) | ✅ text and binary |
| Move entities to another world | ✅ MoveEntities, SaveEntities / LoadEntities | ✅ CopyEntity | ❌ | ✅ CopyTo(world) |
| Unload a plugin's types | ✅ RemoveTypes(assembly) | – | – | – |
| Per-system timing and error policy | ✅ MeasureSystems, SystemErrorPolicy.Disable | ✅ SystemPerf | ❌ | – |
| Events (added, removed, created) | – (state changes are data) | ✅ | ✅ | ✅ |
| Zero allocation per server tick | ✅ | ✅ | ❌ | ❌ |
| Native AOT | ✅ (IsAotCompatible) | – | – | – |
| Target frameworks | net10.0 | netstandard2.1, net6.0-8.0 | netstandard2.1, net6.0, net8.0 | netstandard1.1-2.1 |
| Unity | ❌ | ✅ | ✅ | ✅ |
✅ built in · ⚠️ partly or with caveats · ❌ not available · – not applicable or not checked
How changes are made
The biggest difference is not speed but how a system changes the world. Friflo, Arch and DefaultEcs forbid (or do not guard) structural changes while a query iterates, so a system records them in a command buffer that is played back later: until then the entity still has its old components, and the order of effects depends on when buffers are flushed. EasyEcs applies every change at once, also in the middle of a pass over the same table, and still visits each entity at most once:
public class DeathSystem : EcsSystem
{
[ForEach, Without<Dead>]
static void Die(Entity unit, in Health hp)
{
if (hp.Value <= 0) unit.SetDead(); // applied now: later systems already see the corpse
}
}The ports follow each library's model (Friflo and Arch play their command buffer back after every system that records changes), so the measured worlds behave the same. How EasyEcs makes immediate changes cheap is on Why EasyEcs is fast.
The same server tick
A whole tick mixes every kind of work, so it shows what a real server gets, and it is closer than the single
features: most of its time is iteration, where the loop is bound by memory. EcsComparisonBenchmark runs the headline world of EasyEcs (30% players, 70% NPCs, projectiles; movement, area of
interest, combat, status effects, death, respawn, shooting) in each library, single-threaded. The EasyEcs side is
benchmarks/EasyEcs.Benchmark/WorldSimulation.cs compiled unchanged; the others are ArchSimulation.cs,
FrifloSimulation.cs and DefaultEcsSimulation.cs. Setup warms every world up for 200 ticks and checks that its
counters (hits, deaths, spawns, area changes, entities) match an EasyEcs reference run within 5%: they cannot match
exactly, because entity ids feed the random rolls and each library recycles ids in its own order.
One server tick of 100,000 entities: EasyEcs vs Friflo, Arch and DefaultEcs
The same simulation ported to each library's fast path, with identical results checked in setup. Shorter is faster; the badge is the time relative to EasyEcs and the memory allocated per tick.
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Time | vs EasyEcs | Allocated |
|---|---|---|---|
| EasyEcs 4.6 | 1.68 ms | 1.00× | 0 B |
| Friflo.Engine.ECS 3.6 | 1.83 ms | 1.08× | 0 B |
| Arch 2.1 | 5.76 ms | 3.4× | 535 KB |
| DefaultEcs 0.17 | 6.24 ms | 3.7× | 60.9 KB |
EasyEcs and Friflo are close on this tick (Friflo takes 1.08× the time of EasyEcs at 100,000 entities, 1.06× at 10,000; the lead has changed between runs), and both allocate nothing per tick. Arch and DefaultEcs take 3.4× and 3.7× the time and allocate every tick (535 KB and 60.9 KB), mostly in their command buffers and entity sets. EasyEcs gains in the systems that add, remove and destroy (presence bits, no command buffer) and in those that pass the entity to the job.
Operations
OperationBenchmark isolates single operations of that world (100,000 entities), EasyEcs against Friflo, the closest
peer on the tick. Every operation leaves the world as it found it.
Single operations, 100,000 entities: EasyEcs and Friflo.Engine.ECS
- EasyEcs
- Friflo.Engine.ECS
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Iterate1 | 37.7 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Iterate1 | 59.9 μs | 1.59× | 0 B |
| EasyEcs | Iterate2 | 253 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Iterate2 | 257 μs | 1.02× | 0 B |
| EasyEcs | Iterate2Simd | 69.5 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Iterate2Simd | 80.7 μs | 1.16× | 0 B |
| EasyEcs | Iterate3 | 71.0 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Iterate3 | 70.7 μs | 0.99× | 0 B |
| EasyEcs | With | 11.3 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | With | 16.6 μs | 1.46× | 0 B |
| EasyEcs | Entity | 49.0 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Entity | 67.2 μs | 1.37× | 0 B |
| EasyEcs | EntityBatch | 38.5 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | EntityBatch | 37.0 μs | 0.96× | 0 B |
| EasyEcs | Singleton | 212 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Singleton | 222 μs | 1.05× | 0 B |
| EasyEcs | Toggle | 517 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Toggle | 1.00 ms | 1.94× | 0 B |
| EasyEcs | CreateDestroy | 190 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | CreateDestroy | 215 μs | 1.13× | 0 B |
| EasyEcs | Instantiate | 164 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Instantiate | 276 μs | 1.68× | 0 B |
- Toggle (stun 5% of the fighters, then recover them) is where presence bits pay: EasyEcs flips a bit and the entity keeps its row; Friflo moves it to another archetype and back through its command buffer.
- Instantiate spawns 5,000 NPCs of six components: EasyEcs copies a
Prefab's row into consecutive rows at once, Friflo clones an entity of the store one by one (CloneEntity). - Entity: a per-entity job receives a handle built from the row's 8-byte
EntityId; Friflo'sForEachEntitycalls a delegate per entity. - Ties: two- and three-component iteration (
Iterate2,Iterate3) and batched entity access (EntityBatch) come out even. Both libraries walk dense arrays there, and the loop is bound by memory, not by the library.
Change tracking
ChangeTrackingComparison: 100,000 entities, 10 (a quiet tick) or 1,000 of them get a new health per tick, and a
system copies the changed healths into a replica. Each library uses its built-in feature where it has one (EasyEcs
[Changed<T>], DefaultEcs WhenChanged<T>() fed by NotifyChanged<T>()), else a scan comparing values or a dirty
tag added on write and removed after the copy.
Replicate the 10 of 100,000 entities written this tick
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Changed | 507 ns | 1.00× | 0 B |
| EasyEcs | Scan | 38.2 μs | 75× | 0 B |
| DefaultEcs | WhenChanged | 37.1 μs | 73× | 0 B |
| Friflo.Engine.ECS | Scan | 39.9 μs | 79× | 0 B |
| Friflo.Engine.ECS | DirtyTag | 1.44 μs | 2.85× | 0 B |
| Arch | Scan | 91.9 μs | 181× | 0 B |
| Arch | DirtyTag | 966 ns | 1.91× | 0 B |
[Changed<T>] leads at both rates and needs no code at the write site: a write through ref is the change. A
dirty tag is cheap when few entities change, but it moves each written entity between archetypes twice, so it falls
behind a plain scan at 1,000 writes. A scan costs the whole table every tick, and WhenChanged<T>() needs a
NotifyChanged<T>() next to every write. How the skipping works: change-tick summaries.
Removal detection
RemovalComparison: 100,000 entities with a buff; per tick 10 or 1,000 buffs expire and the ones that expired the
tick before come back, then every entity that lost its buff since the last tick is visited once. EasyEcs uses
[Removed<T>], DefaultEcs a WhenRemoved<T>() set completed after each tick, Friflo its OnComponentRemoved event
collecting the ids, Arch a Lost tag added next to each removal. Setup checks that every removal is sent exactly
once.
Send the 10 of 100,000 buffs that expired
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Removed | 830 ns | 1.00× | 0 B |
| DefaultEcs | WhenRemoved | 39.6 μs | 48× | 0 B |
| Friflo.Engine.ECS | Event | 697 ns | 0.84× | 0 B |
| Arch | LostTag | 1.81 μs | 2.18× | 0 B |
At 10 removals, Friflo's event (697 ns) is ahead of [Removed<T>]
(830 ns): it collects the ids in a callback as the removals happen, a cost per removal, while
the EasyEcs pass finds them through per-block summaries, a fixed cost that 10 removals do not cover. At 1,000
removals, EasyEcs takes 66.7 μs and Friflo 71.7 μs. What
EasyEcs gives in exchange: no subscription, no list kept by hand, and the removal is visible to any system that runs
later, not only to the one callback.
Indexes and relations
IndexComparison: an inventory, 100,000 items each pointing at one of 1,000 owners; 1 or 100 items change hands,
then 100 inventories are counted. EasyEcs uses an indexed EntityId (IIndexed<EntityId>), Friflo a link component
(GetIncomingLinks), DefaultEcs an EntityMultiMap. Arch has no index in its core package.
1 trade, then 100 inventories counted
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Index | 425 ns | 1.00× | 0 B |
| Friflo.Engine.ECS | Links | 1.37 μs | 3.2× | 0 B |
| DefaultEcs | MultiMap | 838 ns | 1.97× | 0 B |
All three answer "which items does this owner hold" without a scan and update on every set. EasyEcs keeps relation
heads in an array indexed by the owner's id, so neither a trade nor a count hashes anything; the hook in Set is one
inlined call that the JIT removes for components without an index.
ValueQueryComparison: 100,000 players with a rating and one of 16 zones; 1,000 ratings and 100 zones change, then
the players rated 2,000-2,010 are counted and the gold of 4 zones summed. EasyEcs answers the zone with a group (a
table per zone) or a value index, and the rating with an ordered index (Range); Friflo with
IIndexedComponent<int> and ValueInRange.
Rating ranges and zone sums over 100,000 players
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Group | 127 μs | 1.00× | 0 B |
| EasyEcs | Index | 233 μs | 1.83× | 0 B |
| Friflo.Engine.ECS | IndexedComponent | 317 μs | 2.49× | 0 B |
RelationComparison: friend lists, 10,000 players following 8 others each; 100 players unfollow one and follow
another, then the followers of 100 players are counted and walked. EasyEcs uses IRelation (a buffer of links per
entity, indexed by target), Friflo ILinkRelation.
Rewire 100 of 10,000 friend lists, walk 100 follower sets
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Relations | 22.0 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | LinkRelations | 26.1 μs | 1.19× | 0 B |
Both libraries keep the same structure, a list of links per entity and an index by target, so the two are close (EasyEcs 22.0 μs, Friflo 26.1 μs).
Hierarchy
HierarchyComparison: 1,000 squads (a leader and 10 members) are created, then the leaders are destroyed with their
members, in a warm world. EasyEcs creates the members in bulk as ChildOf(leader) and destroys the leaders with
DestroyEntities, which cascades; Friflo's DeleteEntity detaches children, so the port deletes them first. Arch
and DefaultEcs have no hierarchy.
Create and destroy 1,000 squads of 11
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | ChildOf | 452 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | AddChild | 1.06 ms | 2.35× | 0 B |
Disabling
DisableComparison: 100,000 units; 100 or 10,000 fall asleep per operation and the previous ones wake up, then the
vitality of the awake units is summed. EasyEcs uses an Asleep tag (a presence bit) or Disable<Vigor>(), which
keeps the value while queries skip it; Friflo entity.Enabled (a Disabled tag, an archetype move); DefaultEcs
entity.Disable(); Arch a tag and WithNone.
DisableComparison (Switched=100)
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Tag | 42.4 μs | 1.00× | 0 B |
| EasyEcs | DisableComponent | 41.4 μs | 0.98× | 0 B |
| Friflo.Engine.ECS | Enabled | 45.9 μs | 1.08× | 0 B |
| Arch | Tag | 82.8 μs | 1.95× | 0 B |
| DefaultEcs | Disable | 103 μs | 2.42× | 0 B |
At 100 switched, the sum dominates and Friflo's Enabled is close to EasyEcs. With frequent switching, moving
entities between archetypes costs more than flipping bits, and the gap grows.
Structural changes
StructuralChangeComparison: 100,000 units; 10 or 1,000 lose their health, then one pass over the living marks
those at zero as fallen (adds a tag) and a second pass revives them (removes it). EasyEcs changes structure inside
the passes; the others record into their command buffers and play them back after each pass.
StructuralChangeComparison (Killed=10)
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Direct | 78.2 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | CommandBuffer | 75.4 μs | 0.96× | 0 B |
| Arch | CommandBuffer | 184 μs | 2.36× | 5.30 KB |
| DefaultEcs | CommandRecorder | 496 μs | 6.3× | 0 B |
Friflo's command buffer is close to the direct changes: most of the cost is the passes themselves. Arch's buffer allocates while it records and plays back. The DefaultEcs row at 1,000 carries an error as large as its mean in this run.
Bulk changes and spawns
BulkChangeComparison: 100,000 fighters are all stunned, then the stun is lifted from everyone. EasyEcs uses
SetAll / RemoveAll (after the first round the stun keeps its column, so a round flips presence bits); Friflo an
EntityBatch applied to a query; Arch add and remove by query (whole tables move); DefaultEcs has no bulk change
and sets per entity.
Stun 100,000 fighters, then lift the stun
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | SetAllRemoveAll | 78.7 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | ApplyBatch | 12.1 ms | 154× | 4.00 MB |
| Arch | AddRemoveByQuery | 1.21 ms | 15× | 0 B |
| DefaultEcs | PerEntity | 8.12 ms | 103× | 0 B |
BulkSpawnComparison: 10,000 shots are spawned beside 100,000 fighters, then all cleared. EasyEcs uses
CreateEntities (one table, rows placed at once) and DestroyEntities<Fuse>(); Friflo and DefaultEcs create and
delete per entity; Arch creates per entity after EnsureCapacity and destroys by query.
Spawn 10,000 shots, then clear them
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | CreateAndDestroyAll | 138 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | PerEntity | 380 μs | 2.75× | 0 B |
| Arch | CreateAndDestroyByQuery | 409 μs | 2.96× | 0 B |
| DefaultEcs | PerEntity | 1.33 ms | 9.7× | 313 KB |
Creating entities in a fresh world
ColdCreateComparison: 100,000 entities of one, two or three components created in a world that has never held any,
a new world for every call: one by one (PerEntity), one by one after reserving room (PerEntity_Reserved:
EnsureCapacity<T1, …, Tn>(n) in EasyEcs, EnsureCapacity on Friflo's store and archetype and on Arch's world;
DefaultEcs has no tables to reserve), and in one CreateEntities call (Bulk, EasyEcs only). The comparisons above
count three components: reserved against reserved, the bulk call against each library's fastest way, and one by one
against one by one.
Create 100,000 entities of one component in a fresh world
- EasyEcs
- Friflo.Engine.ECS
- Arch
- DefaultEcs
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | PerEntity | 5.99 ms | 1.00× | 6.97 MB |
| Friflo.Engine.ECS | PerEntity | 15.3 ms | 2.56× | 7.99 MB |
| Arch | PerEntity | 3.76 ms | 0.63× | 4.00 MB |
| DefaultEcs | PerEntity | 13.1 ms | 2.19× | 11.1 MB |
| EasyEcs | PerEntity_Reserved | 1.94 ms | 1.00× | 2.67 MB |
| Friflo.Engine.ECS | PerEntity_Reserved | 11.3 ms | 5.8× | 3.29 MB |
| Arch | PerEntity_Reserved | 3.45 ms | 1.78× | 3.85 MB |
| EasyEcs | Bulk | 2.65 ms | 1.00× | 4.20 MB |
One by one with nothing reserved, Arch is faster (EasyEcs takes 1.50× as long with three components). A fresh EasyEcs table and its entity storage grow by doubling; the large arrays land on the large object heap and set off a full collection once per new world. Arch's 16 KB chunks never reach that heap. Reserved, or in one call, nothing starts a collection and EasyEcs is the fastest of the four (D28; what to write: Performance).
Parallel work
ParallelQueryComparison: 100,000 agents steer towards the nearest of 16 waypoints on all cores. EasyEcs uses
[ForEach(Parallel = true)], Friflo a QueryJob with a ParallelJobRunner, Arch InlineParallelQuery on its job
scheduler, DefaultEcs an AEntitySetSystem with a DefaultParallelRunner.
Steer 100,000 agents on all cores
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | Parallel | 766 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | QueryJob | 754 μs | 0.98× | 0 B |
| Arch | InlineParallelQuery | 685 μs | 0.89× | 0 B |
| DefaultEcs | ParallelRunner | 854 μs | 1.11× | 0 B |
EasyEcs does not win this one: Arch and Friflo (754 μs) come out ahead of EasyEcs (766 μs), within this run's error. Their runners keep worker threads of their own; EasyEcs runs on the calling thread plus thread-pool helpers that it wakes only while they pay. Measured back to back, as BenchmarkDotNet does, dedicated workers win; in a server tick where passes are milliseconds apart, a dedicated spinning crew measured worse in tail latency and CPU per tick (D22), so EasyEcs keeps the thread pool.
ParallelSystemsComparison: four independent systems over 100,000 entities, sequential and in parallel. DefaultEcs
is the only peer that schedules whole systems in parallel (ParallelSystem<T>); EasyEcs forms the stage from the
systems' generated access, so you cannot put two conflicting systems in one by mistake.
Four independent systems over 100,000 entities
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Parallel | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | False | 395 μs | 1.00× | 0 B |
| DefaultEcs | False | 471 μs | 1.19× | 0 B |
| EasyEcs | True | 370 μs | 1.00× | 0 B |
| DefaultEcs | True | 405 μs | 1.09× | 0 B |
Parallel numbers
The reference machine has 4 cores, and the parallel rows of this run carry a large error. Read them as an order of magnitude; they may be re-measured.
Saves
SaveComparison: 10,000 units (a position and a stock each) are written and read back into a world. The formats
differ: EasyEcs writes binary (Nino; unmanaged rows copied as raw bytes with a field hash), Friflo JSON, DefaultEcs
its binary serializer into a new world. Arch saves through a separate package.
Save and load 10,000 units
- EasyEcs
- Other libraries
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.
Data table
| Library | Case | Mean | vs EasyEcs | Allocated |
|---|---|---|---|---|
| EasyEcs | SaveLoad | 146 μs | 1.00× | 0 B |
| Friflo.Engine.ECS | Json | 20.8 ms | 143× | 6.52 MB |
| DefaultEcs | Binary | 4.33 ms | 30× | 4.37 MB |
Their features in EasyEcs
What the other libraries offer and how EasyEcs does the same job. Some are built in under another name; some are done with data instead of a mechanism (EasyEcs has no events or command buffers on purpose); a few are not offered. The battle server example shows most of them.
| Their feature | In | EasyEcs |
|---|---|---|
| Command buffer for changes during a query | Friflo, Arch, DefaultEcs | not needed: changes apply at once, also mid-pass |
| Thread-safe command buffer | Friflo | a queue you own, drained by a system on the world's thread (threading) |
| Component added / removed / set events | Friflo, Arch, DefaultEcs | state changes are data: a component the next system queries |
WhenChanged sets and NotifyChanged | DefaultEcs | [Changed<T>], QueryFilter.Changed<T>(since): a ref write is the change |
WhenRemoved sets, removal events | DefaultEcs, Friflo, Arch | [Removed<T>], QueryFilter.Removed<T>(since) |
| Prefab entities, cloning | Friflo, DefaultEcs | Prefab and world.Instantiate; entity.Clone() for a living entity |
| Tags | Friflo | empty components; removing one flips a bit |
| Unique entity, world components | Friflo, DefaultEcs | singletons, as [ForEach] parameters or a SingletonRef<T> |
| Enable / disable an entity | Friflo, DefaultEcs | a tag ([Without<Asleep>]), or Disable<T>() for one component |
| Systems, groups, ordering | Friflo, DefaultEcs, Arch.Extended | EcsSystem, [UpdateBefore<T>] / [UpdateAfter<T>], ISystemGroup, UpdateInterval |
| Struct query jobs, chunk iteration | Arch, Friflo | IForEach, IForEachEntity, IForEachBatch; batch [ForEach] methods |
| Parallel query | Friflo, Arch, DefaultEcs | [ForEach(Parallel = true)], ForEachParallel, ForEachEntityParallel |
| Parallel systems | DefaultEcs | WorldOptions.ParallelSystems |
| Bulk changes | Friflo, Arch | SetAll, RemoveAll, DisableAll, EnableAll, CreateEntities, DestroyEntities |
| Indexed components | Friflo, DefaultEcs | IIndexed<TKey>: Find, TryFind, Count, ordered Range |
| Links and relations | Friflo | an indexed EntityId, or IRelation for many targets |
| Parent / child hierarchy | Friflo | ChildOf, world.Children, cascading destroy; no transform propagation |
| Serialization | Friflo (JSON), DefaultEcs (text, binary) | binary Save / Load, plus in-memory Capture / Restore |
| System performance monitor | Friflo | WorldOptions.MeasureSystems, system.Stats |
Shared components (SetSameAs) | DefaultEcs | not built in: keep shared data in a singleton and an id into it |
| Unity, older runtimes | all three | not offered: net10.0 only |
When to pick which library
| Pick | When |
|---|---|
| EasyEcs | A .NET 10 server or simulation where state flips constantly and you want changes applied where they are decided, systems generated and checked at compile time, change and removal tracking, prefabs, indexes, relations, saves and snapshots built in, and nothing allocated per tick. |
| Friflo.Engine.ECS | You need Unity or older runtimes, events, or JSON serialization, accept command buffers for changes during iteration, and want a fast general-purpose ECS. |
| Arch | You need Unity or older runtimes and a small core with chunk-based storage, adding systems and generators from Arch.Extended. |
| DefaultEcs | You need netstandard down to 1.1, reactive sets and built-in serializers, and the world is small enough that its per-tick allocations do not matter. |
Related
Last updated on
How is this guide?
Troubleshooting
What each EasyEcs exception message means and how to fix it, and why a system does not run, a generated member is missing or a save drops data.
EasyEcs vs Friflo.Engine.ECS
EasyEcs and Friflo.Engine.ECS side by side: how the concepts map, the same system in both, every benchmark between them, and when Friflo is the better choice.