Skip to content

Try to avoid cloning #111

@konsumlamm

Description

@konsumlamm

Some operations (most notably multiplication and division) use clone. However, this is inefficient for types with non-trivial Clone impls, such as BigInt or BigDecimal (from the bigdecimal crate). To be fair, most of the time, people will use Complex<f32> or Complex<f64>, so this isn't a major problem, but sometimes people may want to use Complex<BigInt> (for Gaussian integers) or Complex<BigDecimal> (for arbitrary precision arithmetic).

See also rust-num/num-rational#110. This has the same problems and solutions (e.g. using arithmetic on references).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions