bevy/crates/bevy_ecs/src
James Liu 2ec38d1467
Inline more ECS functions (#8083)
# Objective
Upon closer inspection, there are a few functions in the ECS that are
not being inlined, even with the highest optimizations and LTO enabled:

- Almost all
[WorldQuery::init_fetch](9fd5f20e25/results/query_get.s (L57))
calls. Affects `Query::get` calls in hot loops. In particular, the
`WorldQuery` implementation for `()` is used *everywhere* as the default
filter and is effectively a no-op.
-
[Entities::get](9fd5f20e25/results/query_get.s (L39)).
Affects `Query::get`, `World::get`, and any component insertion or
removal.
-
[Entities::set](9fd5f20e25/results/entity_remove.s (L2487)).
Affects any component insertion or removal.
-
[Tick::new](9fd5f20e25/results/entity_insert.s (L1368)).
I've only seen this in component insertion and spawning.
 - ArchetypeRow::new
 - BlobVec::set_len

Almost all of these have trivial or even empty implementations or have
significant opportunity to be optimized into surrounding code when
inlined with LTO enabled.

## Solution
Inline them
2023-04-12 19:52:06 +00:00
..
entity Inline more ECS functions (#8083) 2023-04-12 19:52:06 +00:00
query Inline more ECS functions (#8083) 2023-04-12 19:52:06 +00:00
schedule Cleaned up panic messages (#8219) 2023-04-12 18:27:28 +00:00
storage Inline more ECS functions (#8083) 2023-04-12 19:52:06 +00:00
system Non-breaking change* from UK spellings to US (#8291) 2023-04-08 16:22:46 +00:00
world Inline more ECS functions (#8083) 2023-04-12 19:52:06 +00:00
archetype.rs Inline more ECS functions (#8083) 2023-04-12 19:52:06 +00:00
bundle.rs Inline more ECS functions (#8083) 2023-04-12 19:52:06 +00:00
change_detection.rs Improve documentation for set_if_neq (#8254) 2023-03-30 15:43:13 +00:00
component.rs Inline more ECS functions (#8083) 2023-04-12 19:52:06 +00:00
event.rs Move event traces to detailed_trace! (#7732) 2023-04-11 03:37:58 +00:00
lib.rs Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
reflect.rs Bugfix: Scene reload fix (nonbreaking) (#7951) 2023-03-27 22:18:45 +00:00
removal_detection.rs Use UnsafeWorldCell to increase code quality for SystemParam (#8174) 2023-04-01 15:45:07 +00:00