{"action":"created","comment":{"url":"https://api.github.com/repos/gap-system/gap/pulls/comments/187660415","pull_request_review_id":119485593,"id":187660415,"diff_hunk":"@@ -242,98 +261,82 @@ static inline Obj NEW_FLAGS(UInt len)\n **\n **  returns the list of trues of <flags> or 0 if the list is not known yet.\n */\n-#define TRUES_FLAGS(flags)              (CONST_ADDR_OBJ(flags)[0])\n+\n+extern Obj TRUES_FLAGS( Obj flags );\n \n \n /****************************************************************************\n **\n-*F  SET_TRUES_FLAGS( <flags>, <trues> ) . set number of trues of a flags list\n+*F  SIZE_FLAGS( <flags> ) . . . . . . . . . . .number of true of <flags> \n */\n-#define SET_TRUES_FLAGS(flags,trues)    (ADDR_OBJ(flags)[0] = trues)\n-\n+static inline UInt SIZE_FLAGS(Obj flags) {\n+    return ((const UInt *)CONST_ADDR_OBJ(flags))[1];\n+}\n \n /****************************************************************************\n **\n-*F  HASH_FLAGS( <flags> ) . . . . . . . . . . . .  hash value of <flags> or 0\n+*F  SET_SIZE_FLAGS( <flags>, <size> ) . . . . . . . . . . . . . . .  set size\n */\n-#define HASH_FLAGS(flags)               (CONST_ADDR_OBJ(flags)[1])\n-\n+static inline void SET_SIZE_FLAGS(Obj flags, UInt size) {\n+    ((UInt *)ADDR_OBJ(flags))[1] = size;\n+}\n \n /****************************************************************************\n **\n-*F  SET_HASH_FLAGS( <flags>, <hash> ) . . . . . . . . . . . . . . .  set hash\n+*F  HASH_FLAGS( <flags> ) . . . . . . . . . . . .  hash value of <flags> or 0\n */\n-#define SET_HASH_FLAGS(flags,hash)      (ADDR_OBJ(flags)[1] = hash)\n-\n+static inline UInt HASH_FLAGS(Obj flags)\n+{\n+    return ((const UInt *)CONST_ADDR_OBJ(flags))[2];\n+}\n \n /****************************************************************************\n **\n-*F  LEN_FLAGS( <flags> )  . . . . . . . . . . . . . .  length of a flags list\n+*F  SET_HASH_FLAGS( <flags>, <hash> )  . . . . . .  set  hash value of <flags>\n */\n-static inline UInt LEN_FLAGS(Obj flags)\n+static inline void SET_HASH_FLAGS(Obj flags, UInt hash)\n {\n-    return (SIZE_OBJ(flags) / sizeof(Obj) - 3) << LBIPEB;\n-};\n+    ((UInt *)ADDR_OBJ(flags))[2] = hash;\n+}\n \n /****************************************************************************\n **\n *F  AND_CACHE_FLAGS( <flags> )  . . . . . . . . . 'and' cache of a flags list\n */\n-#define AND_CACHE_FLAGS(list)           (CONST_ADDR_OBJ(list)[2])\n+static inline Obj AND_CACHE_FLAGS(Obj flags) {\n+    return CONST_ADDR_OBJ(flags)[0];\n+}\n \n \n /****************************************************************************\n **\n *F  SET_AND_CACHE_FLAGS( <flags>, <len> ) set the 'and' cache of a flags list\n */\n-#define SET_AND_CACHE_FLAGS(flags,andc)  (ADDR_OBJ(flags)[2]=(andc))\n-\n-\n-/****************************************************************************\n-**\n-*F  NRB_FLAGS( <flags> )  . . . . . .  number of basic blocks of a flags list\n-*/\n-static inline UInt NRB_FLAGS(Obj flags)\n-{\n-    return SIZE_OBJ(flags) / sizeof(Obj) - 3;\n-};\n-\n+static inline void SET_AND_CACHE_FLAGS(Obj flags, Obj andc) {\n+    ADDR_OBJ(flags)[0]=andc;\n+}\n \n-/****************************************************************************\n-**\n-*F  BLOCKS_FLAGS( <flags> ) . . . . . . . . . . . . data area of a flags list\n-*/\n-#define BLOCKS_FLAGS(flags)             ((UInt*)(ADDR_OBJ(flags)+3))\n \n \n /****************************************************************************\n **\n-*F  BLOCK_ELM_FLAGS( <list>, <pos> )  . . . . . . . .  block  of a flags list\n-**\n-**  'BLOCK_ELM_FLAGS' return the block containing the <pos>-th element of the\n-**  flags list <list> as a UInt value, which is also a  valid left hand side.\n-**  <pos>  must be a positive  integer  less than or  equal  to the length of\n-**  <list>.\n-**\n-**  Note that 'BLOCK_ELM_FLAGS' is a macro, so do not call it  with arguments\n-**  that have side effects.\n+*F  TRUE_FLAGS( <flags>, <ix> )  the <ix>th set position in flags\n+**                               caller is responsible for <ix> being in range\n */\n-#define BLOCK_ELM_FLAGS(list, pos)      (BLOCKS_FLAGS(list)[((pos)-1) >> LBIPEB])\n \n+static inline UInt TRUE_FLAGS(Obj flags, UInt ix) {\n+    return (UInt) ((const UInt2 *)(CONST_ADDR_OBJ(flags) + 3))[ix];\n+}\n \n /****************************************************************************\n **\n-*F  MASK_POS_FLAGS( <pos> ) . . .  . .  bit mask for position of a flags list\n-**\n-**  'MASK_POS_FLAGS(<pos>)' returns a UInt with a single set  bit in position\n-**  '(<pos>-1) % BIPEB',\n-**  useful for accessing the <pos>-th element of a 'FLAGS' list.\n-**\n-**  Note that 'MASK_POS_FLAGS'  is a macro, so  do not call it with arguments\n-**  that have side effects.\n+*F  SET_TRUE_FLAGS( <flags>, <ix>, <filt> )  the <ix>th set position in flags\n+**                               caller is responsible for <ix> being in range","path":"src/opers.h","position":170,"original_position":170,"commit_id":"208ba2abf39923ce9664b718f93282c2ecee9fd3","original_commit_id":"208ba2abf39923ce9664b718f93282c2ecee9fd3","user":{"login":"fingolfin","id":241512,"avatar_url":"https://avatars2.githubusercontent.com/u/241512?v=4","gravatar_id":"","url":"https://api.github.com/users/fingolfin","html_url":"https://github.com/fingolfin","followers_url":"https://api.github.com/users/fingolfin/followers","following_url":"https://api.github.com/users/fingolfin/following{/other_user}","gists_url":"https://api.github.com/users/fingolfin/gists{/gist_id}","starred_url":"https://api.github.com/users/fingolfin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fingolfin/subscriptions","organizations_url":"https://api.github.com/users/fingolfin/orgs","repos_url":"https://api.github.com/users/fingolfin/repos","events_url":"https://api.github.com/users/fingolfin/events{/privacy}","received_events_url":"https://api.github.com/users/fingolfin/received_events","type":"User","site_admin":false},"body":"What does that mean? I.e. what is \"in range\" in the new model? I assume it means that it doesn't leave the bag -- OK, so let's add a `GAP_ASSERT` to check that anyway?","created_at":"2018-05-11T16:07:54Z","updated_at":"2018-05-11T16:13:22Z","html_url":"https://github.com/gap-system/gap/pull/2457#discussion_r187660415","pull_request_url":"https://api.github.com/repos/gap-system/gap/pulls/2457","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/gap-system/gap/pulls/comments/187660415"},"html":{"href":"https://github.com/gap-system/gap/pull/2457#discussion_r187660415"},"pull_request":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2457"}}},"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-11T16:13:22Z","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":411514,"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":"fingolfin"}}