about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-11 19:36:54 +0000
committerbors <bors@rust-lang.org>2021-05-11 19:36:54 +0000
commit5c029265465301fe9cb3960ce2a5da6c99b8dcf2 (patch)
tree71a8a2d6ea621adaed0eaaa8e21231eeeebd40c6 /compiler/rustc_codegen_llvm/src
parentba8d7e2cb7cfc87070585c17cd0aa4ae7f091a08 (diff)
parent728204b40efe11ecc866387924a57c684786e2b9 (diff)
downloadrust-5c029265465301fe9cb3960ce2a5da6c99b8dcf2.tar.gz
rust-5c029265465301fe9cb3960ce2a5da6c99b8dcf2.zip
Auto merge of #84904 - ssomers:btree_drop_kv_in_place, r=Mark-Simulacrum
BTree: no longer copy keys and values before dropping them

When dropping BTreeMap or BTreeSet instances, keys-value pairs are up to now each copied and then dropped, at least according to source code. This is because the code for dropping and for iterators is shared.

This PR postpones the treatment of doomed key-value pairs from the intermediate functions `deallocating_next`(`_back`) to the last minute, so the we can drop the keys and values in place. According to the library/alloc benchmarks, this does make a difference, (and a positive difference with an `#[inline]` on `drop_key_val`). It does not change anything for #81444 though.

r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions