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

smallvec performance issues on common store operations #1748

Closed
teh-cmc opened this issue Mar 31, 2023 · 2 comments
Closed

smallvec performance issues on common store operations #1748

teh-cmc opened this issue Mar 31, 2023 · 2 comments
Labels
🏹 arrow concerning arrow 🚀 performance Optimization, memory use, etc ⛃ re_datastore affects the datastore itself

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Mar 31, 2023

See #1747 for detailed benchmarks.

The obvious solution seems to be to simply switch to tinyvec which:

  • doesn't exhibit the same issues
  • doesn't have any unsafe code
  • has more features

The only downside is the Default requirement: for those cases where Default is not an option, a vanilla Vec seems like the best bet.

@teh-cmc teh-cmc added 🏹 arrow concerning arrow ⛃ re_datastore affects the datastore itself 🚀 performance Optimization, memory use, etc labels Mar 31, 2023
@Wumpf
Copy link
Member

Wumpf commented Mar 31, 2023

a vanilla Vec seems like the best bet.

not necessarily though I'd argue: Sure your benchmark shows quite a few issues on access performance, but I'd expect SmallVecs that stay in their "small bound" to still have way better behavior access behavior on cold cache (which is always a great claim to put out there because it's so hard to prove, heh) than Vec. I mean, all the reasons for why one would like to avoid the heap allocation/Vec are still there obviously

@teh-cmc
Copy link
Member Author

teh-cmc commented Apr 4, 2023

This is appropriately documented and benchmarked now so this issue effectively fixed; each system will have to act accordingly depending on their tradeoffs. Closing.

@teh-cmc teh-cmc closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏹 arrow concerning arrow 🚀 performance Optimization, memory use, etc ⛃ re_datastore affects the datastore itself
Projects
None yet
Development

No branches or pull requests

2 participants