diff options
| author | Chayim Refael Friedman <chayimfr@gmail.com> | 2024-10-20 00:50:18 +0300 |
|---|---|---|
| committer | Chayim Refael Friedman <chayimfr@gmail.com> | 2024-10-25 06:44:56 +0300 |
| commit | fd7648d92045cf8e5b1d8a9f7751924c70be53d3 (patch) | |
| tree | 6c4c239c257b32cc97ec33ed5365abefd3e9f32e /compiler/rustc_codegen_llvm/src/attributes.rs | |
| parent | 61d14ba93727936939448f49ee50781001c5a656 (diff) | |
| download | rust-fd7648d92045cf8e5b1d8a9f7751924c70be53d3.tar.gz rust-fd7648d92045cf8e5b1d8a9f7751924c70be53d3.zip | |
Shrink `Path` to 16 bytes
Thanks to the observation (supported by counting) that the vast majority paths have neither generics no type anchors, and thanks to a new datastructure `ThinVecWithHeader` that is essentially `(T, Box<[U]>)` but with the size of a single pointer, we are able to reach this feat. This (together with `ThinVecWithHeader`) makes the possibility to shrink `TypeRef`, because most types are paths.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions
