This repository contains a collection of benchmarks for .Net Entity-Component-System (ECS) frameworks. Benchmarks perform a complex performance comparison of ECS frameworks on a near-real-world scenario.
ECS | Version | Implemented |
---|---|---|
DragonECS | 0.8.42 | ✅ |
FriFlo | 3.0.0-preview.13 | ✅ |
LeoECSLite | 2024.5.22 | ✅ |
Morpeh | 2024.1.0-rc49 | ✅ |
-
Install NPM
-
Clone repository
git clone https://github.com/cNoNim/ecs-benchmark-runner-dotnet.git
-
Run
Windows
cd .\Benchmark.Runner dotnet run -c Release --filter *
Mac/Linux
cd ./Benchmark.Runner dotnet run -c Release --filter \*
The benchmark is divided into repositories. Each repository is an NPM package. Current repository integrate packages into runner project for .Net.
A separate repository contains common assemblies that are used by benchmarks or by infrastructure. Integration is done in the Benchmark.Core project
Part of Benchmark.Core package.
Benchmark.Generator is a source generator that checks referenced assemblies and looks for implementations of Benchmark.Core.IContext
and generates Benchmark.Contexts.Factories
that are used to get all the contexts involved in the benchmark.
Integration is done in the Benchmark.Generator project
Each benchmark is a separate repository, integration is done through separate projects in the Public folder.
Repository | Project |
---|---|
Arch | Benchmark.ArchEcs |
Dragon ECS | Benchmark.DragonEcs |
FriFlo ECS | Benchmark.FrifloEcs |
LeoEcsLite | Benchmark.EcsLite |
Morpeh | Benchmark.Morpeh |
Dependencies folder contains integration projects for frameworks.
Frameworks can be referenced:
- as Nuget packages if the option is provided;
- as NPM git packages, if framework is an NPM package;
- otherwise as a git submodule in the Submodules folder.
Contains template project for benchmark integration.
Runner application runs benchmarks using BenchmarkDotNet. Runner include all benchmarks from Public folder.
Contains unit test project that validates that each benchmark produces the same state.