{"action":"closed","number":265,"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/265","id":48586963,"html_url":"https://github.com/ocaml/ocaml/pull/265","diff_url":"https://github.com/ocaml/ocaml/pull/265.diff","patch_url":"https://github.com/ocaml/ocaml/pull/265.patch","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/265","number":265,"state":"closed","locked":false,"title":"New representation for queues, avoiding Obj.magic","user":{"login":"diml","id":1251584,"avatar_url":"https://avatars.githubusercontent.com/u/1251584?v=3","gravatar_id":"","url":"https://api.github.com/users/diml","html_url":"https://github.com/diml","followers_url":"https://api.github.com/users/diml/followers","following_url":"https://api.github.com/users/diml/following{/other_user}","gists_url":"https://api.github.com/users/diml/gists{/gist_id}","starred_url":"https://api.github.com/users/diml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diml/subscriptions","organizations_url":"https://api.github.com/users/diml/orgs","repos_url":"https://api.github.com/users/diml/repos","events_url":"https://api.github.com/users/diml/events{/privacy}","received_events_url":"https://api.github.com/users/diml/received_events","type":"User","site_admin":false},"body":"This patch makes use of inline records to avoid the Obj.magic in queue.ml without compromising on performances.\r\n\r\nFirst I tried to keep the same representation but simply enrich the types to avoid the Obj.magic, but the implementation became quite complicated. See [here](https://github.com/diml/ocaml/blob/remove-Obj-magic-in-Queue-2/stdlib/queue.ml).\r\n\r\nInstead this patch change the implementation to use a simply-linked list, and the queue keeps a pointer to the end of the list. This uses one more word per queue, but on the other hand the implementation is much simpler.\r\n\r\nI wrote some simple micro-benchmarks with core\\_bench and the implementation proposed in this pull-request is slightly faster than the two other ones (one in trunk and the [more complicated one](https://github.com/diml/ocaml/blob/remove-Obj-magic-in-Queue-2/stdlib/queue.ml)).","created_at":"2015-10-23T14:31:36Z","updated_at":"2015-10-25T13:39:36Z","closed_at":"2015-10-25T13:39:36Z","merged_at":null,"merge_commit_sha":"6477c69314bf455414899cbb9f005b629f8f9ec3","assignee":{"login":"gasche","id":426238,"avatar_url":"https://avatars.githubusercontent.com/u/426238?v=3","gravatar_id":"","url":"https://api.github.com/users/gasche","html_url":"https://github.com/gasche","followers_url":"https://api.github.com/users/gasche/followers","following_url":"https://api.github.com/users/gasche/following{/other_user}","gists_url":"https://api.github.com/users/gasche/gists{/gist_id}","starred_url":"https://api.github.com/users/gasche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasche/subscriptions","organizations_url":"https://api.github.com/users/gasche/orgs","repos_url":"https://api.github.com/users/gasche/repos","events_url":"https://api.github.com/users/gasche/events{/privacy}","received_events_url":"https://api.github.com/users/gasche/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ocaml/ocaml/pulls/265/commits","review_comments_url":"https://api.github.com/repos/ocaml/ocaml/pulls/265/comments","review_comment_url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/265/comments","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/98a0a003873b1f5d144ab91ab91f7cd0ac88d519","head":{"label":"diml:remove-Obj-magic-in-Queue","ref":"remove-Obj-magic-in-Queue","sha":"98a0a003873b1f5d144ab91ab91f7cd0ac88d519","user":{"login":"diml","id":1251584,"avatar_url":"https://avatars.githubusercontent.com/u/1251584?v=3","gravatar_id":"","url":"https://api.github.com/users/diml","html_url":"https://github.com/diml","followers_url":"https://api.github.com/users/diml/followers","following_url":"https://api.github.com/users/diml/following{/other_user}","gists_url":"https://api.github.com/users/diml/gists{/gist_id}","starred_url":"https://api.github.com/users/diml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diml/subscriptions","organizations_url":"https://api.github.com/users/diml/orgs","repos_url":"https://api.github.com/users/diml/repos","events_url":"https://api.github.com/users/diml/events{/privacy}","received_events_url":"https://api.github.com/users/diml/received_events","type":"User","site_admin":false},"repo":{"id":17478091,"name":"ocaml","full_name":"diml/ocaml","owner":{"login":"diml","id":1251584,"avatar_url":"https://avatars.githubusercontent.com/u/1251584?v=3","gravatar_id":"","url":"https://api.github.com/users/diml","html_url":"https://github.com/diml","followers_url":"https://api.github.com/users/diml/followers","following_url":"https://api.github.com/users/diml/following{/other_user}","gists_url":"https://api.github.com/users/diml/gists{/gist_id}","starred_url":"https://api.github.com/users/diml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diml/subscriptions","organizations_url":"https://api.github.com/users/diml/orgs","repos_url":"https://api.github.com/users/diml/repos","events_url":"https://api.github.com/users/diml/events{/privacy}","received_events_url":"https://api.github.com/users/diml/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/diml/ocaml","description":"Read-only mirror of INRIA SVN","fork":true,"url":"https://api.github.com/repos/diml/ocaml","forks_url":"https://api.github.com/repos/diml/ocaml/forks","keys_url":"https://api.github.com/repos/diml/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diml/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diml/ocaml/teams","hooks_url":"https://api.github.com/repos/diml/ocaml/hooks","issue_events_url":"https://api.github.com/repos/diml/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/diml/ocaml/events","assignees_url":"https://api.github.com/repos/diml/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/diml/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/diml/ocaml/tags","blobs_url":"https://api.github.com/repos/diml/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diml/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diml/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/diml/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diml/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/diml/ocaml/languages","stargazers_url":"https://api.github.com/repos/diml/ocaml/stargazers","contributors_url":"https://api.github.com/repos/diml/ocaml/contributors","subscribers_url":"https://api.github.com/repos/diml/ocaml/subscribers","subscription_url":"https://api.github.com/repos/diml/ocaml/subscription","commits_url":"https://api.github.com/repos/diml/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/diml/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/diml/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/diml/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/diml/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/diml/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diml/ocaml/merges","archive_url":"https://api.github.com/repos/diml/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diml/ocaml/downloads","issues_url":"https://api.github.com/repos/diml/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/diml/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/diml/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/diml/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diml/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/diml/ocaml/releases{/id}","created_at":"2014-03-06T13:13:44Z","updated_at":"2015-09-08T14:07:01Z","pushed_at":"2015-10-23T16:20:27Z","git_url":"git://github.com/diml/ocaml.git","ssh_url":"git@github.com:diml/ocaml.git","clone_url":"https://github.com/diml/ocaml.git","svn_url":"https://github.com/diml/ocaml","homepage":null,"size":125250,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"ocaml:trunk","ref":"trunk","sha":"8f7f3162a74036962c8e1e3cdadc9c038783199f","user":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"repo":{"id":6786166,"name":"ocaml","full_name":"ocaml/ocaml","owner":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml/ocaml","description":"Read-only mirror of INRIA SVN","fork":false,"url":"https://api.github.com/repos/ocaml/ocaml","forks_url":"https://api.github.com/repos/ocaml/ocaml/forks","keys_url":"https://api.github.com/repos/ocaml/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml/ocaml/teams","hooks_url":"https://api.github.com/repos/ocaml/ocaml/hooks","issue_events_url":"https://api.github.com/repos/ocaml/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml/ocaml/events","assignees_url":"https://api.github.com/repos/ocaml/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml/ocaml/tags","blobs_url":"https://api.github.com/repos/ocaml/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml/ocaml/languages","stargazers_url":"https://api.github.com/repos/ocaml/ocaml/stargazers","contributors_url":"https://api.github.com/repos/ocaml/ocaml/contributors","subscribers_url":"https://api.github.com/repos/ocaml/ocaml/subscribers","subscription_url":"https://api.github.com/repos/ocaml/ocaml/subscription","commits_url":"https://api.github.com/repos/ocaml/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml/ocaml/merges","archive_url":"https://api.github.com/repos/ocaml/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml/ocaml/downloads","issues_url":"https://api.github.com/repos/ocaml/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/ocaml/ocaml/releases{/id}","created_at":"2012-11-20T22:18:22Z","updated_at":"2015-10-24T16:51:45Z","pushed_at":"2015-10-25T12:42:16Z","git_url":"git://github.com/ocaml/ocaml.git","ssh_url":"git@github.com:ocaml/ocaml.git","clone_url":"https://github.com/ocaml/ocaml.git","svn_url":"https://github.com/ocaml/ocaml","homepage":null,"size":184241,"stargazers_count":459,"watchers_count":459,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":179,"mirror_url":null,"open_issues_count":71,"forks":179,"open_issues":71,"watchers":459,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/265"},"html":{"href":"https://github.com/ocaml/ocaml/pull/265"},"issue":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/265"},"comments":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/265/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/265/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml/ocaml/statuses/98a0a003873b1f5d144ab91ab91f7cd0ac88d519"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":6,"review_comments":0,"commits":2,"additions":245,"deletions":114,"changed_files":4}}