{"action":"closed","number":28341,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/28341","id":44723965,"html_url":"https://github.com/rust-lang/rust/pull/28341","diff_url":"https://github.com/rust-lang/rust/pull/28341.diff","patch_url":"https://github.com/rust-lang/rust/pull/28341.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/28341","number":28341,"state":"closed","locked":false,"title":"Two optimizations to metadata hashing","user":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"body":"I've been sitting on these for a week because I can't verify they produce real wins, but they are in theory more efficient.\r\n\r\nOne patch expands the number of buckets in the metadata index's hash table from 256 to 4096. I observed that in Servo these buckets were always very full, imposing lots of linear scanning on every lookup.\r\n\r\nThe second patch uses FnvHasher instead of SipHasher to generate the indexes, which should be lots faster for these short keys.\r\n\r\nI wasn't going to post this because I can't prove it's better, but @pcwalton inspired me that microoptimizations can add up (ala SQLite's recent work).","created_at":"2015-09-10T21:50:58Z","updated_at":"2015-09-10T21:53:17Z","closed_at":"2015-09-10T21:53:17Z","merged_at":null,"merge_commit_sha":null,"assignee":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/28341/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/28341/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/28341/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/f8a035d5541993e7ce22f9ef64b7b686f61615e1","head":{"label":"brson:metahash","ref":"metahash","sha":"f8a035d5541993e7ce22f9ef64b7b686f61615e1","user":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"repo":{"id":779820,"name":"rust","full_name":"brson/rust","owner":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brson/rust","description":"pursuing the trifecta","fork":true,"url":"https://api.github.com/repos/brson/rust","forks_url":"https://api.github.com/repos/brson/rust/forks","keys_url":"https://api.github.com/repos/brson/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brson/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brson/rust/teams","hooks_url":"https://api.github.com/repos/brson/rust/hooks","issue_events_url":"https://api.github.com/repos/brson/rust/issues/events{/number}","events_url":"https://api.github.com/repos/brson/rust/events","assignees_url":"https://api.github.com/repos/brson/rust/assignees{/user}","branches_url":"https://api.github.com/repos/brson/rust/branches{/branch}","tags_url":"https://api.github.com/repos/brson/rust/tags","blobs_url":"https://api.github.com/repos/brson/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brson/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brson/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/brson/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brson/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/brson/rust/languages","stargazers_url":"https://api.github.com/repos/brson/rust/stargazers","contributors_url":"https://api.github.com/repos/brson/rust/contributors","subscribers_url":"https://api.github.com/repos/brson/rust/subscribers","subscription_url":"https://api.github.com/repos/brson/rust/subscription","commits_url":"https://api.github.com/repos/brson/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/brson/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/brson/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/brson/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/brson/rust/contents/{+path}","compare_url":"https://api.github.com/repos/brson/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brson/rust/merges","archive_url":"https://api.github.com/repos/brson/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brson/rust/downloads","issues_url":"https://api.github.com/repos/brson/rust/issues{/number}","pulls_url":"https://api.github.com/repos/brson/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/brson/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/brson/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brson/rust/labels{/name}","releases_url":"https://api.github.com/repos/brson/rust/releases{/id}","created_at":"2010-07-16T23:45:53Z","updated_at":"2015-05-01T18:47:25Z","pushed_at":"2015-09-10T21:43:18Z","git_url":"git://github.com/brson/rust.git","ssh_url":"git@github.com:brson/rust.git","clone_url":"https://github.com/brson/rust.git","svn_url":"https://github.com/brson/rust","homepage":"http://www.rust-lang.org","size":328025,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"98eeded5873f6c92fbbb0d267b5dbf1887702a7b","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"A safe, concurrent, practical language.","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2015-09-10T21:33:20Z","pushed_at":"2015-09-10T21:50:58Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":676193,"stargazers_count":13288,"watchers_count":13288,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2576,"mirror_url":null,"open_issues_count":2266,"forks":2576,"open_issues":2266,"watchers":13288,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/28341"},"html":{"href":"https://github.com/rust-lang/rust/pull/28341"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/28341"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/28341/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/28341/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/28341/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/f8a035d5541993e7ce22f9ef64b7b686f61615e1"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":0,"commits":2,"additions":9,"deletions":9,"changed_files":2}}