Allow opt-in configuration of events to use SmallVec #2071
Labels
A-ECS
Entities, components, systems, and events
C-Feature
A new feature, making something new possible
C-Performance
A change motivated by improving speed, memory usage or compile times
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.
The text was updated successfully, but these errors were encountered: