diff options
| author | Tyson Nottingham <tgnottingham@gmail.com> | 2020-12-10 21:34:28 -0800 |
|---|---|---|
| committer | Tyson Nottingham <tgnottingham@gmail.com> | 2021-04-13 09:48:58 -0700 |
| commit | b43e8e248bfba9e8d26821c6d98deba94d024abf (patch) | |
| tree | 76130daddcbd70a984407876a414aa1e2bdaf502 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | 1f32d40ac3c51d6867fc6969e52e960452a40652 (diff) | |
| download | rust-b43e8e248bfba9e8d26821c6d98deba94d024abf.tar.gz rust-b43e8e248bfba9e8d26821c6d98deba94d024abf.zip | |
BufWriter: avoid using expensive Vec methods
We use a Vec as our internal, constant-sized buffer, but the overhead of using methods like `extend_from_slice` can be enormous, likely because they don't get inlined, because `Vec` has to repeat bounds checks that we've already done, and because it makes considerations for things like reallocating, even though they should never happen.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions
