Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow opt-in configuration of events to use SmallVec #2071

Open
alice-i-cecile opened this issue May 1, 2021 · 0 comments · May be fixed by #7957
Open

Allow opt-in configuration of events to use SmallVec #2071

alice-i-cecile opened this issue May 1, 2021 · 0 comments · May be fixed by #7957
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

Comments

@alice-i-cecile
Copy link
Member

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.

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times and removed S-Needs-Triage This issue needs to be labelled labels May 1, 2021
@CatThingy CatThingy linked a pull request Mar 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant