4 ms·
As already mentioned, Rust wasn't copying anything; the `HashMap` is not a `Copy`-able type, so it was just moved around (it's also not very large: all its item
by heftig 6y ago
As already mentioned, Rust wasn't copying anything; the `HashMap` is not a `Copy`-able type, so it was just moved around (it's also not very large: all its items are behind a pointer to the heap).
All you did was move the drop from the `fn_that_drops_heavy_things` to the end of `main`, where it is outside the timing function.