abeimler / ecs_benchmark Goto Github PK
View Code? Open in Web Editor NEWBenchmarks of common ECS (Entity-Component-System)-Frameworks in C++ (or C)
License: MIT License
Benchmarks of common ECS (Entity-Component-System)-Frameworks in C++ (or C)
License: MIT License
Hello, if I create a benchmark for my C++ ECS (https://github.com/kirillochnev/mustache), can I publish it here?
Hi, there is 2 ways you can improve performance of tests: "Get n components from Entity".
Hi! I wrote and continue upgrading my own ecs library. Can you add it to your benchmark? Or should I preapare benchmark and send it to you?
ECS library - https://github.com/dreaw131313/Dreaw-Entity-Component-System
I tried to compile your project, so as to add to the comparison my own entity-component system. I'd like to know how far it is from the other ones in terms of performance.
Anyway, following the instructions in the README.md
and running the following command:
cmake -H. -B./build -C./build/CMakeTools/InitializeCache.cmake -DCMAKE_BUILD_TYPE=Release
I got the a lot of warnings and a blocking error, that is:
CMake Error at libs/entityx2/CMakeLists.txt:81 (add_executable):
add_executable cannot create target "entity_test" because another target
with the same name already exists. The existing target is an executable
created in source directory
"my_source_directory". See documentation
for policy CMP0002 for more details.
Call Stack (most recent call first):
libs/entityx2/CMakeLists.txt:97 (create_test)
I did some profiling and std::fmt inside of DataSystem::update is 95% of the time spent executing the benchmark.
For some perspective with 2m mixed entities the benchmark takes 260 ms with pico_ecs on my machine. Disabling the last two lines of DataSystem::update will change it to take 13ms which is more in-line with what I would expect performance to be.
This makes the difference in performance across ECS libs much more dramatic.
The CMake file targets C++20:
Line 4 in fe06d42
This chance introduced the usage of the Z
integer literal which was added in C++23:
0f3929d#diff-8defaa7f59a3df961babdf6ad7c8a1ad2f353d36c3fc9a3259764180f48bada7R84
Hi, I've been attempting to build the solution and have run into an error where the artemis git repo seems to not be publically available causing the ./configure command to fail.
I've attempted to comment out the artemis repo fetch within the main CMakeLists.txt file, to comment out the benchmark calls in the CMakeLists.txt files within src and app folders, and remove references to artemis from the run_benchmark files, but the ./configure.sh fails.
The current error:
Make Error at cmake/ClangFormat.cmake:17 (message): ClangFormat: clang-format not found! Aborting Call Stack (most recent call first): CMakeLists.txt:188 (clangformat_setup)
What do you suppose I should do?
Maybe you could remove Artemis form the project for me?
Hi. https://github.com/abeimler/ecs_benchmark#reference has bad link. Thanks.
Build Error:
In file included from /home/runner/work/ecs_benchmark/ecs_benchmark/build/_deps/mustache-src/src/mustache/ecs/system.cpp:1:
Warning: /home/runner/work/ecs_benchmark/ecs_benchmark/build/_deps/mustache-src/src/mustache/ecs/system.hpp:27:10: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword
27 | enum class SystemState : uint32_t {
| ~~~~ ^~~~~
| -----
Error: /home/runner/work/ecs_benchmark/ecs_benchmark/build/_deps/mustache-src/src/mustache/ecs/system.hpp:27:28: error: found ‘:’ in nested-name-specifier, expected ‘::’
27 | enum class SystemState : uint32_t {
| ^
| ::
Add #include <cstdint>
in mustache-src/src/mustache/ecs/system.hpp
:
system.hpp
#pragma once
#include <cstdint>
#include <mustache/utils/uncopiable.hpp>
#include <mustache/utils/type_info.hpp>
#include <set>
Or set CMake Variable -DENABLE_BENCHMARK_MUSTACHE:BOOL=OFF
to disable benchmarks for mustache.
For the 3 systems with mixed entities benchmark, is the time to create and add entities to the systems included in the total time? I've written my own simple ECS and I'm trying to recreate the benchmarks and apply them as accurately as I can.
We have recently updated EnTT.
Performance on multiple components access have been greatly improved.
As an example, when iterating two components:
0.0206747s ---> 0.00326714s
It's worth updating the results in the README if possible.
Thank you.
After removing the std::fmt locally, I can see that one lib takes 120ms to update and another takes 11ms to update in the 1-2M cateogry. But because the log scaling is trying to put them all on the same graph, that system which is 10x slower is only displayed as about 15% slower.
Perhaps the speeds can be normalized by dividing by the entity count instead.
It's also not clear what a 1-2M category is since the bencharks just measure 1M and 2M separately
pico_ecs should be compiled with the NDEBUG flag to turn off debug mode. Otherwise pico_ecs will perform a lot of checks that are not present in release mode, and thus will not accurately represent the runtime efficiency of the library.
EnTT
is a minimal and fast ECS in C++, the performance of which are comparable if not even better than the ones of entityx2
.
I'd suggest to add it to the comparison, for it offer a completely different implementation under the hood and it could be of interest for the users.
See #2 for a partial integration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.