{"action":"created","comment":{"url":"https://api.github.com/repos/gap-system/gap/pulls/comments/187690238","pull_request_review_id":119527823,"id":187690238,"diff_hunk":"@@ -146,135 +170,73 @@ void LoadFlags(\n **  the lower addressed half-word is the less significant\n **\n */\n-#define HASH_FLAGS_SIZE (Int4)67108879L\n+#define fnvp 1099511628211ULL\n+#define fnvob 14695981039346656037ULL\n \n Obj FuncHASH_FLAGS (\n     Obj                 self,\n     Obj                 flags )\n {\n-    Int4                 hash;\n-    Int4                 x;\n-    Int                  len;\n-    UInt4 *              ptr;\n-    Int                  i;\n \n     /* do some trivial checks                                              */\n-    while ( TNUM_OBJ(flags) != T_FLAGS ) {\n+    while ( !IS_FLAGS(flags) ) {\n             flags = ErrorReturnObj( \"<flags> must be a flags list (not a %s)\",\n             (Int)TNAM_OBJ(flags), 0L,\n             \"you can replace <flags> via 'return <flags>;'\" );\n     }\n     if ( HASH_FLAGS(flags) != 0 ) {\n-        return HASH_FLAGS(flags);\n+        return INTOBJ_INT(HASH_FLAGS(flags));\n     }\n \n     /* do the real work*/\n-#ifndef SYS_IS_64_BIT\n-\n-    /* 32 bit case  -- this is the \"defining\" case, others are\n-     adjusted to comply with this */\n-    len = NRB_FLAGS(flags);\n-    ptr = (UInt4 *)BLOCKS_FLAGS(flags);\n-    hash = 0;\n-    x    = 1;\n-    for ( i = len; i >= 1; i-- ) {\n-        hash = (hash + (*ptr % HASH_FLAGS_SIZE) * x) % HASH_FLAGS_SIZE;\n-        x    = ((8*sizeof(UInt4)-1) * x) % HASH_FLAGS_SIZE;\n-        ptr++;\n-    }\n-#else\n-#ifdef WORDS_BIGENDIAN\n-\n-    /* This is the hardest case */\n-    len = NRB_FLAGS(flags);\n-    ptr = (UInt4 *)BLOCKS_FLAGS(flags);\n-    hash = 0;\n-    x    = 1;\n-    for ( i = len; i >= 1; i-- ) {\n-\n-        /* least significant 32 bits first */\n-        hash = (hash + (ptr[1] % HASH_FLAGS_SIZE) * x) % HASH_FLAGS_SIZE;\n-        x    = ((8*sizeof(UInt4)-1) * x) % HASH_FLAGS_SIZE;\n-        /* now the more significant */\n-        hash = (hash + (*ptr % HASH_FLAGS_SIZE) * x) % HASH_FLAGS_SIZE;\n-        x    = ((8*sizeof(UInt4)-1) * x) % HASH_FLAGS_SIZE;\n-        \n-        ptr+= 2;\n-    }\n-#else\n \n-    /* and the middle case -- for DEC alpha, the 32 bit chunks are\n-       in the right order, and we merely have to be sure to process them as\n-       32 bit chunks */\n-    len = NRB_FLAGS(flags)*(sizeof(UInt)/sizeof(UInt4));\n-    ptr = (UInt4 *)BLOCKS_FLAGS(flags);\n-    hash = 0;\n-    x    = 1;\n-    for ( i = len; i >= 1; i-- ) {\n-        hash = (hash + (*ptr % HASH_FLAGS_SIZE) * x) % HASH_FLAGS_SIZE;\n-        x    = ((8*sizeof(UInt4)-1) * x) % HASH_FLAGS_SIZE;\n-        ptr++;\n+\n+    UInt8 h = fnvob;\n+    UInt len = SIZE_FLAGS(flags);\n+    for (UInt i = 0; i < len; i++) {\n+        UInt2 pos = TRUE_FLAGS(flags, i);\n+        h = (h*fnvp) ^ (pos & 0xFF);\n+        h = (h*fnvp) ^ (pos >>8);","path":"src/opers.c","position":156,"original_position":156,"commit_id":"208ba2abf39923ce9664b718f93282c2ecee9fd3","original_commit_id":"208ba2abf39923ce9664b718f93282c2ecee9fd3","user":{"login":"stevelinton","id":6358086,"avatar_url":"https://avatars0.githubusercontent.com/u/6358086?v=4","gravatar_id":"","url":"https://api.github.com/users/stevelinton","html_url":"https://github.com/stevelinton","followers_url":"https://api.github.com/users/stevelinton/followers","following_url":"https://api.github.com/users/stevelinton/following{/other_user}","gists_url":"https://api.github.com/users/stevelinton/gists{/gist_id}","starred_url":"https://api.github.com/users/stevelinton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevelinton/subscriptions","organizations_url":"https://api.github.com/users/stevelinton/orgs","repos_url":"https://api.github.com/users/stevelinton/repos","events_url":"https://api.github.com/users/stevelinton/events{/privacy}","received_events_url":"https://api.github.com/users/stevelinton/received_events","type":"User","site_admin":false},"body":"No probably not. I think I just didn't find the kernel interface for that. ","created_at":"2018-05-11T18:04:41Z","updated_at":"2018-05-11T18:04:41Z","html_url":"https://github.com/gap-system/gap/pull/2457#discussion_r187690238","pull_request_url":"https://api.github.com/repos/gap-system/gap/pulls/2457","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gap-system/gap/pulls/comments/187690238"},"html":{"href":"https://github.com/gap-system/gap/pull/2457#discussion_r187690238"},"pull_request":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2457"}},"in_reply_to_id":187657241},"pull_request":{"url":"https://api.github.com/repos/gap-system/gap/pulls/2457","id":187497539,"html_url":"https://github.com/gap-system/gap/pull/2457","diff_url":"https://github.com/gap-system/gap/pull/2457.diff","patch_url":"https://github.com/gap-system/gap/pull/2457.patch","issue_url":"https://api.github.com/repos/gap-system/gap/issues/2457","number":2457,"state":"open","locked":false,"title":"WIP: Reformat Flags Lists","user":{"login":"stevelinton","id":6358086,"avatar_url":"https://avatars0.githubusercontent.com/u/6358086?v=4","gravatar_id":"","url":"https://api.github.com/users/stevelinton","html_url":"https://github.com/stevelinton","followers_url":"https://api.github.com/users/stevelinton/followers","following_url":"https://api.github.com/users/stevelinton/following{/other_user}","gists_url":"https://api.github.com/users/stevelinton/gists{/gist_id}","starred_url":"https://api.github.com/users/stevelinton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevelinton/subscriptions","organizations_url":"https://api.github.com/users/stevelinton/orgs","repos_url":"https://api.github.com/users/stevelinton/repos","events_url":"https://api.github.com/users/stevelinton/events{/privacy}","received_events_url":"https://api.github.com/users/stevelinton/received_events","type":"User","site_admin":false},"body":"As discussed elsewhere, this is an experimental PR which stores flags lists as lists of 16 bit indices of the set bits, rather than as a long bit vector. In this version, flags lists actually behave as kernel lists, equivalent to their TRUES_FLAGS so TRUES_FLAG is just x->x. The hope is that this is more cache-friendly and causes less garbage collection. At present, my quick experiments suggest that it slows down testinstall by a few percent, but reduces time spent in garbage collection.","created_at":"2018-05-11T15:32:42Z","updated_at":"2018-05-11T18:04:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17f8aff243075ece791b79943d37093533934f11","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":314698938,"url":"https://api.github.com/repos/gap-system/gap/labels/DO%20NOT%20MERGE!","name":"DO NOT MERGE!","color":"eb6420","default":false},{"id":577472995,"url":"https://api.github.com/repos/gap-system/gap/labels/kernel","name":"kernel","color":"d4c5f9","default":false},{"id":478495999,"url":"https://api.github.com/repos/gap-system/gap/labels/performance","name":"performance","color":"bfd4f2","default":false},{"id":300488871,"url":"https://api.github.com/repos/gap-system/gap/labels/request%20for%20comments","name":"request for comments","color":"cc317c","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/gap-system/gap/pulls/2457/commits","review_comments_url":"https://api.github.com/repos/gap-system/gap/pulls/2457/comments","review_comment_url":"https://api.github.com/repos/gap-system/gap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gap-system/gap/issues/2457/comments","statuses_url":"https://api.github.com/repos/gap-system/gap/statuses/208ba2abf39923ce9664b718f93282c2ecee9fd3","head":{"label":"stevelinton:trues-flags","ref":"trues-flags","sha":"208ba2abf39923ce9664b718f93282c2ecee9fd3","user":{"login":"stevelinton","id":6358086,"avatar_url":"https://avatars0.githubusercontent.com/u/6358086?v=4","gravatar_id":"","url":"https://api.github.com/users/stevelinton","html_url":"https://github.com/stevelinton","followers_url":"https://api.github.com/users/stevelinton/followers","following_url":"https://api.github.com/users/stevelinton/following{/other_user}","gists_url":"https://api.github.com/users/stevelinton/gists{/gist_id}","starred_url":"https://api.github.com/users/stevelinton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevelinton/subscriptions","organizations_url":"https://api.github.com/users/stevelinton/orgs","repos_url":"https://api.github.com/users/stevelinton/repos","events_url":"https://api.github.com/users/stevelinton/events{/privacy}","received_events_url":"https://api.github.com/users/stevelinton/received_events","type":"User","site_admin":false},"repo":{"id":32328937,"name":"gap","full_name":"stevelinton/gap","owner":{"login":"stevelinton","id":6358086,"avatar_url":"https://avatars0.githubusercontent.com/u/6358086?v=4","gravatar_id":"","url":"https://api.github.com/users/stevelinton","html_url":"https://github.com/stevelinton","followers_url":"https://api.github.com/users/stevelinton/followers","following_url":"https://api.github.com/users/stevelinton/following{/other_user}","gists_url":"https://api.github.com/users/stevelinton/gists{/gist_id}","starred_url":"https://api.github.com/users/stevelinton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevelinton/subscriptions","organizations_url":"https://api.github.com/users/stevelinton/orgs","repos_url":"https://api.github.com/users/stevelinton/repos","events_url":"https://api.github.com/users/stevelinton/events{/privacy}","received_events_url":"https://api.github.com/users/stevelinton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevelinton/gap","description":"GAP - Groups, Algorithms, Programming - a System for Computational Discrete Algebra","fork":true,"url":"https://api.github.com/repos/stevelinton/gap","forks_url":"https://api.github.com/repos/stevelinton/gap/forks","keys_url":"https://api.github.com/repos/stevelinton/gap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevelinton/gap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevelinton/gap/teams","hooks_url":"https://api.github.com/repos/stevelinton/gap/hooks","issue_events_url":"https://api.github.com/repos/stevelinton/gap/issues/events{/number}","events_url":"https://api.github.com/repos/stevelinton/gap/events","assignees_url":"https://api.github.com/repos/stevelinton/gap/assignees{/user}","branches_url":"https://api.github.com/repos/stevelinton/gap/branches{/branch}","tags_url":"https://api.github.com/repos/stevelinton/gap/tags","blobs_url":"https://api.github.com/repos/stevelinton/gap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevelinton/gap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevelinton/gap/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevelinton/gap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevelinton/gap/statuses/{sha}","languages_url":"https://api.github.com/repos/stevelinton/gap/languages","stargazers_url":"https://api.github.com/repos/stevelinton/gap/stargazers","contributors_url":"https://api.github.com/repos/stevelinton/gap/contributors","subscribers_url":"https://api.github.com/repos/stevelinton/gap/subscribers","subscription_url":"https://api.github.com/repos/stevelinton/gap/subscription","commits_url":"https://api.github.com/repos/stevelinton/gap/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevelinton/gap/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevelinton/gap/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevelinton/gap/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevelinton/gap/contents/{+path}","compare_url":"https://api.github.com/repos/stevelinton/gap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevelinton/gap/merges","archive_url":"https://api.github.com/repos/stevelinton/gap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevelinton/gap/downloads","issues_url":"https://api.github.com/repos/stevelinton/gap/issues{/number}","pulls_url":"https://api.github.com/repos/stevelinton/gap/pulls{/number}","milestones_url":"https://api.github.com/repos/stevelinton/gap/milestones{/number}","notifications_url":"https://api.github.com/repos/stevelinton/gap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevelinton/gap/labels{/name}","releases_url":"https://api.github.com/repos/stevelinton/gap/releases{/id}","deployments_url":"https://api.github.com/repos/stevelinton/gap/deployments","created_at":"2015-03-16T14:04:14Z","updated_at":"2015-03-27T13:01:30Z","pushed_at":"2018-05-11T15:27:14Z","git_url":"git://github.com/stevelinton/gap.git","ssh_url":"git@github.com:stevelinton/gap.git","clone_url":"https://github.com/stevelinton/gap.git","svn_url":"https://github.com/stevelinton/gap","homepage":"http://www.gap-system.org","size":411543,"stargazers_count":0,"watchers_count":0,"language":"GAP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gap-system:master","ref":"master","sha":"d3402e114bac6aa1ee9c4636f116beb4ed3c1e61","user":{"login":"gap-system","id":5344223,"avatar_url":"https://avatars2.githubusercontent.com/u/5344223?v=4","gravatar_id":"","url":"https://api.github.com/users/gap-system","html_url":"https://github.com/gap-system","followers_url":"https://api.github.com/users/gap-system/followers","following_url":"https://api.github.com/users/gap-system/following{/other_user}","gists_url":"https://api.github.com/users/gap-system/gists{/gist_id}","starred_url":"https://api.github.com/users/gap-system/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gap-system/subscriptions","organizations_url":"https://api.github.com/users/gap-system/orgs","repos_url":"https://api.github.com/users/gap-system/repos","events_url":"https://api.github.com/users/gap-system/events{/privacy}","received_events_url":"https://api.github.com/users/gap-system/received_events","type":"Organization","site_admin":false},"repo":{"id":31270208,"name":"gap","full_name":"gap-system/gap","owner":{"login":"gap-system","id":5344223,"avatar_url":"https://avatars2.githubusercontent.com/u/5344223?v=4","gravatar_id":"","url":"https://api.github.com/users/gap-system","html_url":"https://github.com/gap-system","followers_url":"https://api.github.com/users/gap-system/followers","following_url":"https://api.github.com/users/gap-system/following{/other_user}","gists_url":"https://api.github.com/users/gap-system/gists{/gist_id}","starred_url":"https://api.github.com/users/gap-system/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gap-system/subscriptions","organizations_url":"https://api.github.com/users/gap-system/orgs","repos_url":"https://api.github.com/users/gap-system/repos","events_url":"https://api.github.com/users/gap-system/events{/privacy}","received_events_url":"https://api.github.com/users/gap-system/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gap-system/gap","description":"Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra","fork":false,"url":"https://api.github.com/repos/gap-system/gap","forks_url":"https://api.github.com/repos/gap-system/gap/forks","keys_url":"https://api.github.com/repos/gap-system/gap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gap-system/gap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gap-system/gap/teams","hooks_url":"https://api.github.com/repos/gap-system/gap/hooks","issue_events_url":"https://api.github.com/repos/gap-system/gap/issues/events{/number}","events_url":"https://api.github.com/repos/gap-system/gap/events","assignees_url":"https://api.github.com/repos/gap-system/gap/assignees{/user}","branches_url":"https://api.github.com/repos/gap-system/gap/branches{/branch}","tags_url":"https://api.github.com/repos/gap-system/gap/tags","blobs_url":"https://api.github.com/repos/gap-system/gap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gap-system/gap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gap-system/gap/git/refs{/sha}","trees_url":"https://api.github.com/repos/gap-system/gap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gap-system/gap/statuses/{sha}","languages_url":"https://api.github.com/repos/gap-system/gap/languages","stargazers_url":"https://api.github.com/repos/gap-system/gap/stargazers","contributors_url":"https://api.github.com/repos/gap-system/gap/contributors","subscribers_url":"https://api.github.com/repos/gap-system/gap/subscribers","subscription_url":"https://api.github.com/repos/gap-system/gap/subscription","commits_url":"https://api.github.com/repos/gap-system/gap/commits{/sha}","git_commits_url":"https://api.github.com/repos/gap-system/gap/git/commits{/sha}","comments_url":"https://api.github.com/repos/gap-system/gap/comments{/number}","issue_comment_url":"https://api.github.com/repos/gap-system/gap/issues/comments{/number}","contents_url":"https://api.github.com/repos/gap-system/gap/contents/{+path}","compare_url":"https://api.github.com/repos/gap-system/gap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gap-system/gap/merges","archive_url":"https://api.github.com/repos/gap-system/gap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gap-system/gap/downloads","issues_url":"https://api.github.com/repos/gap-system/gap/issues{/number}","pulls_url":"https://api.github.com/repos/gap-system/gap/pulls{/number}","milestones_url":"https://api.github.com/repos/gap-system/gap/milestones{/number}","notifications_url":"https://api.github.com/repos/gap-system/gap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gap-system/gap/labels{/name}","releases_url":"https://api.github.com/repos/gap-system/gap/releases{/id}","deployments_url":"https://api.github.com/repos/gap-system/gap/deployments","created_at":"2015-02-24T16:47:50Z","updated_at":"2018-05-11T11:52:07Z","pushed_at":"2018-05-11T15:32:42Z","git_url":"git://github.com/gap-system/gap.git","ssh_url":"git@github.com:gap-system/gap.git","clone_url":"https://github.com/gap-system/gap.git","svn_url":"https://github.com/gap-system/gap","homepage":"https://www.gap-system.org","size":400526,"stargazers_count":179,"watchers_count":179,"language":"GAP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"archived":false,"open_issues_count":331,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":72,"open_issues":331,"watchers":179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2457"},"html":{"href":"https://github.com/gap-system/gap/pull/2457"},"issue":{"href":"https://api.github.com/repos/gap-system/gap/issues/2457"},"comments":{"href":"https://api.github.com/repos/gap-system/gap/issues/2457/comments"},"review_comments":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2457/comments"},"review_comment":{"href":"https://api.github.com/repos/gap-system/gap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2457/commits"},"statuses":{"href":"https://api.github.com/repos/gap-system/gap/statuses/208ba2abf39923ce9664b718f93282c2ecee9fd3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stevelinton"}}