about summary refs log tree commit diff
path: root/tests/codegen/box-default-debug-copies.rs
AgeCommit message (Collapse)AuthorLines
2025-01-26reduce `Box::default` stack copies in debug modeJoshua Wong-1/+4
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.
2025-01-26add test for Box::default's stack usage in debug modeJoshua Wong-0/+25