{"action":"closed","number":1038,"pull_request":{"url":"https://api.github.com/repos/nsqio/nsq/pulls/1038","id":192210719,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjEwNzE5","html_url":"https://github.com/nsqio/nsq/pull/1038","diff_url":"https://github.com/nsqio/nsq/pull/1038.diff","patch_url":"https://github.com/nsqio/nsq/pull/1038.patch","issue_url":"https://api.github.com/repos/nsqio/nsq/issues/1038","number":1038,"state":"closed","locked":false,"title":"nsqlookupd: use map for producers - with benchmarks","user":{"login":"ploxiln","id":649835,"node_id":"MDQ6VXNlcjY0OTgzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/649835?v=4","gravatar_id":"","url":"https://api.github.com/users/ploxiln","html_url":"https://github.com/ploxiln","followers_url":"https://api.github.com/users/ploxiln/followers","following_url":"https://api.github.com/users/ploxiln/following{/other_user}","gists_url":"https://api.github.com/users/ploxiln/gists{/gist_id}","starred_url":"https://api.github.com/users/ploxiln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ploxiln/subscriptions","organizations_url":"https://api.github.com/users/ploxiln/orgs","repos_url":"https://api.github.com/users/ploxiln/repos","events_url":"https://api.github.com/users/ploxiln/events{/privacy}","received_events_url":"https://api.github.com/users/ploxiln/received_events","type":"User","site_admin":false},"body":"I refactored and added a bit to @andyxning's benchmark from #1036 \r\n\r\nResults:\r\n\r\n```\r\nbenchmark                                  old ns/op     new ns/op     delta\r\nBenchmarkLookupRegistrations8x8-4          1065          1088          +2.16%\r\nBenchmarkLookupRegistrations8x64-4         2264          1165          -48.54%\r\nBenchmarkLookupRegistrations64x64-4        18669         8364          -55.20%\r\nBenchmarkLookupRegistrations64x512-4       134794        10933         -91.89%\r\nBenchmarkLookupRegistrations512x512-4      1698650       150939        -91.11%\r\nBenchmarkLookupRegistrations512x2048-4     5751659       177923        -96.91%\r\nBenchmarkFindProducers8x8-4                244           619           +153.69%\r\nBenchmarkFindProducers8x64-4               243           2259          +829.63%\r\nBenchmarkFindProducers64x64-4              244           2437          +898.77%\r\nBenchmarkFindProducers64x512-4             245           16447         +6613.06%\r\nBenchmarkFindProducers512x512-4            277           16825         +5974.01%\r\nBenchmarkFindProducers512x2048-4           277           83689         +30112.64%\r\n```\r\n\r\ntake a look @mreiferson ","created_at":"2018-06-02T18:15:18Z","updated_at":"2018-06-03T19:08:32Z","closed_at":"2018-06-03T19:08:31Z","merged_at":"2018-06-03T19:08:31Z","merge_commit_sha":"3bd8b9dbbef6fb384f4b356fb5bbf94bc54339c7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":108368125,"node_id":"MDU6TGFiZWwxMDgzNjgxMjU=","url":"https://api.github.com/repos/nsqio/nsq/labels/perf","name":"perf","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nsqio/nsq/pulls/1038/commits","review_comments_url":"https://api.github.com/repos/nsqio/nsq/pulls/1038/comments","review_comment_url":"https://api.github.com/repos/nsqio/nsq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nsqio/nsq/issues/1038/comments","statuses_url":"https://api.github.com/repos/nsqio/nsq/statuses/f8b49e6cd59b311d016088354ab423ee5479a82b","head":{"label":"ploxiln:lookupd_producer_map","ref":"lookupd_producer_map","sha":"f8b49e6cd59b311d016088354ab423ee5479a82b","user":{"login":"ploxiln","id":649835,"node_id":"MDQ6VXNlcjY0OTgzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/649835?v=4","gravatar_id":"","url":"https://api.github.com/users/ploxiln","html_url":"https://github.com/ploxiln","followers_url":"https://api.github.com/users/ploxiln/followers","following_url":"https://api.github.com/users/ploxiln/following{/other_user}","gists_url":"https://api.github.com/users/ploxiln/gists{/gist_id}","starred_url":"https://api.github.com/users/ploxiln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ploxiln/subscriptions","organizations_url":"https://api.github.com/users/ploxiln/orgs","repos_url":"https://api.github.com/users/ploxiln/repos","events_url":"https://api.github.com/users/ploxiln/events{/privacy}","received_events_url":"https://api.github.com/users/ploxiln/received_events","type":"User","site_admin":false},"repo":{"id":6191589,"node_id":"MDEwOlJlcG9zaXRvcnk2MTkxNTg5","name":"nsq","full_name":"ploxiln/nsq","owner":{"login":"ploxiln","id":649835,"node_id":"MDQ6VXNlcjY0OTgzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/649835?v=4","gravatar_id":"","url":"https://api.github.com/users/ploxiln","html_url":"https://github.com/ploxiln","followers_url":"https://api.github.com/users/ploxiln/followers","following_url":"https://api.github.com/users/ploxiln/following{/other_user}","gists_url":"https://api.github.com/users/ploxiln/gists{/gist_id}","starred_url":"https://api.github.com/users/ploxiln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ploxiln/subscriptions","organizations_url":"https://api.github.com/users/ploxiln/orgs","repos_url":"https://api.github.com/users/ploxiln/repos","events_url":"https://api.github.com/users/ploxiln/events{/privacy}","received_events_url":"https://api.github.com/users/ploxiln/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ploxiln/nsq","description":"realtime distributed message processing at scale","fork":true,"url":"https://api.github.com/repos/ploxiln/nsq","forks_url":"https://api.github.com/repos/ploxiln/nsq/forks","keys_url":"https://api.github.com/repos/ploxiln/nsq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ploxiln/nsq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ploxiln/nsq/teams","hooks_url":"https://api.github.com/repos/ploxiln/nsq/hooks","issue_events_url":"https://api.github.com/repos/ploxiln/nsq/issues/events{/number}","events_url":"https://api.github.com/repos/ploxiln/nsq/events","assignees_url":"https://api.github.com/repos/ploxiln/nsq/assignees{/user}","branches_url":"https://api.github.com/repos/ploxiln/nsq/branches{/branch}","tags_url":"https://api.github.com/repos/ploxiln/nsq/tags","blobs_url":"https://api.github.com/repos/ploxiln/nsq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ploxiln/nsq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ploxiln/nsq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ploxiln/nsq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ploxiln/nsq/statuses/{sha}","languages_url":"https://api.github.com/repos/ploxiln/nsq/languages","stargazers_url":"https://api.github.com/repos/ploxiln/nsq/stargazers","contributors_url":"https://api.github.com/repos/ploxiln/nsq/contributors","subscribers_url":"https://api.github.com/repos/ploxiln/nsq/subscribers","subscription_url":"https://api.github.com/repos/ploxiln/nsq/subscription","commits_url":"https://api.github.com/repos/ploxiln/nsq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ploxiln/nsq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ploxiln/nsq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ploxiln/nsq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ploxiln/nsq/contents/{+path}","compare_url":"https://api.github.com/repos/ploxiln/nsq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ploxiln/nsq/merges","archive_url":"https://api.github.com/repos/ploxiln/nsq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ploxiln/nsq/downloads","issues_url":"https://api.github.com/repos/ploxiln/nsq/issues{/number}","pulls_url":"https://api.github.com/repos/ploxiln/nsq/pulls{/number}","milestones_url":"https://api.github.com/repos/ploxiln/nsq/milestones{/number}","notifications_url":"https://api.github.com/repos/ploxiln/nsq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ploxiln/nsq/labels{/name}","releases_url":"https://api.github.com/repos/ploxiln/nsq/releases{/id}","deployments_url":"https://api.github.com/repos/ploxiln/nsq/deployments","created_at":"2012-10-12T14:43:30Z","updated_at":"2018-06-03T17:43:14Z","pushed_at":"2018-06-03T17:46:01Z","git_url":"git://github.com/ploxiln/nsq.git","ssh_url":"git@github.com:ploxiln/nsq.git","clone_url":"https://github.com/ploxiln/nsq.git","svn_url":"https://github.com/ploxiln/nsq","homepage":"","size":9801,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nsqio:master","ref":"master","sha":"6e918928d65295d3d3e0d662d52ddb02c2946678","user":{"login":"nsqio","id":8295919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyOTU5MTk=","avatar_url":"https://avatars3.githubusercontent.com/u/8295919?v=4","gravatar_id":"","url":"https://api.github.com/users/nsqio","html_url":"https://github.com/nsqio","followers_url":"https://api.github.com/users/nsqio/followers","following_url":"https://api.github.com/users/nsqio/following{/other_user}","gists_url":"https://api.github.com/users/nsqio/gists{/gist_id}","starred_url":"https://api.github.com/users/nsqio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsqio/subscriptions","organizations_url":"https://api.github.com/users/nsqio/orgs","repos_url":"https://api.github.com/users/nsqio/repos","events_url":"https://api.github.com/users/nsqio/events{/privacy}","received_events_url":"https://api.github.com/users/nsqio/received_events","type":"Organization","site_admin":false},"repo":{"id":4307108,"node_id":"MDEwOlJlcG9zaXRvcnk0MzA3MTA4","name":"nsq","full_name":"nsqio/nsq","owner":{"login":"nsqio","id":8295919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyOTU5MTk=","avatar_url":"https://avatars3.githubusercontent.com/u/8295919?v=4","gravatar_id":"","url":"https://api.github.com/users/nsqio","html_url":"https://github.com/nsqio","followers_url":"https://api.github.com/users/nsqio/followers","following_url":"https://api.github.com/users/nsqio/following{/other_user}","gists_url":"https://api.github.com/users/nsqio/gists{/gist_id}","starred_url":"https://api.github.com/users/nsqio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsqio/subscriptions","organizations_url":"https://api.github.com/users/nsqio/orgs","repos_url":"https://api.github.com/users/nsqio/repos","events_url":"https://api.github.com/users/nsqio/events{/privacy}","received_events_url":"https://api.github.com/users/nsqio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nsqio/nsq","description":"A realtime distributed messaging platform","fork":false,"url":"https://api.github.com/repos/nsqio/nsq","forks_url":"https://api.github.com/repos/nsqio/nsq/forks","keys_url":"https://api.github.com/repos/nsqio/nsq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nsqio/nsq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nsqio/nsq/teams","hooks_url":"https://api.github.com/repos/nsqio/nsq/hooks","issue_events_url":"https://api.github.com/repos/nsqio/nsq/issues/events{/number}","events_url":"https://api.github.com/repos/nsqio/nsq/events","assignees_url":"https://api.github.com/repos/nsqio/nsq/assignees{/user}","branches_url":"https://api.github.com/repos/nsqio/nsq/branches{/branch}","tags_url":"https://api.github.com/repos/nsqio/nsq/tags","blobs_url":"https://api.github.com/repos/nsqio/nsq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nsqio/nsq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nsqio/nsq/git/refs{/sha}","trees_url":"https://api.github.com/repos/nsqio/nsq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nsqio/nsq/statuses/{sha}","languages_url":"https://api.github.com/repos/nsqio/nsq/languages","stargazers_url":"https://api.github.com/repos/nsqio/nsq/stargazers","contributors_url":"https://api.github.com/repos/nsqio/nsq/contributors","subscribers_url":"https://api.github.com/repos/nsqio/nsq/subscribers","subscription_url":"https://api.github.com/repos/nsqio/nsq/subscription","commits_url":"https://api.github.com/repos/nsqio/nsq/commits{/sha}","git_commits_url":"https://api.github.com/repos/nsqio/nsq/git/commits{/sha}","comments_url":"https://api.github.com/repos/nsqio/nsq/comments{/number}","issue_comment_url":"https://api.github.com/repos/nsqio/nsq/issues/comments{/number}","contents_url":"https://api.github.com/repos/nsqio/nsq/contents/{+path}","compare_url":"https://api.github.com/repos/nsqio/nsq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nsqio/nsq/merges","archive_url":"https://api.github.com/repos/nsqio/nsq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nsqio/nsq/downloads","issues_url":"https://api.github.com/repos/nsqio/nsq/issues{/number}","pulls_url":"https://api.github.com/repos/nsqio/nsq/pulls{/number}","milestones_url":"https://api.github.com/repos/nsqio/nsq/milestones{/number}","notifications_url":"https://api.github.com/repos/nsqio/nsq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nsqio/nsq/labels{/name}","releases_url":"https://api.github.com/repos/nsqio/nsq/releases{/id}","deployments_url":"https://api.github.com/repos/nsqio/nsq/deployments","created_at":"2012-05-12T14:37:08Z","updated_at":"2018-06-03T17:06:15Z","pushed_at":"2018-06-03T19:08:31Z","git_url":"git://github.com/nsqio/nsq.git","ssh_url":"git@github.com:nsqio/nsq.git","clone_url":"https://github.com/nsqio/nsq.git","svn_url":"https://github.com/nsqio/nsq","homepage":"http://nsq.io/","size":9812,"stargazers_count":12458,"watchers_count":12458,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1631,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1631,"open_issues":63,"watchers":12458,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nsqio/nsq/pulls/1038"},"html":{"href":"https://github.com/nsqio/nsq/pull/1038"},"issue":{"href":"https://api.github.com/repos/nsqio/nsq/issues/1038"},"comments":{"href":"https://api.github.com/repos/nsqio/nsq/issues/1038/comments"},"review_comments":{"href":"https://api.github.com/repos/nsqio/nsq/pulls/1038/comments"},"review_comment":{"href":"https://api.github.com/repos/nsqio/nsq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nsqio/nsq/pulls/1038/commits"},"statuses":{"href":"https://api.github.com/repos/nsqio/nsq/statuses/f8b49e6cd59b311d016088354ab423ee5479a82b"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"mreiferson","id":187441,"node_id":"MDQ6VXNlcjE4NzQ0MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/187441?v=4","gravatar_id":"","url":"https://api.github.com/users/mreiferson","html_url":"https://github.com/mreiferson","followers_url":"https://api.github.com/users/mreiferson/followers","following_url":"https://api.github.com/users/mreiferson/following{/other_user}","gists_url":"https://api.github.com/users/mreiferson/gists{/gist_id}","starred_url":"https://api.github.com/users/mreiferson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mreiferson/subscriptions","organizations_url":"https://api.github.com/users/mreiferson/orgs","repos_url":"https://api.github.com/users/mreiferson/repos","events_url":"https://api.github.com/users/mreiferson/events{/privacy}","received_events_url":"https://api.github.com/users/mreiferson/received_events","type":"User","site_admin":false},"comments":7,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":152,"deletions":35,"changed_files":2}}
{"actor":{"display_login":"mreiferson"}}