A comparison between reassignment and mutation in Rust
See Cargo.toml version
See this companion Medium post for more information.
$ cargo build
$ cargo run --bin clone_bikes $ cargo run --bin mutate_bikes $ cargo run --bin clone_cars $ cargo run --bin copy_cars $ cargo run --bin mutate_cars
$ cargo build --release
$ target/release/clone_bikes $ target/release/mutate_bikes $ target/release/clone_cars $ target/release/copy_cars $ target/release/mutate_cars
$ heaptrack <your desired bin>
$ heaptrack target/release/mutate_bikes