ECS c# Benchmark

February 21, 2025 · View on GitHub

This repo contains benchmarks of some c# ECS frameworks. Feel free to add your own or correct usage of existing ones! Please make your framework available as a nuget package to ease referencing and updating versions.

The benchmarks are not representative of usage in real conditions but results can still be interesting to look at.

All results are obtained from the same toaster, with the same load, so comparison is fairer.

Tested frameworks:

Removed frameworks:

  • Entitas removed because it was taking forever to initialize in the later tests when moved to net8, you can check older benchmark results here

Tested versions may not be latest available, that's because I'm lazy and new versions may introduce breaking changes, so feel free to create pull requests to update libs you are knowledgeable about.

CreateEntityWithOneComponent

Create entities with one component.

MethodMeanStdDevAllocated
Frent_Bulk768.6 μs24.45 μs3322.91 KB
Frent1,038.5 μs15.93 μs3322.91 KB
FrifloEngineEcs2,022.5 μs29.98 μs3381.74 KB
LeopotamEcsLite2,863.2 μs284.50 μs7151.08 KB
Arch3,694.8 μs124.75 μs3178.44 KB
DefaultEcs7,103.9 μs281.95 μs11321.11 KB
FlecsNet7,480.1 μs153.12 μs2.73 KB
MonoGameExtended8,282.6 μs592.85 μs16408.89 KB
LeopotamEcs9,003.1 μs735.44 μs13685.65 KB
TinyEcs11,316.8 μs242.01 μs7834.44 KB
HypEcs11,542.5 μs672.16 μs25829.38 KB
Fennecs12,146.8 μs460.88 μs13636.45 KB
Myriad17,310.6 μs438.87 μs7633.45 KB
RelEcs25,686.8 μs1,456.76 μs29706.66 KB
SveltoECS26,330.5 μs598.68 μs3.22 KB
Morpeh_Stash67,075.5 μs1,105.68 μs41305.76 KB
Morpeh_Direct67,753.8 μs1,364.95 μs41305.76 KB

CreateEntityWithTwoComponents

Create entities with two components.

MethodMeanStdDevAllocated
Frent1.188 ms0.0050 ms3713.63 KB
Frent_Bulk1.263 ms0.0214 ms3713.63 KB
FrifloEngineEcs2.933 ms0.1588 ms3898.13 KB
Arch3.864 ms0.1820 ms3558.44 KB
LeopotamEcsLite4.599 ms0.8319 ms9199.61 KB
DefaultEcs10.217 ms0.4302 ms15418.9 KB
LeopotamEcs10.451 ms0.8563 ms14711.02 KB
FlecsNet14.295 ms0.2492 ms3.11 KB
MonoGameExtended17.426 ms1.1724 ms23373.84 KB
TinyEcs19.518 ms1.4443 ms13785.08 KB
Fennecs19.817 ms0.4584 ms15174.45 KB
HypEcs21.669 ms0.3002 ms45336.69 KB
Myriad23.799 ms0.4402 ms8028.55 KB
SveltoECS39.648 ms1.8089 ms4.14 KB
RelEcs60.414 ms2.5217 ms50749.86 KB
Morpeh_Stash75.880 ms2.4763 ms48133.7 KB
Morpeh_Direct271.755 ms16.5622 ms128861.64 KB

CreateEntityWithThreeComponents

Create entities with three components.

MethodMeanStdDevAllocated
Frent1.335 ms0.0065 ms4104.34 KB
Frent_Bulk1.346 ms0.0273 ms4104.34 KB
FrifloEngineEcs3.067 ms0.0878 ms4412.23 KB
LeopotamEcsLite4.917 ms0.2248 ms11248.14 KB
Arch8.351 ms0.1357 ms3947.67 KB
LeopotamEcs11.649 ms0.6685 ms15736.4 KB
DefaultEcs11.982 ms0.4362 ms19516.68 KB
FlecsNet21.084 ms0.1698 ms3.48 KB
Myriad26.959 ms0.3333 ms8423.66 KB
Fennecs29.525 ms0.3057 ms16713.12 KB
TinyEcs33.582 ms0.5317 ms21316.55 KB
HypEcs35.524 ms1.5668 ms68748.41 KB
MonoGameExtended39.518 ms1.6480 ms30154.05 KB
SveltoECS52.785 ms1.8500 ms4.64 KB
Morpeh_Stash70.168 ms1.6399 ms44719.73 KB
RelEcs83.031 ms1.9343 ms75699.76 KB
Morpeh_Direct179.589 ms3.6865 ms83804.58 KB

