-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Allow opt-in configuration of events to use SmallVec #2071
Copy link
Copy link
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times
Description
What problem does this solve or what need does it fill?
Events inherently have variable size. This can cause weirdness with cache locality, particularly when they're stored on components ala what is being proposed in #2070.
What solution would you like?
Provide an ergonomic way to specify that the internal representation of events use a SmallVec of configurable size.
This is particularly relevant for the use case in #2070, where many uses of this pattern will store 0-2 events in 99% of cases.
What alternative(s) have you considered?
None.
Additional context
This idea came up in discussion with @TheRawMeatball.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times