-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider making ty::t "fatter" #2476
Comments
Nominating for "maturity #4 - well-covered". |
possible perf win, not blocking ability-to-measure-quality. |
Bug triage. Not a release blocker. |
triage: unsure what the situation is today compared to then. |
TypeVariants is 4 words ATM (= rustc 1.2.0). |
This is so ancient I imagine it has nothing to do with today's rustc. |
From a quick look, |
clarifying comments for target-dir handling I thought we could simplify this logic, but alas, `cargo metadata --target-dir` is not a thing (even though the effective target-dir *does* affect the metadata).
We could possibly save some time over our structural hashing and equality code if we revamped
ty::t
to become a packedu64
value in something approaching this form:We need several side tables:
By "linearized" I mean that the type in question is converted into a list and concatenated into one large string of types encoded in this way. So, for example, a list of 4 types would be 16 bytes long (but note that there are some complications with function parameter modes). This byte string forms the key in the table; thus there is never any need to traverse pointers when doing comparisons for equality, as we simply compare byte strings.
This is very rough, but I think it might speed things up.
The text was updated successfully, but these errors were encountered: