Hi @Vadim Petrochenkov, I stumbled upon https://github.com/rust-lang/rust/issues/49300#issuecomment-525531109 recently.
Has this proposal ever been implemented? Do you still think it worth pursuing?
IIRC, @Aaron Hill tried it when implementing https://github.com/rust-lang/rust/pull/72121 and it was found too expensive to construct a
DefId for every expansion.
ExpnIds don't currently have a stable representation, but are instead serialized as is (as crate-local IDs) and then somehow remapped into fresh crate-local
ExpnIds during deserialization, I don't remember the details.
Ok, I did not realize that creating a DefPath was that costly. Did you try having ExpnId relative to DefPath, without actually creating a DefPath?
Here's the perf run from when I tried it: https://github.com/rust-lang/rust/pull/72121#issuecomment-627093462
there was some other hygiene stuff mixed in with that commit, so that perf run might be an overestimate
The diff between the first and the last perf run allows to remove this overestimate.
I don't think any of the (non-incremental) def path table stuff has changed since I did that perf run
but take that perf run with a grain of salt
I'll ask some silly questions:
ExpnIds? (In single-crate incremental case, in cross-crate cases)
ExpnIds do we have actually, besides def-paths + def-path-local indices/offsets?
Last updated: Oct 21 2021 at 21:32 UTC