Rust Internals
Niche optimization makes use of niches, but padding bytes are neglected
compiler
tczajka
July 23, 2024, 11:47am
2
It can't because padding bytes can be overwritten:
12 Likes
show post in topic
Related topics
Topic
Replies
Views
Activity
Missed layout optimization
compiler
25
1590
December 21, 2023
Missed niche optimization on unions
language design
29
2890
February 18, 2022
Pre-RFC - Add alignment niches for references
language design
18
3406
December 10, 2021
Store Option discriminant in Containing type (optimization)
compiler
6
832
May 9, 2025
Pre-pre-pre-... RFC: Explicit padding bytes (`AlwaysUninit<const NBYTES: usize>`)
6
1165
August 2, 2021