Home

Awesome

Entity-Component-System Benchmarks for .Net

License Stars

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.

Unity Version

Frameworks:

ECSVersionImplemented
DragonECS0.8.42
FriFlo3.0.0-preview.13
LeoECSLite2024.5.22
Morpeh2024.1.0-rc49

Running

  1. Install NPM

  2. Clone repository

    git clone https://github.com/cNoNim/ecs-benchmark-runner-dotnet.git
    
  3. 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.

RepositoryProject
ArchBenchmark.ArchEcs
Dragon ECSBenchmark.DragonEcs
FriFlo ECSBenchmark.FrifloEcs
LeoEcsLiteBenchmark.EcsLite
MorpehBenchmark.Morpeh

Dependencies

Dependencies folder contains integration projects for frameworks.

Frameworks can be referenced:

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.