rust/compiler/rustc_transmute/Cargo.toml
Joshua Liebow-Feeser 4326a44e6f transmutability: Mark edges by ranges, not values
In the `Tree` and `Dfa` representations of a type's layout, store byte
ranges rather than needing to separately store each byte value. This
permits us to, for example, represent a `u8` using a single 0..=255 edge
in the DFA rather than using 256 separate edges.

This leads to drastic performance improvements. For example, on the
author's 2024 MacBook Pro, the time to convert the `Tree` representation
of a `u64` to its equivalent DFA representation drops from ~8.5ms to
~1us, a reduction of ~8,500x. See `bench_dfa_from_tree`.

Similarly, the time to execute a transmutability query from `u64` to
`u64` drops from ~35us to ~1.7us, a reduction of ~20x. See
`bench_transmute`.
2025-04-23 11:45:00 -07:00

24 lines
592 B
TOML

[package]
name = "rustc_transmute"
version = "0.0.0"
edition = "2024"
[dependencies]
# tidy-alphabetical-start
itertools = "0.12"
rustc_abi = { path = "../rustc_abi", optional = true }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_hir = { path = "../rustc_hir", optional = true }
rustc_middle = { path = "../rustc_middle", optional = true }
rustc_span = { path = "../rustc_span", optional = true }
smallvec = "1.8.1"
tracing = "0.1"
# tidy-alphabetical-end
[features]
rustc = [
"dep:rustc_abi",
"dep:rustc_hir",
"dep:rustc_middle",
"dep:rustc_span",
]