-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
ThinVec currently lacks the splice method. In rust-lang/rust#104754 I converted a bunch of Vec instances in rustc to ThinVec for some performance wins. I had to change one use of splice like this:
- alternatives.splice(idx..=idx, inner);
+
+ // Equivalent to `alternatives.splice(idx..=idx, inner);`.
+ alternatives.remove(idx);
+ for p in inner.into_iter().rev() {
+ alternatives.insert(idx, p);
+ }
which could cause quadratic behaviour.
Metadata
Metadata
Assignees
Labels
No labels