Skip to content

Commit 7f69523

Browse files
committed
Auto merge of rust-lang#140168 - joshlf:no-nfas, r=jswrenn
transmute: Mark edges by byte sets, not byte values 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`. r? `@jswrenn`
2 parents c02a4f0 + 4326a44 commit 7f69523

File tree

9 files changed

+778
-161
lines changed

9 files changed

+778
-161
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -4521,6 +4521,7 @@ dependencies = [
45214521
"rustc_hir",
45224522
"rustc_middle",
45234523
"rustc_span",
4524+
"smallvec",
45244525
"tracing",
45254526
]
45264527

compiler/rustc_transmute/Cargo.toml

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ edition = "2024"
55

66
[dependencies]
77
# tidy-alphabetical-start
8+
itertools = "0.12"
89
rustc_abi = { path = "../rustc_abi", optional = true }
910
rustc_data_structures = { path = "../rustc_data_structures" }
1011
rustc_hir = { path = "../rustc_hir", optional = true }
1112
rustc_middle = { path = "../rustc_middle", optional = true }
1213
rustc_span = { path = "../rustc_span", optional = true }
14+
smallvec = "1.8.1"
1315
tracing = "0.1"
1416
# tidy-alphabetical-end
1517

@@ -20,8 +22,3 @@ rustc = [
2022
"dep:rustc_middle",
2123
"dep:rustc_span",
2224
]
23-
24-
[dev-dependencies]
25-
# tidy-alphabetical-start
26-
itertools = "0.12"
27-
# tidy-alphabetical-end

0 commit comments

Comments
 (0)