{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/27246","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/27246/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/27246/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/27246/events","html_url":"https://github.com/rust-lang/rust/pull/27246","id":96899365,"number":27246,"title":"replace `RandomState`'s per-instance seed with a per-thread one","user":{"login":"apasel422","id":8644784,"avatar_url":"https://avatars.githubusercontent.com/u/8644784?v=3","gravatar_id":"","url":"https://api.github.com/users/apasel422","html_url":"https://github.com/apasel422","followers_url":"https://api.github.com/users/apasel422/followers","following_url":"https://api.github.com/users/apasel422/following{/other_user}","gists_url":"https://api.github.com/users/apasel422/gists{/gist_id}","starred_url":"https://api.github.com/users/apasel422/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apasel422/subscriptions","organizations_url":"https://api.github.com/users/apasel422/orgs","repos_url":"https://api.github.com/users/apasel422/repos","events_url":"https://api.github.com/users/apasel422/events{/privacy}","received_events_url":"https://api.github.com/users/apasel422/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Gankro","id":1136864,"avatar_url":"https://avatars.githubusercontent.com/u/1136864?v=3","gravatar_id":"","url":"https://api.github.com/users/Gankro","html_url":"https://github.com/Gankro","followers_url":"https://api.github.com/users/Gankro/followers","following_url":"https://api.github.com/users/Gankro/following{/other_user}","gists_url":"https://api.github.com/users/Gankro/gists{/gist_id}","starred_url":"https://api.github.com/users/Gankro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gankro/subscriptions","organizations_url":"https://api.github.com/users/Gankro/orgs","repos_url":"https://api.github.com/users/Gankro/repos","events_url":"https://api.github.com/users/Gankro/events{/privacy}","received_events_url":"https://api.github.com/users/Gankro/received_events","type":"User","site_admin":false},"milestone":null,"comments":22,"created_at":"2015-07-23T20:32:01Z","updated_at":"2015-07-24T01:01:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/27246","html_url":"https://github.com/rust-lang/rust/pull/27246","diff_url":"https://github.com/rust-lang/rust/pull/27246.diff","patch_url":"https://github.com/rust-lang/rust/pull/27246.patch"},"body":"closes #27243"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/124285071","html_url":"https://github.com/rust-lang/rust/pull/27246#issuecomment-124285071","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/27246","id":124285071,"user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T01:01:36Z","updated_at":"2015-07-24T01:01:36Z","body":"> The std collections library goes through a fair bit of effort to ensure no-op collections are as minimal as possible, and I think that's a good philosophy to have.\r\n\r\nIsn't this primarily to avoid unnecessary allocations, though? I wasn't under the impression that this was done for performance reasons.\r\n\r\n> One option would be to just defer hasher initialization to allocation time (perhaps with mem::uninitialized? -- should be safe since we don't query the hasher when we're unallocated).\r\n\r\nI think this could work although we'd want to be somewhat careful here. Technically the keys only need to be initialized on the first insertion where we can modify the keys with `&mut self`, if we instead tried to modify it on first *use* then a `find` could require mutation, forcing our hand at using something like `Cell`, `Mutex`, or `AtomicUsize`"}}