SystemWithOneComponent

Modify entities with one component. The padding aims to simulate real situation when processed entities and their components are not sequential.

Note: Padding tests were removed for libraries that use archetypes to save space as padding makes no difference in their results

MethodEntityPaddingMeanStdDevAllocated
Frent_Simd08.001 μs0.0707 μs-
FrifloEngineEcs_SIMD_MonoThread08.832 μs0.1063 μs-
FrifloEngineEcs_MultiThread09.687 μs0.4677 μs-
Myriad_SingleThreadChunk_SIMD011.607 μs0.1431 μs-
Myriad_MultiThreadChunk017.138 μs0.1526 μs9216 B
TinyEcs_EachJob019.308 μs0.3354 μs1552 B
Fennecs_Job026.045 μs0.8157 μs-
TinyEcs_Each029.781 μs0.1316 μs-
Arch_MultiThread032.913 μs0.2353 μs-
Frent_QueryInline033.690 μs0.1638 μs-
HypEcs_MonoThread044.341 μs0.0620 μs72 B
FrifloEngineEcs_MonoThread044.977 μs0.2093 μs-
Fennecs_ForEach045.015 μs0.2813 μs-
DefaultEcs_ComponentSystem_MonoThread045.579 μs1.0413 μs-
Fennecs_Raw045.949 μs0.2371 μs-
Arch_MonoThread046.696 μs0.2203 μs-
Arch_MonoThread_SourceGenerated047.506 μs0.3456 μs-
Myriad_SingleThreadChunk047.526 μs0.2036 μs-
HypEcs_MultiThread049.295 μs0.3248 μs1832 B
DefaultEcs_ComponentSystem_MultiThread049.427 μs8.2200 μs-
Myriad_SingleThread049.564 μs0.2483 μs-
Frent_QueryDelegate053.680 μs1.4546 μs-
FlecsNet_Iter056.540 μs0.1969 μs-
Myriad_MultiThread071.270 μs0.3873 μs16213 B
DefaultEcs_EntitySetSystem_MonoThread071.717 μs0.5674 μs-
LeopotamEcs083.138 μs0.5633 μs-
FlecsNet_Each090.498 μs0.4793 μs-
Myriad_Delegate091.233 μs0.5065 μs-
DefaultEcs_EntitySetSystem_MultiThread0100.011 μs2.0387 μs-
LeopotamEcsLite0101.708 μs0.4140 μs-
SveltoECS0111.771 μs0.4182 μs-
Myriad_Enumerable0198.400 μs0.7397 μs-
RelEcs0203.954 μs2.0630 μs121 B
MonoGameExtended0305.970 μs4.1697 μs161 B
Morpeh_Stash02,354.802 μs55.0717 μs4 B
Morpeh_Direct02,906.300 μs36.9789 μs4 B
DefaultEcs_ComponentSystem_MonoThread1044.760 μs0.6112 μs-
DefaultEcs_ComponentSystem_MultiThread1055.017 μs12.3385 μs-
LeopotamEcs1082.681 μs0.4651 μs-
DefaultEcs_EntitySetSystem_MultiThread10108.222 μs1.4470 μs-
DefaultEcs_EntitySetSystem_MonoThread10109.532 μs3.1273 μs-
LeopotamEcsLite10122.782 μs1.7006 μs-
SveltoECS10133.520 μs0.7607 μs-
RelEcs10506.912 μs13.9889 μs121 B
MonoGameExtended101,456.219 μs45.6079 μs162 B
Morpeh_Stash107,824.125 μs172.3176 μs8 B
Morpeh_Direct108,998.948 μs187.5417 μs17 B

SystemWithTwoComponents

Modify entities with two components. The padding aims to simulate real situation when processed entities and their components are not sequential.

