Skip to content

Commit

Permalink
Add #[cold] to QueryIter::next_archetype
Browse files Browse the repository at this point in the history
  • Loading branch information
a1phyr committed Sep 21, 2023
1 parent 6b9d4ff commit bd7f882
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ impl<'q, Q: Query> QueryIter<'q, Q> {
/// Advance query to the next archetype
///
/// Outlined from `Iterator::next` for improved iteration performance.
#[cold]
fn next_archetype(&mut self) -> Option<()> {
let archetype = self.archetypes.next()?;
let archetype = unsafe { self.world.archetypes_inner().get_unchecked(archetype) };
Expand Down

0 comments on commit bd7f882

Please sign in to comment.