Skip to content

Flecs v3.1.4

Compare
Choose a tag to compare
@SanderMertens SanderMertens released this 26 Jan 01:46
· 1176 commits to master since this release
5fc3e45

Highlights

  • Performance improvements for many core ECS operations! 🎉 (see below)
  • A new benchmark suite with more than 100 tests: https://github.com/SanderMertens/ecs_benchmark
  • Changes made to an existing component with a deferred get_mut are now immediately visible to systems & other get_mut calls (#466 (comment))

Performance improved in this release for 116 in a total of 120 benchmarks! Here are a few of the most significant improvements between v3.0.0 and v3.1.4 (which also includes improvements from command batching & the observer cache):

Benchmark v3.0.0 v3.1.4 Difference
has_id 8.92ns 4.38ns +50.90%
get_id 7.18ns 3.69ns +48.61%
get_mut_id 12.22ns 7.35ns +39.85%
set_id 29.13ns 11.85ns +59.32%
add_remove_1_tag 20.43ns 17.63ns +13.71%
add_remove_cmd_16_tags 40.40ns 17.55ns +56.56% (command batching)
get_mut_cmd_16 47.17ns 18.65ns +60.46% (command batching)
create_delete_tree_depth_10 19.27us 8.24us +57.25%
emit_propagate_depth_10 1.52us 194.33ns +87.25% (observer cache)
query_iter_16_tags_4_terms 56.39ns 26.15ns +53.63%

Release notes

This version includes the following bugfixes:

  • Ensure HAVE_EXECINFO is defined on all platforms
  • Fix compilation issue on clang 16 (thanks @gorilux!)
  • Add missing flecs_cpp.c to the meson build file
  • Fix issue where non-instanced query with multiple traversal terms did not match entities
  • Fix broken links in documentation
  • Remove <strong></strong> from documentation markdown headers
  • Fix issue where atomic id generation was used without threading
  • Fix issue where flecs::ref would store stage instead of world
  • Fix assert in observer cache after deleting parent with relationship to child
  • Fix issue with passing string to ecs_set_name that overlaps with current name
  • Fix compile error when passing existing object to set<R, T>
  • Fix memory corruption when using ecs_bulk_init with existing table
  • Fix command batching issue with adding ChildOf pair while removing name

This version includes the following improvements:

  • [core] Require entities to be alive for ECS operations
  • [core] Deferred ecs_get_mut_id now returns reference to actual component if it exists (thanks @dmlary!)
  • [c] Add matching *_DECLARE convenience macro's for each *_DEFINE macro
  • [cpp] Add world::get_ref
  • [docs] Lots of small improvements to documentation (thanks @copygirl!)
  • [docs] Move build instructions from README to Quickstart
  • [docs] Improve build instructions for gcc/clang on Windows
  • [ux] Add example for entity::emplace
  • [internals] Faster map implementation that no longer stores a variable size payload
  • [internals] Use array vs. sparse set to lookup id records with low ids
  • [internals] Replace usage of ecs_vector_t in sparse set with faster ecs_vec_t
  • [internals] Add new/faster sparse set operations that assume id is alive
  • [internals] Cleanup sparse set API
  • [internals] Replace code of ecs_has_id with faster implementation
  • [internals] Remove redundant code from table graph operations
  • [internals] Improve performance of defer/suspend mechanism
  • [internals] Improve performance of pipelines queries by adding self flag to System term

Breaking Changes:

  • Entities now must be alive before using with ECS operations (#466 (comment))
  • Deferred get_mut now returns pointer to existing component (#466 (comment))

Known issues:
#844
#765
#714
#620
#478
#314

New Contributors

Full Changelog: v3.1.3...v3.1.4