MethodEntityPaddingMeanStdDevAllocated
FrifloEngineEcs_MultiThread012.43 μs1.049 μs-
Frent_Simd014.03 μs0.122 μs-
FrifloEngineEcs_SIMD_MonoThread014.34 μs0.058 μs-
Myriad_SingleThreadChunk_SIMD016.32 μs0.128 μs-
Myriad_MultiThreadChunk017.14 μs0.115 μs9216 B
TinyEcs_EachJob023.85 μs1.105 μs1552 B
Arch_MultiThread032.02 μs0.144 μs-
TinyEcs_Each033.41 μs0.314 μs-
HypEcs_MonoThread044.68 μs0.205 μs112 B
Frent_QueryInline044.93 μs0.172 μs-
Arch_MonoThread_SourceGenerated047.84 μs0.226 μs-
Myriad_SingleThreadChunk048.31 μs0.189 μs-
HypEcs_MultiThread049.12 μs0.274 μs1872 B
Frent_QueryDelegate051.48 μs0.174 μs-
Myriad_SingleThread052.64 μs0.246 μs-
FrifloEngineEcs_MonoThread056.93 μs0.327 μs-
Arch_MonoThread057.47 μs0.314 μs-
Fennecs_Raw058.86 μs0.215 μs-
Fennecs_ForEach063.21 μs0.372 μs-
Myriad_MultiThread068.27 μs0.339 μs20865 B
FlecsNet_Iter079.81 μs0.420 μs-
Fennecs_Job094.79 μs1.576 μs-
DefaultEcs_MultiThread0108.93 μs3.569 μs-
Myriad_Delegate0113.14 μs0.362 μs-
DefaultEcs_MonoThread0124.09 μs0.978 μs-
FlecsNet_Each0134.08 μs0.238 μs-
LeopotamEcs0158.35 μs1.551 μs-
Myriad_Enumerable0200.01 μs3.006 μs-
LeopotamEcsLite0216.20 μs1.068 μs-
SveltoECS0223.22 μs0.700 μs-
RelEcs0355.92 μs7.512 μs169 B
MonoGameExtended0534.19 μs10.930 μs161 B
Morpeh_Stash02,380.69 μs40.379 μs4 B
Morpeh_Direct03,934.95 μs63.272 μs8 B
LeopotamEcs10176.98 μs2.752 μs-
DefaultEcs_MultiThread10209.11 μs10.346 μs1 B
LeopotamEcsLite10531.99 μs10.283 μs1 B
DefaultEcs_MonoThread10571.35 μs12.808 μs97 B
RelEcs101,138.55 μs35.671 μs170 B
SveltoECS101,204.02 μs6.929 μs2 B
MonoGameExtended102,437.67 μs38.901 μs164 B
Morpeh_Stash108,713.33 μs169.092 μs17 B
Morpeh_Direct109,810.58 μs126.514 μs17 B

SystemWithThreeComponents

Modify entities with three components. The padding aims to simulate real situation when processed entities and their components are not sequential.

