Git Product home page Git Product logo

ecs_benchmark's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ecs_benchmark's Issues

Mustache benchmark update

Hi, there is 2 ways you can improve performance of tests: "Get n components from Entity".

  1. If you don't need mutable component, you can require "const T" instead of "T". Mustache has built in version control system, so each time you get mutable component mustache updates component version.
  2. If you 100% sure that entity is valid and has component you can get it this way world.entities().getComponent<const T, mustache::FunctionSafety::kUnsafe>(entity);`

cmake fails

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)

The DataSystem::update function is invalidating some of the results

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.

Failing to build on Windows due to missing Artemis github?

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?

Fix CI build - mustache Framework

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 {
      |                            ^
      |                            ::

Current Workaround

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.

Timing and creating entities

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.

Updated EnTT

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.

The log scaling of the graphs is distorting differences between libraries

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: NDEBUG

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.

Suggestion: add `EnTT` to the comparison

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.