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

std::vec's connect_vec and concat_vec are inefficient #9581

Closed
bluss opened this issue Sep 28, 2013 · 0 comments · Fixed by #9583
Closed

std::vec's connect_vec and concat_vec are inefficient #9581

bluss opened this issue Sep 28, 2013 · 0 comments · Fixed by #9583

Comments

@bluss
Copy link
Member

bluss commented Sep 28, 2013

Too much unnecessary cloning.

I'm working on these.

bors added a commit that referenced this issue Sep 28, 2013
std::vec: Sane implementations for connect_vec and concat_vec

Avoid unnecessary copying of subvectors, and calculate the needed space
beforehand. These implementations are simple but better than the
previous.

Also only implement it once, for all `Vector<T>` using:

    impl<'self, T: Clone, V: Vector<T>> VectorVector<T> for &'self [V]

Closes #9581
@bors bors closed this as completed in 24a4d0d Sep 28, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 6, 2022
`suboptimal_flops` lint for multiply and subtract

fixes rust-lang#9526

changelog: [`suboptimal_flops`] lint for multiply and subtract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant