Awesome
Entity-Component-System Benchmarks for .Net
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.
Frameworks:
ECS | Version | Implemented |
---|---|---|
DragonECS | 0.8.42 | ✅ |
FriFlo | 3.0.0-preview.13 | ✅ |
LeoECSLite | 2024.5.22 | ✅ |
Morpeh | 2024.1.0-rc49 | ✅ |
Running
-
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 \*
Structure
The benchmark is divided into repositories. Each repository is an NPM package. Current repository integrate packages into runner project for .Net.
Benchmark.Core Package
A separate repository contains common assemblies that are used by benchmarks or by infrastructure. Integration is done in the Benchmark.Core project
Benchmark.Generator
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
Benchmark Projects
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
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.
Benchmark.Template
Contains template project for benchmark integration.
Benchmark.Runner
Runner application runs benchmarks using BenchmarkDotNet. Runner include all benchmarks from Public folder.
Benchmark.Tests
Contains unit test project that validates that each benchmark produces the same state.