{"action":"closed","number":879,"pull_request":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/879","id":56245229,"html_url":"https://github.com/Microsoft/visualfsharp/pull/879","diff_url":"https://github.com/Microsoft/visualfsharp/pull/879.diff","patch_url":"https://github.com/Microsoft/visualfsharp/pull/879.patch","issue_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/879","number":879,"state":"closed","locked":false,"title":"[WIP] Array.fs inline optimizations","user":{"login":"asik","id":1631157,"avatar_url":"https://avatars.githubusercontent.com/u/1631157?v=3","gravatar_id":"","url":"https://api.github.com/users/asik","html_url":"https://github.com/asik","followers_url":"https://api.github.com/users/asik/followers","following_url":"https://api.github.com/users/asik/following{/other_user}","gists_url":"https://api.github.com/users/asik/gists{/gist_id}","starred_url":"https://api.github.com/users/asik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asik/subscriptions","organizations_url":"https://api.github.com/users/asik/orgs","repos_url":"https://api.github.com/users/asik/repos","events_url":"https://api.github.com/users/asik/events{/privacy}","received_events_url":"https://api.github.com/users/asik/received_events","type":"User","site_admin":false},"body":"Inlines Array.fold, foldBack, scan, scanBack, reduce and reduceBack, for a 4-5X performance improvement. The generated code can become as good as a hand-written loop in some cases.\r\n\r\nI wonder why this has not been done before, perhaps there's some good reason not to inline these functions that I'm missing?\r\n\r\nAlso, use of `Array.length - 1` as the for loop bound rather than a local variable holding that value allows the CLR to optimize away bounds checking. This optimization could be applied throughout Array.fs but the gains are small, so I've chosen not to do it just now.\r\n\r\nPasses all unit tests.\r\n\r\nSample times here: https://gist.github.com/asik/43458ab6c51669967411 ","created_at":"2016-01-16T04:09:53Z","updated_at":"2016-06-25T10:07:12Z","closed_at":"2016-06-25T10:07:12Z","merged_at":null,"merge_commit_sha":"d92255f5c40786b2558cf319d342de4b4bcdb0ce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/879/commits","review_comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/879/comments","review_comment_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/879/comments","statuses_url":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/458c83718d8091a69697ab97ce246eb66a8cceab","head":{"label":"asik:inlineOptimizations","ref":"inlineOptimizations","sha":"458c83718d8091a69697ab97ce246eb66a8cceab","user":{"login":"asik","id":1631157,"avatar_url":"https://avatars.githubusercontent.com/u/1631157?v=3","gravatar_id":"","url":"https://api.github.com/users/asik","html_url":"https://github.com/asik","followers_url":"https://api.github.com/users/asik/followers","following_url":"https://api.github.com/users/asik/following{/other_user}","gists_url":"https://api.github.com/users/asik/gists{/gist_id}","starred_url":"https://api.github.com/users/asik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asik/subscriptions","organizations_url":"https://api.github.com/users/asik/orgs","repos_url":"https://api.github.com/users/asik/repos","events_url":"https://api.github.com/users/asik/events{/privacy}","received_events_url":"https://api.github.com/users/asik/received_events","type":"User","site_admin":false},"repo":{"id":49606693,"name":"visualfsharp","full_name":"asik/visualfsharp","owner":{"login":"asik","id":1631157,"avatar_url":"https://avatars.githubusercontent.com/u/1631157?v=3","gravatar_id":"","url":"https://api.github.com/users/asik","html_url":"https://github.com/asik","followers_url":"https://api.github.com/users/asik/followers","following_url":"https://api.github.com/users/asik/following{/other_user}","gists_url":"https://api.github.com/users/asik/gists{/gist_id}","starred_url":"https://api.github.com/users/asik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asik/subscriptions","organizations_url":"https://api.github.com/users/asik/orgs","repos_url":"https://api.github.com/users/asik/repos","events_url":"https://api.github.com/users/asik/events{/privacy}","received_events_url":"https://api.github.com/users/asik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asik/visualfsharp","description":"The Visual F# compiler and tools","fork":true,"url":"https://api.github.com/repos/asik/visualfsharp","forks_url":"https://api.github.com/repos/asik/visualfsharp/forks","keys_url":"https://api.github.com/repos/asik/visualfsharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asik/visualfsharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asik/visualfsharp/teams","hooks_url":"https://api.github.com/repos/asik/visualfsharp/hooks","issue_events_url":"https://api.github.com/repos/asik/visualfsharp/issues/events{/number}","events_url":"https://api.github.com/repos/asik/visualfsharp/events","assignees_url":"https://api.github.com/repos/asik/visualfsharp/assignees{/user}","branches_url":"https://api.github.com/repos/asik/visualfsharp/branches{/branch}","tags_url":"https://api.github.com/repos/asik/visualfsharp/tags","blobs_url":"https://api.github.com/repos/asik/visualfsharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asik/visualfsharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asik/visualfsharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/asik/visualfsharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asik/visualfsharp/statuses/{sha}","languages_url":"https://api.github.com/repos/asik/visualfsharp/languages","stargazers_url":"https://api.github.com/repos/asik/visualfsharp/stargazers","contributors_url":"https://api.github.com/repos/asik/visualfsharp/contributors","subscribers_url":"https://api.github.com/repos/asik/visualfsharp/subscribers","subscription_url":"https://api.github.com/repos/asik/visualfsharp/subscription","commits_url":"https://api.github.com/repos/asik/visualfsharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/asik/visualfsharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/asik/visualfsharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/asik/visualfsharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/asik/visualfsharp/contents/{+path}","compare_url":"https://api.github.com/repos/asik/visualfsharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asik/visualfsharp/merges","archive_url":"https://api.github.com/repos/asik/visualfsharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asik/visualfsharp/downloads","issues_url":"https://api.github.com/repos/asik/visualfsharp/issues{/number}","pulls_url":"https://api.github.com/repos/asik/visualfsharp/pulls{/number}","milestones_url":"https://api.github.com/repos/asik/visualfsharp/milestones{/number}","notifications_url":"https://api.github.com/repos/asik/visualfsharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asik/visualfsharp/labels{/name}","releases_url":"https://api.github.com/repos/asik/visualfsharp/releases{/id}","deployments_url":"https://api.github.com/repos/asik/visualfsharp/deployments","created_at":"2016-01-13T22:36:52Z","updated_at":"2016-01-13T22:37:07Z","pushed_at":"2016-01-16T05:58:13Z","git_url":"git://github.com/asik/visualfsharp.git","ssh_url":"git@github.com:asik/visualfsharp.git","clone_url":"https://github.com/asik/visualfsharp.git","svn_url":"https://github.com/asik/visualfsharp","homepage":null,"size":60161,"stargazers_count":0,"watchers_count":0,"language":"F#","has_issues":false,"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":"Microsoft:master","ref":"master","sha":"13912916e4ca243dd8208eb140ad7a91d162c59f","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":29048891,"name":"visualfsharp","full_name":"Microsoft/visualfsharp","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/visualfsharp","description":"The Visual F# compiler and tools","fork":false,"url":"https://api.github.com/repos/Microsoft/visualfsharp","forks_url":"https://api.github.com/repos/Microsoft/visualfsharp/forks","keys_url":"https://api.github.com/repos/Microsoft/visualfsharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/visualfsharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/visualfsharp/teams","hooks_url":"https://api.github.com/repos/Microsoft/visualfsharp/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/events","assignees_url":"https://api.github.com/repos/Microsoft/visualfsharp/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/visualfsharp/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/visualfsharp/tags","blobs_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/visualfsharp/languages","stargazers_url":"https://api.github.com/repos/Microsoft/visualfsharp/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/visualfsharp/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/visualfsharp/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/visualfsharp/subscription","commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/visualfsharp/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/visualfsharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/visualfsharp/merges","archive_url":"https://api.github.com/repos/Microsoft/visualfsharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/visualfsharp/downloads","issues_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/visualfsharp/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/visualfsharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/visualfsharp/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/visualfsharp/deployments","created_at":"2015-01-10T05:58:43Z","updated_at":"2016-06-25T07:10:20Z","pushed_at":"2016-06-25T09:19:15Z","git_url":"git://github.com/Microsoft/visualfsharp.git","ssh_url":"git@github.com:Microsoft/visualfsharp.git","clone_url":"https://github.com/Microsoft/visualfsharp.git","svn_url":"https://github.com/Microsoft/visualfsharp","homepage":null,"size":228241,"stargazers_count":753,"watchers_count":753,"language":"F#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":190,"mirror_url":null,"open_issues_count":325,"forks":190,"open_issues":325,"watchers":753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/879"},"html":{"href":"https://github.com/Microsoft/visualfsharp/pull/879"},"issue":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/issues/879"},"comments":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/issues/879/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/879/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/879/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/458c83718d8091a69697ab97ce246eb66a8cceab"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":20,"review_comments":0,"commits":1,"additions":39,"deletions":49,"changed_files":2}}
{"actor":{"display_login":"KevinRansom"}}