EasyEcs

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/ 37
Against Friflo.Engine.ECS, Arch and DefaultEcs, beyond the measurement error

Save 10,000 entities and load them back, vs DefaultEcs

30×faster
EasyEcs 146 μs, DefaultEcs 4.33 ms

Add a component to 100,000 entities by query, then remove it, vs Arch

15×faster
EasyEcs 78.7 μs, Arch 1.21 ms

Spawn 10,000 entities beside 100,000, then destroy them, vs Friflo.Engine.ECS

2.75×faster
EasyEcs 138 μs, Friflo.Engine.ECS 380 μs

Feature 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).

Save 10,000 entities and load them back30× · DefaultEcsAdd a component to 100,000 entities by query, then remove it15× · ArchSpawn 10,000 entities beside 100,000, then destroy them2.75× · FrifloQuery 100,000 players by value: a rating range, zone sums2.49× · FrifloCreate 1,000 parent-child squads, destroy them in cascade2.35× · FrifloCount 100 inventories through an index (1 item traded)1.97× · DefaultEcsAdd a status component to 5% of 100,000 entities, then remove it1.94× · FrifloFind the 10 of 100,000 entities written this tick1.91× · ArchSpawn 5,000 entities from a prefab, then destroy them1.68× · FrifloCreate 100,000 three-component entities one by one in a fresh world, room reservedfirst1.62× · ArchIterate one component over 100,000 entities1.59× · FrifloPut 10,000 of 100,000 entities to sleep, wake the last ones1.56× · DefaultEcsCreate 100,000 three-component entities in a fresh world in one call (the others'fastest way)1.56× · ArchCount 100 inventories through an index (100 items traded)1.54× · DefaultEcsIterate with a filter: the players among 100,000 entities1.46× · FrifloFind the 1,000 of 100,000 entities written this tick1.40× · FrifloIterate with the entity handle of each row1.37× · Friflo1×2×5×10×20×Its time ÷ 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 measuredEasyEcsNext fastestvs EasyEcs
Save 10,000 entities and load them back146 μsDefaultEcs 4.33 ms30×
Add a component to 100,000 entities by query, then remove it78.7 μsArch 1.21 ms15×
Spawn 10,000 entities beside 100,000, then destroy them138 μsFriflo.Engine.ECS 380 μs2.75×
Query 100,000 players by value: a rating range, zone sums127 μsFriflo.Engine.ECS 317 μs2.49×
Create 1,000 parent-child squads, destroy them in cascade452 μsFriflo.Engine.ECS 1.06 ms2.35×
Count 100 inventories through an index (1 item traded)425 nsDefaultEcs 838 ns1.97×
Add a status component to 5% of 100,000 entities, then remove it517 μsFriflo.Engine.ECS 1.00 ms1.94×
Find the 10 of 100,000 entities written this tick507 nsArch 966 ns1.91×
Spawn 5,000 entities from a prefab, then destroy them164 μsFriflo.Engine.ECS 276 μs1.68×
Create 100,000 three-component entities one by one in a fresh world, room reserved first2.60 msArch 4.21 ms1.62×
Iterate one component over 100,000 entities37.7 μsFriflo.Engine.ECS 59.9 μs1.59×
Put 10,000 of 100,000 entities to sleep, wake the last ones478 μsDefaultEcs 745 μs1.56×
Create 100,000 three-component entities in a fresh world in one call (the others' fastest way)2.71 msArch 4.21 ms1.56×
Count 100 inventories through an index (100 items traded)5.11 μsDefaultEcs 7.87 μs1.54×
Iterate with a filter: the players among 100,000 entities11.3 μsFriflo.Engine.ECS 16.6 μs1.46×
Find the 1,000 of 100,000 entities written this tick38.5 μsFriflo.Engine.ECS 53.7 μs1.40×
Iterate with the entity handle of each row49.0 μsFriflo.Engine.ECS 67.2 μs1.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 measuredEasyEcsNext fastestIts time vs EasyEcsThe others
Save 10,000 entities and load them back146 μsDefaultEcs 4.33 ms, 4.37 MB allocated30×Friflo.Engine.ECS 143×, 6.52 MB allocated
Add a component to 100,000 entities by query, then remove it78.7 μsArch 1.21 ms15×DefaultEcs 103×; Friflo.Engine.ECS 154×, 4.00 MB allocated
Spawn 10,000 entities beside 100,000, then destroy them138 μsFriflo.Engine.ECS 380 μs2.75×Arch 2.96×; DefaultEcs 9.7×, 313 KB allocated
Query 100,000 players by value: a rating range, zone sums127 μsFriflo.Engine.ECS 317 μs2.49×—
Create 1,000 parent-child squads, destroy them in cascade452 μsFriflo.Engine.ECS 1.06 ms2.35×—
Count 100 inventories through an index (1 item traded)425 nsDefaultEcs 838 ns1.97×Friflo.Engine.ECS 3.2×
Add a status component to 5% of 100,000 entities, then remove it517 μsFriflo.Engine.ECS 1.00 ms1.94×—
Find the 10 of 100,000 entities written this tick507 nsArch 966 ns1.91×Friflo.Engine.ECS 2.85×; DefaultEcs 73×
Spawn 5,000 entities from a prefab, then destroy them164 μsFriflo.Engine.ECS 276 μs1.68×—
Create 100,000 three-component entities one by one in a fresh world, room reserved first2.60 ms, 3.44 MB allocatedArch 4.21 ms, 4.62 MB allocated1.62×Friflo.Engine.ECS 4.7×, 4.30 MB allocated
Iterate one component over 100,000 entities37.7 μsFriflo.Engine.ECS 59.9 μs1.59×—
Put 10,000 of 100,000 entities to sleep, wake the last ones478 μsDefaultEcs 745 μs1.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 allocatedArch 4.21 ms, 4.62 MB allocated1.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 μsDefaultEcs 7.87 μs1.54×Friflo.Engine.ECS 1.63×
Iterate with a filter: the players among 100,000 entities11.3 μsFriflo.Engine.ECS 16.6 μs1.46×—
Find the 1,000 of 100,000 entities written this tick38.5 μsFriflo.Engine.ECS 53.7 μs1.40×DefaultEcs 2.01×; Arch 2.18×
Iterate with the entity handle of each row49.0 μsFriflo.Engine.ECS 67.2 μs1.37×—
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Close

EasyEcs ahead by less than that; the full server tick is one of these rows.

What is measuredEasyEcsNext fastestIts time vs EasyEcsThe others
Four independent systems over 100,000 entities, one after another395 μsDefaultEcs 471 μs1.19×—
Rewire 100 of 10,000 friend lists, walk 100 follower sets22.0 μsFriflo.Engine.ECS 26.1 μs1.19×—
Move 100,000 entities with SIMD over spans69.5 μsFriflo.Engine.ECS 80.7 μs1.16×—
Create 5,000 entities one by one, then destroy them190 μsFriflo.Engine.ECS 215 μs1.13×—
Add and remove a tag in the passes that find them (1,000 of 100,000)163 μsFriflo.Engine.ECS 183 μs1.12×Arch 6.9×, 448 KB allocated; DefaultEcs 79×
Put 100 of 100,000 entities to sleep, wake the last ones41.4 μsFriflo.Engine.ECS 45.9 μs1.11×Arch 2.00×; DefaultEcs 2.48×
Four independent systems over 100,000 entities, in parallel370 μsDefaultEcs 405 μs1.09× (within error)—
The full server tick: nine systems over 100,000 entities1.68 msFriflo.Engine.ECS 1.83 ms1.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 component66.7 μsFriflo.Engine.ECS 71.7 μs1.08× (within error)DefaultEcs 1.61×; Arch 2.58×
The full server tick: nine systems over 10,000 entities175 μsFriflo.Engine.ECS 183 μs1.05× (within error)DefaultEcs 1.76×, 6.15 KB allocated; Arch 2.76×, 65.9 KB allocated
Iterate two components and a singleton212 μsFriflo.Engine.ECS 222 μs1.05× (within error)—
Scan 100,000 entities for the 10 written, without a change filter38.2 μsFriflo.Engine.ECS 39.9 μs1.04× (within error)Arch 2.40×
Move 100,000 entities: two components, per entity253 μsFriflo.Engine.ECS 257 μs1.02× (within error)—
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Where another library is faster

Each with the reason, read from the benchmark's source.

What is measuredEasyEcsFaster libraryIts time vs EasyEcsWhy
Iterate three components over 100,000 entities71.0 μsFriflo.Engine.ECS 70.7 μs0.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 μsFriflo.Engine.ECS 75.4 μs0.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 needed38.5 μsFriflo.Engine.ECS 37.0 μs0.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 μsArch 685 μs0.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 filter61.4 μsFriflo.Engine.ECS 53.7 μs0.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 component830 nsFriflo.Engine.ECS 697 ns0.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 reserved7.13 ms, 8.97 MB allocatedArch 4.77 ms, 4.84 MB allocated0.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.
BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

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.

FeatureEasyEcsFriflo.Engine.ECSArchDefaultEcs
Storagearchetype tables, presence bits per columnarchetypesarchetypes in chunksa 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 frameworksnet10.0netstandard2.1, net6.0-8.0netstandard2.1, net6.0, net8.0netstandard1.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:

DeathSystem.cs
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
EasyEcs 4.60 B per tick1.68 msFriflo.Engine.ECS 3.61.08× · 0 B per tick1.83 msArch 2.13.4× · 535 KB per tick5.76 msDefaultEcs 0.173.7× · 60.9 KB per tick6.24 ms0.00 ns1.00 ms2.00 ms3.00 ms4.00 ms5.00 ms6.00 msTime per tick

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryTimevs EasyEcsAllocated
EasyEcs 4.61.68 ms1.00×0 B
Friflo.Engine.ECS 3.61.83 ms1.08×0 B
Arch 2.15.76 ms3.4×535 KB
DefaultEcs 0.176.24 ms3.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
Iterate1Friflo.Engine.ECS 1.59×37.7 μs · 0 B59.9 μs · 0 BIterate2Friflo.Engine.ECS 1.02×253 μs · 0 B257 μs · 0 BIterate2SimdFriflo.Engine.ECS 1.16×69.5 μs · 0 B80.7 μs · 0 BIterate3Friflo.Engine.ECS 0.99×71.0 μs · 0 B70.7 μs · 0 BWithFriflo.Engine.ECS 1.46×11.3 μs · 0 B16.6 μs · 0 BEntityFriflo.Engine.ECS 1.37×49.0 μs · 0 B67.2 μs · 0 BEntityBatchFriflo.Engine.ECS 0.96×38.5 μs · 0 B37.0 μs · 0 BSingletonFriflo.Engine.ECS 1.05×212 μs · 0 B222 μs · 0 BToggleFriflo.Engine.ECS 1.94×517 μs · 0 B1.00 ms · 0 BCreateDestroyFriflo.Engine.ECS 1.13×190 μs · 0 B215 μs · 0 BInstantiateFriflo.Engine.ECS 1.68×164 μs · 0 B276 μs · 0 B0.00 ns200 μs400 μs600 μs800 μs1.00 msTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsIterate137.7 μs1.00×0 B
Friflo.Engine.ECSIterate159.9 μs1.59×0 B
EasyEcsIterate2253 μs1.00×0 B
Friflo.Engine.ECSIterate2257 μs1.02×0 B
EasyEcsIterate2Simd69.5 μs1.00×0 B
Friflo.Engine.ECSIterate2Simd80.7 μs1.16×0 B
EasyEcsIterate371.0 μs1.00×0 B
Friflo.Engine.ECSIterate370.7 μs0.99×0 B
EasyEcsWith11.3 μs1.00×0 B
Friflo.Engine.ECSWith16.6 μs1.46×0 B
EasyEcsEntity49.0 μs1.00×0 B
Friflo.Engine.ECSEntity67.2 μs1.37×0 B
EasyEcsEntityBatch38.5 μs1.00×0 B
Friflo.Engine.ECSEntityBatch37.0 μs0.96×0 B
EasyEcsSingleton212 μs1.00×0 B
Friflo.Engine.ECSSingleton222 μs1.05×0 B
EasyEcsToggle517 μs1.00×0 B
Friflo.Engine.ECSToggle1.00 ms1.94×0 B
EasyEcsCreateDestroy190 μs1.00×0 B
Friflo.Engine.ECSCreateDestroy215 μs1.13×0 B
EasyEcsInstantiate164 μs1.00×0 B
Friflo.Engine.ECSInstantiate276 μs1.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's ForEachEntity calls 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
EasyEcs: Changed0 B allocated507 nsEasyEcs: Scan75× · 0 B allocated38.2 μsDefaultEcs: WhenChanged73× · 0 B allocated37.1 μsFriflo.Engine.ECS: Scan79× · 0 B allocated39.9 μsFriflo.Engine.ECS: DirtyTag2.85× · 0 B allocated1.44 μsArch: Scan181× · 0 B allocated91.9 μsArch: DirtyTag1.91× · 0 B allocated966 ns0.00 ns20.0 μs40.0 μs60.0 μs80.0 μs100 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsChanged507 ns1.00×0 B
EasyEcsScan38.2 μs75×0 B
DefaultEcsWhenChanged37.1 μs73×0 B
Friflo.Engine.ECSScan39.9 μs79×0 B
Friflo.Engine.ECSDirtyTag1.44 μs2.85×0 B
ArchScan91.9 μs181×0 B
ArchDirtyTag966 ns1.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
EasyEcs: Removed0 B allocated830 nsDefaultEcs: WhenRemoved48× · 0 B allocated39.6 μsFriflo.Engine.ECS: Event0.84× · 0 B allocated697 nsArch: LostTag2.18× · 0 B allocated1.81 μs0.00 ns5.00 μs10.0 μs15.0 μs20.0 μs25.0 μs30.0 μs35.0 μs40.0 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsRemoved830 ns1.00×0 B
DefaultEcsWhenRemoved39.6 μs48×0 B
Friflo.Engine.ECSEvent697 ns0.84×0 B
ArchLostTag1.81 μs2.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
EasyEcs: Index0 B allocated425 nsFriflo.Engine.ECS: Links3.2× · 0 B allocated1.37 μsDefaultEcs: MultiMap1.97× · 0 B allocated838 ns0.00 ns200 ns400 ns600 ns800 ns1.00 μs1.20 μs1.40 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsIndex425 ns1.00×0 B
Friflo.Engine.ECSLinks1.37 μs3.2×0 B
DefaultEcsMultiMap838 ns1.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
EasyEcs: Group0 B allocated127 μsEasyEcs: Index1.83× · 0 B allocated233 μsFriflo.Engine.ECS: IndexedComponent2.49× · 0 B allocated317 μs0.00 ns50.0 μs100 μs150 μs200 μs250 μs300 μs350 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsGroup127 μs1.00×0 B
EasyEcsIndex233 μs1.83×0 B
Friflo.Engine.ECSIndexedComponent317 μs2.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
EasyEcs: Relations0 B allocated22.0 μsFriflo.Engine.ECS: LinkRelations1.19× · 0 B allocated26.1 μs0.00 ns5.00 μs10.0 μs15.0 μs20.0 μs25.0 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsRelations22.0 μs1.00×0 B
Friflo.Engine.ECSLinkRelations26.1 μs1.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
EasyEcs: ChildOf0 B allocated452 μsFriflo.Engine.ECS: AddChild2.35× · 0 B allocated1.06 ms0.00 ns200 μs400 μs600 μs800 μs1.00 msTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsChildOf452 μs1.00×0 B
Friflo.Engine.ECSAddChild1.06 ms2.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
EasyEcs: Tag0 B allocated42.4 μsEasyEcs: DisableComponent0.98× · 0 B allocated41.4 μsFriflo.Engine.ECS: Enabled1.08× · 0 B allocated45.9 μsArch: Tag1.95× · 0 B allocated82.8 μsDefaultEcs: Disable2.42× · 0 B allocated103 μs0.00 ns20.0 μs40.0 μs60.0 μs80.0 μs100 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsTag42.4 μs1.00×0 B
EasyEcsDisableComponent41.4 μs0.98×0 B
Friflo.Engine.ECSEnabled45.9 μs1.08×0 B
ArchTag82.8 μs1.95×0 B
DefaultEcsDisable103 μs2.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
EasyEcs: Direct0 B allocated78.2 μsFriflo.Engine.ECS: CommandBuffer0.96× · 0 B allocated75.4 μsArch: CommandBuffer2.36× · 5.30 KB allocated184 μsDefaultEcs: CommandRecorder6.3× · 0 B allocated496 μs0.00 ns100 μs200 μs300 μs400 μs500 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsDirect78.2 μs1.00×0 B
Friflo.Engine.ECSCommandBuffer75.4 μs0.96×0 B
ArchCommandBuffer184 μs2.36×5.30 KB
DefaultEcsCommandRecorder496 μs6.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
EasyEcs: SetAllRemoveAll0 B allocated78.7 μsFriflo.Engine.ECS: ApplyBatch154× · 4.00 MB allocated12.1 msArch: AddRemoveByQuery15× · 0 B allocated1.21 msDefaultEcs: PerEntity103× · 0 B allocated8.12 ms0.00 ns2.00 ms4.00 ms6.00 ms8.00 ms10.0 ms12.0 msTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsSetAllRemoveAll78.7 μs1.00×0 B
Friflo.Engine.ECSApplyBatch12.1 ms154×4.00 MB
ArchAddRemoveByQuery1.21 ms15×0 B
DefaultEcsPerEntity8.12 ms103×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
EasyEcs: CreateAndDestroyAll0 B allocated138 μsFriflo.Engine.ECS: PerEntity2.75× · 0 B allocated380 μsArch: CreateAndDestroyByQuery2.96× · 0 B allocated409 μsDefaultEcs: PerEntity9.7× · 313 KB allocated1.33 ms0.00 ns200 μs400 μs600 μs800 μs1.00 ms1.20 ms1.40 msTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsCreateAndDestroyAll138 μs1.00×0 B
Friflo.Engine.ECSPerEntity380 μs2.75×0 B
ArchCreateAndDestroyByQuery409 μs2.96×0 B
DefaultEcsPerEntity1.33 ms9.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
PerEntityFriflo.Engine.ECS 2.56×, Arch 0.63×, DefaultEcs 2.19×5.99 ms · 6.97 MB15.3 ms · 7.99 MB3.76 ms · 4.00 MB13.1 ms · 11.1 MBPerEntity_ReservedFriflo.Engine.ECS 5.8×, Arch 1.78×1.94 ms · 2.67 MB11.3 ms · 3.29 MB3.45 ms · 3.85 MBBulk2.65 ms · 4.20 MB0.00 ns2.00 ms4.00 ms6.00 ms8.00 ms10.0 ms12.0 ms14.0 ms16.0 msTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsPerEntity5.99 ms1.00×6.97 MB
Friflo.Engine.ECSPerEntity15.3 ms2.56×7.99 MB
ArchPerEntity3.76 ms0.63×4.00 MB
DefaultEcsPerEntity13.1 ms2.19×11.1 MB
EasyEcsPerEntity_Reserved1.94 ms1.00×2.67 MB
Friflo.Engine.ECSPerEntity_Reserved11.3 ms5.8×3.29 MB
ArchPerEntity_Reserved3.45 ms1.78×3.85 MB
EasyEcsBulk2.65 ms1.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
EasyEcs: Parallel0 B allocated766 μsFriflo.Engine.ECS: QueryJob0.98× · 0 B allocated754 μsArch: InlineParallelQuery0.89× · 0 B allocated685 μsDefaultEcs: ParallelRunner1.11× · 0 B allocated854 μs0.00 ns200 μs400 μs600 μs800 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsParallel766 μs1.00×0 B
Friflo.Engine.ECSQueryJob754 μs0.98×0 B
ArchInlineParallelQuery685 μs0.89×0 B
DefaultEcsParallelRunner854 μs1.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
EasyEcs (Parallel=False)0 B allocated395 μsDefaultEcs (Parallel=False)1.19× · 0 B allocated471 μsEasyEcs (Parallel=True)0 B allocated370 μsDefaultEcs (Parallel=True)1.09× · 0 B allocated405 μs0.00 ns100 μs200 μs300 μs400 μs500 μsTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryParallelMeanvs EasyEcsAllocated
EasyEcsFalse395 μs1.00×0 B
DefaultEcsFalse471 μs1.19×0 B
EasyEcsTrue370 μs1.00×0 B
DefaultEcsTrue405 μs1.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
EasyEcs: SaveLoad0 B allocated146 μsFriflo.Engine.ECS: Json143× · 6.52 MB allocated20.8 msDefaultEcs: Binary30× · 4.37 MB allocated4.33 ms0.00 ns5.00 ms10.0 ms15.0 ms20.0 msTime (shorter is faster)

BenchmarkDotNet 0.15.2, .NET 10.0.13, Intel Xeon Processor 2.10GHz, 4 cores, Ubuntu 24.04.5 LTS.

Data table
LibraryCaseMeanvs EasyEcsAllocated
EasyEcsSaveLoad146 μs1.00×0 B
Friflo.Engine.ECSJson20.8 ms143×6.52 MB
DefaultEcsBinary4.33 ms30×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 featureInEasyEcs
Command buffer for changes during a queryFriflo, Arch, DefaultEcsnot needed: changes apply at once, also mid-pass
Thread-safe command bufferFrifloa queue you own, drained by a system on the world's thread (threading)
Component added / removed / set eventsFriflo, Arch, DefaultEcsstate changes are data: a component the next system queries
WhenChanged sets and NotifyChangedDefaultEcs[Changed<T>], QueryFilter.Changed<T>(since): a ref write is the change
WhenRemoved sets, removal eventsDefaultEcs, Friflo, Arch[Removed<T>], QueryFilter.Removed<T>(since)
Prefab entities, cloningFriflo, DefaultEcsPrefab and world.Instantiate; entity.Clone() for a living entity
TagsFrifloempty components; removing one flips a bit
Unique entity, world componentsFriflo, DefaultEcssingletons, as [ForEach] parameters or a SingletonRef<T>
Enable / disable an entityFriflo, DefaultEcsa tag ([Without<Asleep>]), or Disable<T>() for one component
Systems, groups, orderingFriflo, DefaultEcs, Arch.ExtendedEcsSystem, [UpdateBefore<T>] / [UpdateAfter<T>], ISystemGroup, UpdateInterval
Struct query jobs, chunk iterationArch, FrifloIForEach, IForEachEntity, IForEachBatch; batch [ForEach] methods
Parallel queryFriflo, Arch, DefaultEcs[ForEach(Parallel = true)], ForEachParallel, ForEachEntityParallel
Parallel systemsDefaultEcsWorldOptions.ParallelSystems
Bulk changesFriflo, ArchSetAll, RemoveAll, DisableAll, EnableAll, CreateEntities, DestroyEntities
Indexed componentsFriflo, DefaultEcsIIndexed<TKey>: Find, TryFind, Count, ordered Range
Links and relationsFrifloan indexed EntityId, or IRelation for many targets
Parent / child hierarchyFrifloChildOf, world.Children, cascading destroy; no transform propagation
SerializationFriflo (JSON), DefaultEcs (text, binary)binary Save / Load, plus in-memory Capture / Restore
System performance monitorFrifloWorldOptions.MeasureSystems, system.Stats
Shared components (SetSameAs)DefaultEcsnot built in: keep shared data in a singleton and an id into it
Unity, older runtimesall threenot offered: net10.0 only

When to pick which library

PickWhen
EasyEcsA .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.ECSYou need Unity or older runtimes, events, or JSON serialization, accept command buffers for changes during iteration, and want a fast general-purpose ECS.
ArchYou need Unity or older runtimes and a small core with chunk-based storage, adding systems and generators from Arch.Extended.
DefaultEcsYou 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.
Edit on GitHub

Last updated on

How is this guide?

On this page