{"action":"created","comment":{"url":"https://api.github.com/repos/google/brotli/pulls/comments/217474907","pull_request_review_id":155192746,"id":217474907,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzQ3NDkwNw==","diff_hunk":"@@ -33,11 +33,60 @@ static const uint16_t kMaxHuffmanTableSize[] = {\n \n #define BROTLI_HUFFMAN_MAX_CODE_LENGTH_CODE_LENGTH 5\n \n+#if !defined(BROTLI_HUFFMAN_CODE_FAST_LOAD)\n typedef struct {\n   uint8_t bits;    /* number of bits used for this symbol */\n   uint16_t value;  /* symbol value or table offset */\n } HuffmanCode;\n \n+/* To allow optimization of HuffmanCode accesses in hot paths,\n+ * please use the following macros to:\n+ *\n+ *  - prepare a HuffmanCode pointer for access\n+ *     ( BROTLI_HC_PREPARE_TO_ACCESS(HuffmanCode*) )\n+ *  - update the pointer each time it is changed\n+ *     ( BROTLI_HC_UPDATE(HuffmanCode*) )\n+ *  - get the bits or value fields\n+ *     ( BROTLI_HC_GET_BITS/VALUE(HuffmanCode*) )\n+ *\n+ * For example, assuming |table| contains a HuffmanCode pointer:\n+ *\n+ *   BROTLI_HC_PREPARE_TO_ACCESS(table);\n+ *   BROTLI_HC_UPDATE(table);\n+ *   *bits = BROTLI_HC_GET_BITS(table);\n+ *   *value = BROTLI_HC_GET_VALUE(table);\n+ *   table += offset;\n+ *   BROTLI_HC_UPDATE(table);\n+ *   *bits2 = BROTLI_HC_GET_BITS(table);\n+ *   *value2 = BROTLI_HC_GET_VALUE(table);\n+ *\n+ */\n+\n+#define BROTLI_HC_PREPARE_TO_ACCESS(H)\n+#define BROTLI_HC_UPDATE(H)\n+\n+/* Getters must be given a pointer to a HuffmanCode. */\n+#define BROTLI_HC_GET_BITS(H) (H->bits)\n+#define BROTLI_HC_GET_VALUE(H) (H->value)\n+\n+/* Setters must be given a HuffmanCode. */\n+#define BROTLI_HC_SET_BITS(H, B) H.bits = B\n+#define BROTLI_HC_SET_VALUE(H, V) H.value = V\n+#else\n+typedef BROTLI_ALIGNED(4) uint32_t HuffmanCode;\n+\n+#define BROTLI_HC_PREPARE_TO_ACCESS(H) uint32_t __fastload_##H","path":"c/dec/huffman.h","position":46,"original_position":46,"commit_id":"abd8d1f44bce42021881742e8da4cf3f96562806","original_commit_id":"abd8d1f44bce42021881742e8da4cf3f96562806","user":{"login":"eustas","id":203457,"node_id":"MDQ6VXNlcjIwMzQ1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/203457?v=4","gravatar_id":"","url":"https://api.github.com/users/eustas","html_url":"https://github.com/eustas","followers_url":"https://api.github.com/users/eustas/followers","following_url":"https://api.github.com/users/eustas/following{/other_user}","gists_url":"https://api.github.com/users/eustas/gists{/gist_id}","starred_url":"https://api.github.com/users/eustas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eustas/subscriptions","organizations_url":"https://api.github.com/users/eustas/orgs","repos_url":"https://api.github.com/users/eustas/repos","events_url":"https://api.github.com/users/eustas/events{/privacy}","received_events_url":"https://api.github.com/users/eustas/received_events","type":"User","site_admin":false},"body":"Going to check if we could get rid of declaration/fetch wrappers.\r\nIf in \"non-fast\" mode copying struct to local variable is not slower (hopefully, so), then \"prepare\" would be plain HuffmanCode declaration, and \"update\" would be assignment...","created_at":"2018-09-13T17:44:55Z","updated_at":"2018-09-13T17:46:17Z","html_url":"https://github.com/google/brotli/pull/703#discussion_r217474907","pull_request_url":"https://api.github.com/repos/google/brotli/pulls/703","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/google/brotli/pulls/comments/217474907"},"html":{"href":"https://github.com/google/brotli/pull/703#discussion_r217474907"},"pull_request":{"href":"https://api.github.com/repos/google/brotli/pulls/703"}}},"pull_request":{"url":"https://api.github.com/repos/google/brotli/pulls/703","id":208552742,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTUyNzQy","html_url":"https://github.com/google/brotli/pull/703","diff_url":"https://github.com/google/brotli/pull/703.diff","patch_url":"https://github.com/google/brotli/pull/703.patch","issue_url":"https://api.github.com/repos/google/brotli/issues/703","number":703,"state":"open","locked":false,"title":"decode: faster huffman code loading on 32-bit Arm","user":{"login":"stephenkyle-ARM","id":18005244,"node_id":"MDQ6VXNlcjE4MDA1MjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/18005244?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenkyle-ARM","html_url":"https://github.com/stephenkyle-ARM","followers_url":"https://api.github.com/users/stephenkyle-ARM/followers","following_url":"https://api.github.com/users/stephenkyle-ARM/following{/other_user}","gists_url":"https://api.github.com/users/stephenkyle-ARM/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenkyle-ARM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenkyle-ARM/subscriptions","organizations_url":"https://api.github.com/users/stephenkyle-ARM/orgs","repos_url":"https://api.github.com/users/stephenkyle-ARM/repos","events_url":"https://api.github.com/users/stephenkyle-ARM/events{/privacy}","received_events_url":"https://api.github.com/users/stephenkyle-ARM/received_events","type":"User","site_admin":false},"body":"In both symbol preloading and decoding, force the compiler to generate a\r\nsingle load instead of two when loading the bits and value fields of the\r\nHuffmanCode struct.","created_at":"2018-08-15T12:46:21Z","updated_at":"2018-09-13T17:46:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"156100ef8809a87dd9b763c92e1e29f377aa7648","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/brotli/pulls/703/commits","review_comments_url":"https://api.github.com/repos/google/brotli/pulls/703/comments","review_comment_url":"https://api.github.com/repos/google/brotli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/brotli/issues/703/comments","statuses_url":"https://api.github.com/repos/google/brotli/statuses/abd8d1f44bce42021881742e8da4cf3f96562806","head":{"label":"stephenkyle-ARM:perf/faster-symbol-load-arm","ref":"perf/faster-symbol-load-arm","sha":"abd8d1f44bce42021881742e8da4cf3f96562806","user":{"login":"stephenkyle-ARM","id":18005244,"node_id":"MDQ6VXNlcjE4MDA1MjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/18005244?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenkyle-ARM","html_url":"https://github.com/stephenkyle-ARM","followers_url":"https://api.github.com/users/stephenkyle-ARM/followers","following_url":"https://api.github.com/users/stephenkyle-ARM/following{/other_user}","gists_url":"https://api.github.com/users/stephenkyle-ARM/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenkyle-ARM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenkyle-ARM/subscriptions","organizations_url":"https://api.github.com/users/stephenkyle-ARM/orgs","repos_url":"https://api.github.com/users/stephenkyle-ARM/repos","events_url":"https://api.github.com/users/stephenkyle-ARM/events{/privacy}","received_events_url":"https://api.github.com/users/stephenkyle-ARM/received_events","type":"User","site_admin":false},"repo":{"id":140866756,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4NjY3NTY=","name":"brotli","full_name":"stephenkyle-ARM/brotli","owner":{"login":"stephenkyle-ARM","id":18005244,"node_id":"MDQ6VXNlcjE4MDA1MjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/18005244?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenkyle-ARM","html_url":"https://github.com/stephenkyle-ARM","followers_url":"https://api.github.com/users/stephenkyle-ARM/followers","following_url":"https://api.github.com/users/stephenkyle-ARM/following{/other_user}","gists_url":"https://api.github.com/users/stephenkyle-ARM/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenkyle-ARM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenkyle-ARM/subscriptions","organizations_url":"https://api.github.com/users/stephenkyle-ARM/orgs","repos_url":"https://api.github.com/users/stephenkyle-ARM/repos","events_url":"https://api.github.com/users/stephenkyle-ARM/events{/privacy}","received_events_url":"https://api.github.com/users/stephenkyle-ARM/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephenkyle-ARM/brotli","description":"Brotli compression format","fork":true,"url":"https://api.github.com/repos/stephenkyle-ARM/brotli","forks_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/forks","keys_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/teams","hooks_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/hooks","issue_events_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/issues/events{/number}","events_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/events","assignees_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/assignees{/user}","branches_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/branches{/branch}","tags_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/tags","blobs_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/statuses/{sha}","languages_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/languages","stargazers_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/stargazers","contributors_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/contributors","subscribers_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/subscribers","subscription_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/subscription","commits_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/contents/{+path}","compare_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/merges","archive_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/downloads","issues_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/issues{/number}","pulls_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/pulls{/number}","milestones_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/milestones{/number}","notifications_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/labels{/name}","releases_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/releases{/id}","deployments_url":"https://api.github.com/repos/stephenkyle-ARM/brotli/deployments","created_at":"2018-07-13T15:56:43Z","updated_at":"2018-07-25T09:48:54Z","pushed_at":"2018-08-22T16:11:07Z","git_url":"git://github.com/stephenkyle-ARM/brotli.git","ssh_url":"git@github.com:stephenkyle-ARM/brotli.git","clone_url":"https://github.com/stephenkyle-ARM/brotli.git","svn_url":"https://github.com/stephenkyle-ARM/brotli","homepage":"","size":31104,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"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":"google:master","ref":"master","sha":"d4cd6cdf1cd52b75f871b6d75b1c8941454371db","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":24993138,"node_id":"MDEwOlJlcG9zaXRvcnkyNDk5MzEzOA==","name":"brotli","full_name":"google/brotli","owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/brotli","description":"Brotli compression format","fork":false,"url":"https://api.github.com/repos/google/brotli","forks_url":"https://api.github.com/repos/google/brotli/forks","keys_url":"https://api.github.com/repos/google/brotli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/brotli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/brotli/teams","hooks_url":"https://api.github.com/repos/google/brotli/hooks","issue_events_url":"https://api.github.com/repos/google/brotli/issues/events{/number}","events_url":"https://api.github.com/repos/google/brotli/events","assignees_url":"https://api.github.com/repos/google/brotli/assignees{/user}","branches_url":"https://api.github.com/repos/google/brotli/branches{/branch}","tags_url":"https://api.github.com/repos/google/brotli/tags","blobs_url":"https://api.github.com/repos/google/brotli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/brotli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/brotli/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/brotli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/brotli/statuses/{sha}","languages_url":"https://api.github.com/repos/google/brotli/languages","stargazers_url":"https://api.github.com/repos/google/brotli/stargazers","contributors_url":"https://api.github.com/repos/google/brotli/contributors","subscribers_url":"https://api.github.com/repos/google/brotli/subscribers","subscription_url":"https://api.github.com/repos/google/brotli/subscription","commits_url":"https://api.github.com/repos/google/brotli/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/brotli/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/brotli/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/brotli/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/brotli/contents/{+path}","compare_url":"https://api.github.com/repos/google/brotli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/brotli/merges","archive_url":"https://api.github.com/repos/google/brotli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/brotli/downloads","issues_url":"https://api.github.com/repos/google/brotli/issues{/number}","pulls_url":"https://api.github.com/repos/google/brotli/pulls{/number}","milestones_url":"https://api.github.com/repos/google/brotli/milestones{/number}","notifications_url":"https://api.github.com/repos/google/brotli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/brotli/labels{/name}","releases_url":"https://api.github.com/repos/google/brotli/releases{/id}","deployments_url":"https://api.github.com/repos/google/brotli/deployments","created_at":"2014-10-09T14:35:14Z","updated_at":"2018-09-13T17:43:39Z","pushed_at":"2018-09-13T17:31:24Z","git_url":"git://github.com/google/brotli.git","ssh_url":"git@github.com:google/brotli.git","clone_url":"https://github.com/google/brotli.git","svn_url":"https://github.com/google/brotli","homepage":"","size":31133,"stargazers_count":6355,"watchers_count":6355,"language":"C","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":634,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":634,"open_issues":31,"watchers":6355,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/brotli/pulls/703"},"html":{"href":"https://github.com/google/brotli/pull/703"},"issue":{"href":"https://api.github.com/repos/google/brotli/issues/703"},"comments":{"href":"https://api.github.com/repos/google/brotli/issues/703/comments"},"review_comments":{"href":"https://api.github.com/repos/google/brotli/pulls/703/comments"},"review_comment":{"href":"https://api.github.com/repos/google/brotli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/brotli/pulls/703/commits"},"statuses":{"href":"https://api.github.com/repos/google/brotli/statuses/abd8d1f44bce42021881742e8da4cf3f96562806"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"eustas"}}