rust-lang/rustfix

Performance: Use SmallVec in rustfix

deeprobin opened this issue · 1 comments

I suggest using SmallVec (smallvec crate) instead of a regular Vec to improve performance, by having a SmallVec allocate primarily on the stack and the heap is secondary.

Where this could be useful

Of course, it doesn't make sense to blindly replace something like that, but you could analyze this with benchmarks to see where a SmallVec would make sense.

Additional/useful resources

I'm going to close as I don't think performance has been much of a concern.