bevy/crates/bevy_ecs/src
David M. Lary 5d9c9b85d5 Stepping disabled performance fix (#11959)
# Objective

* Fixes #11932 (performance impact when stepping is disabled)

## Solution

The `Option<FixedBitSet>` argument added to `ScheduleExecutor::run()` in
#8453 caused a measurable performance impact even when stepping is
disabled. This can be seen by the benchmark of running `Schedule:run()`
on an empty schedule in a tight loop
(https://github.com/bevyengine/bevy/issues/11932#issuecomment-1950970236).

I was able to get the same performance results as on 0.12.1 by changing
the argument
`ScheduleExecutor::run()` from `Option<FixedBitSet>` to
`Option<&FixedBitSet>`. The down-side of this change is that
`Schedule::run()` now takes about 6% longer (3.7319 ms vs 3.9855ns) when
stepping is enabled

---

## Changelog
* Change `ScheduleExecutor::run()` `_skipped_systems` from
`Option<FixedBitSet>` to `Option<&FixedBitSet>`
* Added a few benchmarks to measure `Schedule::run()` performance with
various executors
2024-02-27 17:11:42 +01:00
..
entity Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
identifier Unified identifer for entities & relations (#9797) 2024-01-13 01:09:32 +00:00
query Replace pointer castings (as) by their API equivalent (#11818) 2024-02-11 23:19:36 +00:00
reflect Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
schedule Stepping disabled performance fix (#11959) 2024-02-27 17:11:42 +01:00
storage Double the capacity when BlobVec is full (#11167) 2024-01-22 15:05:34 +00:00
system Fix double indirection when applying command queues (#11822) 2024-02-12 15:27:18 +00:00
world Use question mark operator when possible (#11865) 2024-02-14 18:44:33 +00:00
archetype.rs Make Archetypes.archetype_component_count private (#10774) 2024-02-03 00:07:50 +00:00
bundle.rs Fix small docs misformat in BundleInfo::new (#11855) 2024-02-13 22:14:05 +00:00
change_detection.rs Mention Resource where missing from component/resource related type docs (#11769) 2024-02-08 06:31:48 +00:00
component.rs Mention Resource where missing from component/resource related type docs (#11769) 2024-02-08 06:31:48 +00:00
event.rs Fix bug where events are not being dropped (#11528) 2024-02-02 21:14:54 +00:00
lib.rs Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
removal_detection.rs Docs reflect that RemovalDetection also yields despawned entities (#11795) 2024-02-10 11:18:05 +00:00