diff options
| author | Joshua Wong <joshuawong@anticentri.st> | 2025-01-26 03:36:50 -0500 |
|---|---|---|
| committer | Joshua Wong <joshuawong@anticentri.st> | 2025-01-26 03:48:27 -0500 |
| commit | 97005678c38fd391c9b502d011cc3f3d4434a18a (patch) | |
| tree | 1ba4600fb6a72a6a204c9428db946c8f67f20179 /compiler/rustc_codegen_llvm/src | |
| parent | 80faf203515bf3be214ad3ffc019b55b026b1220 (diff) | |
| download | rust-97005678c38fd391c9b502d011cc3f3d4434a18a.tar.gz rust-97005678c38fd391c9b502d011cc3f3d4434a18a.zip | |
reduce `Box::default` stack copies in debug mode
The `Box::new(T::default())` implementation of `Box::default` only had two stack copies in debug mode, compared to the current version, which has four. By avoiding creating any `MaybeUninit<T>`'s and just writing `T` directly to the `Box` pointer, the stack usage in debug mode remains the same as the old version.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
