dimforge / dimforge/nalgebra

`resize_*_mut` always clones

Open
#1,255 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

In-place resize operations all currently clone the method receiver and then pass the cloned value on to other resize methods. The subsequent resize methods may also copy all the data if, e.g., a reallocation is necessary. This often means copying all the data twice.

Using the `*_mut` methods seem strictly worse than moving the matrix into and out-of the non-`mut` versions of resize.

There are `TODOs` in the code, so I assume this was understood and accepted at the time of writing, but I wanted to raise the issue here for visibility. I may work on an PR if I find the time.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.