-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Avoid symbol interning in file_metadata
.
#60973
Conversation
This commit changes `created_files` so it uses strings directly as keys, rather than symbols derived from the strings. This avoids the cost of having to do the hash table lookups to produce the symbols from the strings. The commit also uses `entry` to avoid doing a repeated hash table lookup (`get` + `insert`). Note that PR rust-lang#60467 improved this code somewhat; this is a further improvement.
@bors try |
⌛ Trying commit c5d9401 with merge e11f8591b0bf303236feec74e4b2de46f82db752... |
LGTM, but I'm not able to approve PRs. |
@davidtwco: Has your status changed recently? You approved #60467, which was related. |
It has. Can chat on Zulip if you want to know more. |
☀️ Try build successful - checks-travis |
@rust-timer build e11f8591b0bf303236feec74e4b2de46f82db752 |
Success: Queued e11f8591b0bf303236feec74e4b2de46f82db752 with parent caef1e8, comparison URL. |
Finished benchmarking try commit e11f8591b0bf303236feec74e4b2de46f82db752: comparison url |
The perf results are weak. The new code is arguably cleaner, reducing the number of arguments. @michaelwoerister, I'll let you decide if it's worth taking. |
Yes, the new code is cleaner. Thanks, @nnethercote! @bors r+ rollup |
📌 Commit c5d9401 has been approved by |
⌛ Testing commit c5d9401 with merge b02dc3ce95855e249764e18415a05555ae4202c5... |
@bors retry Yielding priority to the beta release. |
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry |
… r=michaelwoerister Avoid symbol interning in `file_metadata`. This commit changes `created_files` so it uses strings directly as keys, rather than symbols derived from the strings. This avoids the cost of having to do the hash table lookups to produce the symbols from the strings. The commit also uses `entry` to avoid doing a repeated hash table lookup (`get` + `insert`). Note that PR rust-lang#60467 improved this code somewhat; this is a further improvement. r? @davidtwco
… r=michaelwoerister Avoid symbol interning in `file_metadata`. This commit changes `created_files` so it uses strings directly as keys, rather than symbols derived from the strings. This avoids the cost of having to do the hash table lookups to produce the symbols from the strings. The commit also uses `entry` to avoid doing a repeated hash table lookup (`get` + `insert`). Note that PR rust-lang#60467 improved this code somewhat; this is a further improvement. r? @davidtwco
… r=michaelwoerister Avoid symbol interning in `file_metadata`. This commit changes `created_files` so it uses strings directly as keys, rather than symbols derived from the strings. This avoids the cost of having to do the hash table lookups to produce the symbols from the strings. The commit also uses `entry` to avoid doing a repeated hash table lookup (`get` + `insert`). Note that PR rust-lang#60467 improved this code somewhat; this is a further improvement. r? @davidtwco
… r=michaelwoerister Avoid symbol interning in `file_metadata`. This commit changes `created_files` so it uses strings directly as keys, rather than symbols derived from the strings. This avoids the cost of having to do the hash table lookups to produce the symbols from the strings. The commit also uses `entry` to avoid doing a repeated hash table lookup (`get` + `insert`). Note that PR rust-lang#60467 improved this code somewhat; this is a further improvement. r? @davidtwco
Rollup of 10 pull requests Successful merges: - #59742 (Move `edition` outside the hygiene lock and avoid accessing it) - #60581 (convert custom try macro to `?`) - #60963 (Update boxed::Box docs on memory layout) - #60973 (Avoid symbol interning in `file_metadata`.) - #60982 (Do not fail on child without DefId) - #60991 (LocalDecl push returns Local len) - #60995 (Add stream_to_parser_with_base_dir) - #60998 (static_assert: make use of anonymous constants) - #61003 (Remove impls for `InternedString`/string equality.) - #61006 (adjust deprecation date of mem::uninitialized) Failed merges: r? @ghost
This commit changes
created_files
so it uses strings directly as keys,rather than symbols derived from the strings. This avoids the cost of
having to do the hash table lookups to produce the symbols from the
strings.
The commit also uses
entry
to avoid doing a repeated hash table lookup(
get
+insert
).Note that PR #60467 improved this code somewhat; this is a further
improvement.
r? @davidtwco