-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bevy_<util/ecs>] Better SparseArray performance
Problem: - bevy_ecs::SparseArray uses an `Option<T>` internally to represent is the value is valid or not. - This causes extra branching as well as extra memory overhead due to Option's discriminatior. Solution: - Implement a `PackedOption` class which uses a value of `T` to represent the `None` state. - Have SparseArray use `PackedOption` internally over `Option`.
- Loading branch information
1 parent
2390bee
commit da0235a
Showing
5 changed files
with
351 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.