{"action":"created","comment":{"url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/comments/65207885","id":65207885,"diff_hunk":"@@ -84,12 +84,33 @@ var lookup = [\n  * @returns {number}\n  */\n var generate = module.exports = function generate(str) {\n-  var i = 1;\n+  var i = 0;\n   var len = str.length;\n-  var result = lookup[str.charCodeAt(0) & 0xFF];\n+  var start = -1;\n+  var result = 0;\n+  var char;\n \n   while (i < len) {\n-    result = lookup[(str.charCodeAt(i++) ^ (result >> 8)) & 0xFF] ^ (result << 8);\n+    // Read all characters and safe them in a intermediate array to prevent rereading them","path":"lib/index.js","position":14,"original_position":14,"commit_id":"d233649c26387baba50c38e498f22672f653a92a","original_commit_id":"d233649c26387baba50c38e498f22672f653a92a","user":{"login":"Salakar","id":5347038,"avatar_url":"https://avatars.githubusercontent.com/u/5347038?v=3","gravatar_id":"","url":"https://api.github.com/users/Salakar","html_url":"https://github.com/Salakar","followers_url":"https://api.github.com/users/Salakar/followers","following_url":"https://api.github.com/users/Salakar/following{/other_user}","gists_url":"https://api.github.com/users/Salakar/gists{/gist_id}","starred_url":"https://api.github.com/users/Salakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Salakar/subscriptions","organizations_url":"https://api.github.com/users/Salakar/orgs","repos_url":"https://api.github.com/users/Salakar/repos","events_url":"https://api.github.com/users/Salakar/events{/privacy}","received_events_url":"https://api.github.com/users/Salakar/received_events","type":"User","site_admin":false},"body":"Before: \r\n\r\n![image](https://cloud.githubusercontent.com/assets/5347038/15680651/67a8d814-274e-11e6-94a9-8f067e6414ee.png)\r\n\r\nAfter:\r\n![image](https://cloud.githubusercontent.com/assets/5347038/15680662/73defece-274e-11e6-89e1-be2ed09ad096.png)\r\n","created_at":"2016-05-31T15:41:15Z","updated_at":"2016-05-31T15:41:15Z","html_url":"https://github.com/Salakar/cluster-key-slot/pull/1#discussion_r65207885","pull_request_url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/comments/65207885"},"html":{"href":"https://github.com/Salakar/cluster-key-slot/pull/1#discussion_r65207885"},"pull_request":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1","id":71990135,"html_url":"https://github.com/Salakar/cluster-key-slot/pull/1","diff_url":"https://github.com/Salakar/cluster-key-slot/pull/1.diff","patch_url":"https://github.com/Salakar/cluster-key-slot/pull/1.patch","issue_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/1","number":1,"state":"closed","locked":false,"title":"Tags","user":{"login":"BridgeAR","id":8822573,"avatar_url":"https://avatars.githubusercontent.com/u/8822573?v=3","gravatar_id":"","url":"https://api.github.com/users/BridgeAR","html_url":"https://github.com/BridgeAR","followers_url":"https://api.github.com/users/BridgeAR/followers","following_url":"https://api.github.com/users/BridgeAR/following{/other_user}","gists_url":"https://api.github.com/users/BridgeAR/gists{/gist_id}","starred_url":"https://api.github.com/users/BridgeAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BridgeAR/subscriptions","organizations_url":"https://api.github.com/users/BridgeAR/orgs","repos_url":"https://api.github.com/users/BridgeAR/repos","events_url":"https://api.github.com/users/BridgeAR/events{/privacy}","received_events_url":"https://api.github.com/users/BridgeAR/received_events","type":"User","site_admin":false},"body":"This adds [key hash tags](http://redis.io/topics/cluster-spec#keys-hash-tags). The performance is still quite nice and at least currently I can't see any further optimizations.","created_at":"2016-05-31T10:12:18Z","updated_at":"2016-05-31T15:41:15Z","closed_at":"2016-05-31T14:33:30Z","merged_at":"2016-05-31T14:33:30Z","merge_commit_sha":"37d98697bdb48435e488864538082174209c0d20","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/1/comments","statuses_url":"https://api.github.com/repos/Salakar/cluster-key-slot/statuses/d233649c26387baba50c38e498f22672f653a92a","head":{"label":"Salakar:tags","ref":"tags","sha":"d233649c26387baba50c38e498f22672f653a92a","user":{"login":"Salakar","id":5347038,"avatar_url":"https://avatars.githubusercontent.com/u/5347038?v=3","gravatar_id":"","url":"https://api.github.com/users/Salakar","html_url":"https://github.com/Salakar","followers_url":"https://api.github.com/users/Salakar/followers","following_url":"https://api.github.com/users/Salakar/following{/other_user}","gists_url":"https://api.github.com/users/Salakar/gists{/gist_id}","starred_url":"https://api.github.com/users/Salakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Salakar/subscriptions","organizations_url":"https://api.github.com/users/Salakar/orgs","repos_url":"https://api.github.com/users/Salakar/repos","events_url":"https://api.github.com/users/Salakar/events{/privacy}","received_events_url":"https://api.github.com/users/Salakar/received_events","type":"User","site_admin":false},"repo":{"id":59991841,"name":"cluster-key-slot","full_name":"Salakar/cluster-key-slot","owner":{"login":"Salakar","id":5347038,"avatar_url":"https://avatars.githubusercontent.com/u/5347038?v=3","gravatar_id":"","url":"https://api.github.com/users/Salakar","html_url":"https://github.com/Salakar","followers_url":"https://api.github.com/users/Salakar/followers","following_url":"https://api.github.com/users/Salakar/following{/other_user}","gists_url":"https://api.github.com/users/Salakar/gists{/gist_id}","starred_url":"https://api.github.com/users/Salakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Salakar/subscriptions","organizations_url":"https://api.github.com/users/Salakar/orgs","repos_url":"https://api.github.com/users/Salakar/repos","events_url":"https://api.github.com/users/Salakar/events{/privacy}","received_events_url":"https://api.github.com/users/Salakar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Salakar/cluster-key-slot","description":"Generates CRC hashes for strings - for use by node redis clients to determine key slots.","fork":false,"url":"https://api.github.com/repos/Salakar/cluster-key-slot","forks_url":"https://api.github.com/repos/Salakar/cluster-key-slot/forks","keys_url":"https://api.github.com/repos/Salakar/cluster-key-slot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Salakar/cluster-key-slot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Salakar/cluster-key-slot/teams","hooks_url":"https://api.github.com/repos/Salakar/cluster-key-slot/hooks","issue_events_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/events{/number}","events_url":"https://api.github.com/repos/Salakar/cluster-key-slot/events","assignees_url":"https://api.github.com/repos/Salakar/cluster-key-slot/assignees{/user}","branches_url":"https://api.github.com/repos/Salakar/cluster-key-slot/branches{/branch}","tags_url":"https://api.github.com/repos/Salakar/cluster-key-slot/tags","blobs_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Salakar/cluster-key-slot/statuses/{sha}","languages_url":"https://api.github.com/repos/Salakar/cluster-key-slot/languages","stargazers_url":"https://api.github.com/repos/Salakar/cluster-key-slot/stargazers","contributors_url":"https://api.github.com/repos/Salakar/cluster-key-slot/contributors","subscribers_url":"https://api.github.com/repos/Salakar/cluster-key-slot/subscribers","subscription_url":"https://api.github.com/repos/Salakar/cluster-key-slot/subscription","commits_url":"https://api.github.com/repos/Salakar/cluster-key-slot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Salakar/cluster-key-slot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Salakar/cluster-key-slot/contents/{+path}","compare_url":"https://api.github.com/repos/Salakar/cluster-key-slot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Salakar/cluster-key-slot/merges","archive_url":"https://api.github.com/repos/Salakar/cluster-key-slot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Salakar/cluster-key-slot/downloads","issues_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues{/number}","pulls_url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls{/number}","milestones_url":"https://api.github.com/repos/Salakar/cluster-key-slot/milestones{/number}","notifications_url":"https://api.github.com/repos/Salakar/cluster-key-slot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Salakar/cluster-key-slot/labels{/name}","releases_url":"https://api.github.com/repos/Salakar/cluster-key-slot/releases{/id}","deployments_url":"https://api.github.com/repos/Salakar/cluster-key-slot/deployments","created_at":"2016-05-30T08:01:43Z","updated_at":"2016-05-30T08:05:54Z","pushed_at":"2016-05-31T15:40:15Z","git_url":"git://github.com/Salakar/cluster-key-slot.git","ssh_url":"git@github.com:Salakar/cluster-key-slot.git","clone_url":"https://github.com/Salakar/cluster-key-slot.git","svn_url":"https://github.com/Salakar/cluster-key-slot","homepage":null,"size":12,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Salakar:master","ref":"master","sha":"8bdc7d0425e8b1d0cd49dabfd88b22fa8387227b","user":{"login":"Salakar","id":5347038,"avatar_url":"https://avatars.githubusercontent.com/u/5347038?v=3","gravatar_id":"","url":"https://api.github.com/users/Salakar","html_url":"https://github.com/Salakar","followers_url":"https://api.github.com/users/Salakar/followers","following_url":"https://api.github.com/users/Salakar/following{/other_user}","gists_url":"https://api.github.com/users/Salakar/gists{/gist_id}","starred_url":"https://api.github.com/users/Salakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Salakar/subscriptions","organizations_url":"https://api.github.com/users/Salakar/orgs","repos_url":"https://api.github.com/users/Salakar/repos","events_url":"https://api.github.com/users/Salakar/events{/privacy}","received_events_url":"https://api.github.com/users/Salakar/received_events","type":"User","site_admin":false},"repo":{"id":59991841,"name":"cluster-key-slot","full_name":"Salakar/cluster-key-slot","owner":{"login":"Salakar","id":5347038,"avatar_url":"https://avatars.githubusercontent.com/u/5347038?v=3","gravatar_id":"","url":"https://api.github.com/users/Salakar","html_url":"https://github.com/Salakar","followers_url":"https://api.github.com/users/Salakar/followers","following_url":"https://api.github.com/users/Salakar/following{/other_user}","gists_url":"https://api.github.com/users/Salakar/gists{/gist_id}","starred_url":"https://api.github.com/users/Salakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Salakar/subscriptions","organizations_url":"https://api.github.com/users/Salakar/orgs","repos_url":"https://api.github.com/users/Salakar/repos","events_url":"https://api.github.com/users/Salakar/events{/privacy}","received_events_url":"https://api.github.com/users/Salakar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Salakar/cluster-key-slot","description":"Generates CRC hashes for strings - for use by node redis clients to determine key slots.","fork":false,"url":"https://api.github.com/repos/Salakar/cluster-key-slot","forks_url":"https://api.github.com/repos/Salakar/cluster-key-slot/forks","keys_url":"https://api.github.com/repos/Salakar/cluster-key-slot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Salakar/cluster-key-slot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Salakar/cluster-key-slot/teams","hooks_url":"https://api.github.com/repos/Salakar/cluster-key-slot/hooks","issue_events_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/events{/number}","events_url":"https://api.github.com/repos/Salakar/cluster-key-slot/events","assignees_url":"https://api.github.com/repos/Salakar/cluster-key-slot/assignees{/user}","branches_url":"https://api.github.com/repos/Salakar/cluster-key-slot/branches{/branch}","tags_url":"https://api.github.com/repos/Salakar/cluster-key-slot/tags","blobs_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Salakar/cluster-key-slot/statuses/{sha}","languages_url":"https://api.github.com/repos/Salakar/cluster-key-slot/languages","stargazers_url":"https://api.github.com/repos/Salakar/cluster-key-slot/stargazers","contributors_url":"https://api.github.com/repos/Salakar/cluster-key-slot/contributors","subscribers_url":"https://api.github.com/repos/Salakar/cluster-key-slot/subscribers","subscription_url":"https://api.github.com/repos/Salakar/cluster-key-slot/subscription","commits_url":"https://api.github.com/repos/Salakar/cluster-key-slot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Salakar/cluster-key-slot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Salakar/cluster-key-slot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Salakar/cluster-key-slot/contents/{+path}","compare_url":"https://api.github.com/repos/Salakar/cluster-key-slot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Salakar/cluster-key-slot/merges","archive_url":"https://api.github.com/repos/Salakar/cluster-key-slot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Salakar/cluster-key-slot/downloads","issues_url":"https://api.github.com/repos/Salakar/cluster-key-slot/issues{/number}","pulls_url":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls{/number}","milestones_url":"https://api.github.com/repos/Salakar/cluster-key-slot/milestones{/number}","notifications_url":"https://api.github.com/repos/Salakar/cluster-key-slot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Salakar/cluster-key-slot/labels{/name}","releases_url":"https://api.github.com/repos/Salakar/cluster-key-slot/releases{/id}","deployments_url":"https://api.github.com/repos/Salakar/cluster-key-slot/deployments","created_at":"2016-05-30T08:01:43Z","updated_at":"2016-05-30T08:05:54Z","pushed_at":"2016-05-31T15:40:15Z","git_url":"git://github.com/Salakar/cluster-key-slot.git","ssh_url":"git@github.com:Salakar/cluster-key-slot.git","clone_url":"https://github.com/Salakar/cluster-key-slot.git","svn_url":"https://github.com/Salakar/cluster-key-slot","homepage":null,"size":12,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1"},"html":{"href":"https://github.com/Salakar/cluster-key-slot/pull/1"},"issue":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/1"},"comments":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Salakar/cluster-key-slot/statuses/d233649c26387baba50c38e498f22672f653a92a"}}}}
{"actor":{"display_login":"Salakar"}}