MethodEntityPaddingMeanStdDevAllocated
FrifloEngineEcs_MultiThread015.47 μs0.288 μs-
Frent_Simd019.48 μs0.083 μs-
Myriad_MultiThreadChunk020.14 μs0.143 μs9216 B
FrifloEngineEcs_SIMD_MonoThread020.36 μs0.082 μs-
TinyEcs_EachJob030.24 μs2.122 μs1560 B
Arch_MultiThread035.89 μs0.475 μs-
HypEcs_MonoThread053.08 μs0.415 μs152 B
Frent_QueryInline053.71 μs0.341 μs-
TinyEcs_Each054.13 μs0.134 μs-
HypEcs_MultiThread056.12 μs0.281 μs1912 B
Myriad_SingleThread062.23 μs0.304 μs-
Myriad_SingleThreadChunk063.69 μs0.366 μs-
Arch_MonoThread071.83 μs0.581 μs-
Fennecs_Raw075.16 μs0.281 μs-
FrifloEngineEcs_MonoThread076.40 μs0.464 μs-
Myriad_MultiThread077.50 μs0.426 μs25560 B
Fennecs_ForEach087.11 μs0.486 μs-
Frent_QueryDelegate088.61 μs0.468 μs-
Myriad_Delegate093.16 μs0.483 μs-
Fennecs_Job0108.20 μs0.412 μs-
FlecsNet_Iter0114.56 μs1.236 μs-
DefaultEcs_MultiThread0123.82 μs2.006 μs-
FlecsNet_Each0164.39 μs1.348 μs-
Arch_MonoThread_SourceGenerated0192.44 μs0.719 μs-
DefaultEcs_MonoThread0233.46 μs1.049 μs-
LeopotamEcs0259.06 μs1.430 μs1 B
Myriad_Enumerable0263.68 μs1.395 μs1 B
SveltoECS0310.69 μs0.254 μs1 B
LeopotamEcsLite0347.98 μs1.823 μs1 B
RelEcs0573.73 μs12.679 μs217 B
MonoGameExtended0799.64 μs6.366 μs161 B
Morpeh_Stash02,837.66 μs19.817 μs4 B
Morpeh_Direct04,587.78 μs39.342 μs8 B
0
LeopotamEcs10275.19 μs1.071 μs1 B
DefaultEcs_MultiThread10768.71 μs17.955 μs1 B
DefaultEcs_MonoThread10781.55 μs8.936 μs1 B
LeopotamEcsLite10819.39 μs10.878 μs1 B
RelEcs101,701.47 μs54.946 μs218 B
MonoGameExtended103,126.94 μs30.319 μs164 B
Morpeh_Stash109,875.96 μs129.094 μs17 B
Morpeh_Direct1011,816.66 μs106.962 μs17 B
SveltoECS10NANANA

SystemWithTwoComponentsMultipleComposition

Modify entities with two components while different entity compositions match the the components query.

MethodMeanStdDevAllocated
FrifloEngineEcs_MultiThread12.43 μs1.049 μs-
Frent_Simd14.03 μs0.122 μs-
FrifloEngineEcs_SIMD_MonoThread14.34 μs0.058 μs-
Myriad_SingleThreadChunk_SIMD16.32 μs0.128 μs-
Myriad_MultiThreadChunk17.14 μs0.115 μs9216 B
TinyEcs_EachJob23.85 μs1.105 μs1552 B
Arch_MultiThread32.02 μs0.144 μs-
TinyEcs_Each33.41 μs0.314 μs-
HypEcs_MonoThread44.68 μs0.205 μs112 B
Frent_QueryInline44.93 μs0.172 μs-
Arch_MonoThread_SourceGenerated47.84 μs0.226 μs-
Myriad_SingleThreadChunk48.31 μs0.189 μs-
HypEcs_MultiThread49.12 μs0.274 μs1872 B
Frent_QueryDelegate51.48 μs0.174 μs-
Myriad_SingleThread52.64 μs0.246 μs-
FrifloEngineEcs_MonoThread56.93 μs0.327 μs-
Arch_MonoThread57.47 μs0.314 μs-
Fennecs_Raw58.86 μs0.215 μs-
Fennecs_ForEach63.21 μs0.372 μs-
Myriad_MultiThread68.27 μs0.339 μs20865 B
FlecsNet_Iter79.81 μs0.420 μs-
Fennecs_Job94.79 μs1.576 μs-
DefaultEcs_MultiThread108.93 μs3.569 μs-
Myriad_Delegate113.14 μs0.362 μs-
DefaultEcs_MonoThread124.09 μs0.978 μs-
FlecsNet_Each134.08 μs0.238 μs-
LeopotamEcs158.35 μs1.551 μs-
Myriad_Enumerable200.01 μs3.006 μs-
LeopotamEcsLite216.20 μs1.068 μs-
SveltoECS223.22 μs0.700 μs-
RelEcs355.92 μs7.512 μs169 B
MonoGameExtended534.19 μs10.930 μs161 B
Morpeh_Stash2,380.69 μs40.379 μs4 B
Morpeh_Direct3,934.95 μs63.272 μs8 B

Other benchmarks

While we are only looking at c# libs here, you may want to check other benchmarks for different langage. This list is not exaustive obviously, feel free to open a MR to add more if you are interested.