{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/35854","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/35854/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/35854/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/35854/events","html_url":"https://github.com/rust-lang/rust/pull/35854","id":172266738,"number":35854,"title":"compute and cache HIR hashes at beginning","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"michaelwoerister","id":1825894,"avatar_url":"https://avatars.githubusercontent.com/u/1825894?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwoerister","html_url":"https://github.com/michaelwoerister","followers_url":"https://api.github.com/users/michaelwoerister/followers","following_url":"https://api.github.com/users/michaelwoerister/following{/other_user}","gists_url":"https://api.github.com/users/michaelwoerister/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwoerister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwoerister/subscriptions","organizations_url":"https://api.github.com/users/michaelwoerister/orgs","repos_url":"https://api.github.com/users/michaelwoerister/repos","events_url":"https://api.github.com/users/michaelwoerister/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwoerister/received_events","type":"User","site_admin":false},"assignees":[{"login":"michaelwoerister","id":1825894,"avatar_url":"https://avatars.githubusercontent.com/u/1825894?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwoerister","html_url":"https://github.com/michaelwoerister","followers_url":"https://api.github.com/users/michaelwoerister/followers","following_url":"https://api.github.com/users/michaelwoerister/following{/other_user}","gists_url":"https://api.github.com/users/michaelwoerister/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwoerister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwoerister/subscriptions","organizations_url":"https://api.github.com/users/michaelwoerister/orgs","repos_url":"https://api.github.com/users/michaelwoerister/repos","events_url":"https://api.github.com/users/michaelwoerister/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwoerister/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-08-20T11:27:26Z","updated_at":"2016-08-23T16:16:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/35854","html_url":"https://github.com/rust-lang/rust/pull/35854","diff_url":"https://github.com/rust-lang/rust/pull/35854.diff","patch_url":"https://github.com/rust-lang/rust/pull/35854.patch"},"body":"This avoids the compile-time overhead of computing them twice.  It also fixes\r\nan issue where the hash computed after typeck is differen than the hash before,\r\nbecause typeck mutates the def-map in place.\r\n\r\nFixes #35549.\r\nFixes #35593.\r\n\r\nSome performance measurements suggest this `HashesMap` is very small in memory (unobservable via `-Z time-passes`) and very cheap to construct. I do see some (very minor) performance wins in the incremental case after the first run -- the first run costs more because loading the dep-graph didn't have any hashing to do in that case. Example timings from two runs  of `libsyntex-syntax` -- the (1) indicates first run, (2) indicates second run, and (*) indicates both together:\r\n\r\n| Phase | Master | Branch |\r\n| ---- | ---- | ---- |\r\n| compute_hashes_map (1) | N/A | 0.343 |\r\n| load_dep_graph (1) | 0 | 0 |\r\n| serialize dep graph (1) | 4.190 | 3.920 |\r\n| total (1) | 4.190 | 4.260 |\r\n| compute_hashes_map (2) | N/A | 0.344 |\r\n| load_dep_graph (2) | 0.592 | 0.252 |\r\n| serialize dep graph (2) | 4.119 | 3.779 |\r\n| total (2) | 4.71 | 4.375 |\r\n| total (*) | 8.9 | 8.635 |\r\n\r\nr? @michaelwoerister "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/241788551","html_url":"https://github.com/rust-lang/rust/pull/35854#issuecomment-241788551","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/35854","id":241788551,"user":{"login":"michaelwoerister","id":1825894,"avatar_url":"https://avatars.githubusercontent.com/u/1825894?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwoerister","html_url":"https://github.com/michaelwoerister","followers_url":"https://api.github.com/users/michaelwoerister/followers","following_url":"https://api.github.com/users/michaelwoerister/following{/other_user}","gists_url":"https://api.github.com/users/michaelwoerister/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwoerister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwoerister/subscriptions","organizations_url":"https://api.github.com/users/michaelwoerister/orgs","repos_url":"https://api.github.com/users/michaelwoerister/repos","events_url":"https://api.github.com/users/michaelwoerister/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwoerister/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T16:16:56Z","updated_at":"2016-08-23T16:16:56Z","body":"LGTM! (except for the rogue comment in the test case)\r\nr=me with that fixed."}}
{"actor":{"display_login":"michaelwoerister"}}