You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to create a TinyVec of a specific size (not capacity!), initialized to zero (or user-defined value) #210
changed the title [-]Create a TinyVec of a specific size (not capacity!), initialized to zero (or user-defined value)[/-][+]How to create a TinyVec of a specific size (not capacity!), initialized to zero (or user-defined value)[/+]on Dec 5, 2025
Activity
[-]Create a TinyVec of a specific size (not capacity!), initialized to zero (or user-defined value)[/-][+]How to create a TinyVec of a specific size (not capacity!), initialized to zero (or user-defined value)[/+]lordmulder commentedon Dec 17, 2025
I did some performance tests:
Test bench:
Results:
Version #4 wins easily 🥳
Lokathor commentedon Aug 19, 2026
Based on the benchmarks, looks like a solid answer and we can close this.
lordmulder commentedon Aug 19, 2026
Too bad nobody will find this information.
Wouldn't it make sense to have a built-in function that creates a TinyVec of specific size? (pre-filled with the given value)
Lokathor commentedon Aug 19, 2026
Yeah make a PR. You'll probably have to feature gate it behind
latest_stable_rustto pass CI.lordmulder commentedon Aug 20, 2026
Here is a first suggestion:
#224