{"action":"opened","number":28,"pull_request":{"url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/28","id":92696140,"html_url":"https://github.com/JuliaCI/BenchmarkTools.jl/pull/28","diff_url":"https://github.com/JuliaCI/BenchmarkTools.jl/pull/28.diff","patch_url":"https://github.com/JuliaCI/BenchmarkTools.jl/pull/28.patch","issue_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/28","number":28,"state":"open","locked":false,"title":"Don't return `nothing` in core benchmarkable function even if output is unassigned","user":{"login":"jrevels","id":3277443,"avatar_url":"https://avatars.githubusercontent.com/u/3277443?v=3","gravatar_id":"","url":"https://api.github.com/users/jrevels","html_url":"https://github.com/jrevels","followers_url":"https://api.github.com/users/jrevels/followers","following_url":"https://api.github.com/users/jrevels/following{/other_user}","gists_url":"https://api.github.com/users/jrevels/gists{/gist_id}","starred_url":"https://api.github.com/users/jrevels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrevels/subscriptions","organizations_url":"https://api.github.com/users/jrevels/orgs","repos_url":"https://api.github.com/users/jrevels/repos","events_url":"https://api.github.com/users/jrevels/events{/privacy}","received_events_url":"https://api.github.com/users/jrevels/received_events","type":"User","site_admin":false},"body":"This potentially fixes #6 by reverting the `nothing` return block added in #4. Before this PR:\r\n\r\n```julia\r\njulia> @benchmark view(a, 1:2, 1:2) setup = (a = rand(3, 3))\r\nBenchmarkTools.Trial:\r\n  samples:          10000\r\n  evals/sample:     1000\r\n  time tolerance:   5.00%\r\n  memory tolerance: 1.00%\r\n  memory estimate:  0.00 bytes\r\n  allocs estimate:  0\r\n  minimum time:     2.882 ns (0.00% GC)\r\n  median time:      2.892 ns (0.00% GC)\r\n  mean time:        2.901 ns (0.00% GC)\r\n  maximum time:     12.871 ns (0.00% GC)\r\n```\r\n\r\nAfter this PR:\r\n\r\n```julia\r\njulia> @benchmark view(a, 1:2, 1:2) setup = (a = rand(3, 3))\r\nBenchmarkTools.Trial:\r\n  samples:          10000\r\n  evals/sample:     998\r\n  time tolerance:   5.00%\r\n  memory tolerance: 1.00%\r\n  memory estimate:  64.00 bytes\r\n  allocs estimate:  1\r\n  minimum time:     17.161 ns (0.00% GC)\r\n  median time:      19.459 ns (0.00% GC)\r\n  mean time:        21.492 ns (7.39% GC)\r\n  maximum time:     725.316 ns (85.27% GC)\r\n```\r\n\r\n@yuyichao Was LLVM (maybe Julia?) able to infer that `a` wasn't being modified and `nothing` was being returned, and so it elided the calculation? \r\n\r\nIt is possible that the `length(out_vars) == 1` and `else` cases are also vulnerable to this sort of problem; if that's the case, I'm not sure of the right way to fix this issue without breaking the functionality added in #4.","created_at":"2016-11-08T00:59:13Z","updated_at":"2016-11-08T00:59:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/28/commits","review_comments_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/28/comments","review_comment_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/28/comments","statuses_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/statuses/e6978113897bc5de4a4fcd39db831698c40c496a","head":{"label":"JuliaCI:jr/returnfix","ref":"jr/returnfix","sha":"e6978113897bc5de4a4fcd39db831698c40c496a","user":{"login":"JuliaCI","id":9957604,"avatar_url":"https://avatars.githubusercontent.com/u/9957604?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaCI","html_url":"https://github.com/JuliaCI","followers_url":"https://api.github.com/users/JuliaCI/followers","following_url":"https://api.github.com/users/JuliaCI/following{/other_user}","gists_url":"https://api.github.com/users/JuliaCI/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaCI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaCI/subscriptions","organizations_url":"https://api.github.com/users/JuliaCI/orgs","repos_url":"https://api.github.com/users/JuliaCI/repos","events_url":"https://api.github.com/users/JuliaCI/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaCI/received_events","type":"Organization","site_admin":false},"repo":{"id":52390912,"name":"BenchmarkTools.jl","full_name":"JuliaCI/BenchmarkTools.jl","owner":{"login":"JuliaCI","id":9957604,"avatar_url":"https://avatars.githubusercontent.com/u/9957604?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaCI","html_url":"https://github.com/JuliaCI","followers_url":"https://api.github.com/users/JuliaCI/followers","following_url":"https://api.github.com/users/JuliaCI/following{/other_user}","gists_url":"https://api.github.com/users/JuliaCI/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaCI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaCI/subscriptions","organizations_url":"https://api.github.com/users/JuliaCI/orgs","repos_url":"https://api.github.com/users/JuliaCI/repos","events_url":"https://api.github.com/users/JuliaCI/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaCI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaCI/BenchmarkTools.jl","description":"A benchmarking framework for the Julia language","fork":false,"url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl","forks_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/forks","keys_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/teams","hooks_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/events","assignees_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/tags","blobs_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/subscription","commits_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/merges","archive_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/downloads","issues_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/deployments","created_at":"2016-02-23T20:54:02Z","updated_at":"2016-11-03T02:32:08Z","pushed_at":"2016-11-08T00:50:14Z","git_url":"git://github.com/JuliaCI/BenchmarkTools.jl.git","ssh_url":"git@github.com:JuliaCI/BenchmarkTools.jl.git","clone_url":"https://github.com/JuliaCI/BenchmarkTools.jl.git","svn_url":"https://github.com/JuliaCI/BenchmarkTools.jl","homepage":"","size":198,"stargazers_count":27,"watchers_count":27,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":10,"forks":5,"open_issues":10,"watchers":27,"default_branch":"master"}},"base":{"label":"JuliaCI:master","ref":"master","sha":"ceb9dfc890a16a224c0ba9b128da1250708f16c4","user":{"login":"JuliaCI","id":9957604,"avatar_url":"https://avatars.githubusercontent.com/u/9957604?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaCI","html_url":"https://github.com/JuliaCI","followers_url":"https://api.github.com/users/JuliaCI/followers","following_url":"https://api.github.com/users/JuliaCI/following{/other_user}","gists_url":"https://api.github.com/users/JuliaCI/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaCI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaCI/subscriptions","organizations_url":"https://api.github.com/users/JuliaCI/orgs","repos_url":"https://api.github.com/users/JuliaCI/repos","events_url":"https://api.github.com/users/JuliaCI/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaCI/received_events","type":"Organization","site_admin":false},"repo":{"id":52390912,"name":"BenchmarkTools.jl","full_name":"JuliaCI/BenchmarkTools.jl","owner":{"login":"JuliaCI","id":9957604,"avatar_url":"https://avatars.githubusercontent.com/u/9957604?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaCI","html_url":"https://github.com/JuliaCI","followers_url":"https://api.github.com/users/JuliaCI/followers","following_url":"https://api.github.com/users/JuliaCI/following{/other_user}","gists_url":"https://api.github.com/users/JuliaCI/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaCI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaCI/subscriptions","organizations_url":"https://api.github.com/users/JuliaCI/orgs","repos_url":"https://api.github.com/users/JuliaCI/repos","events_url":"https://api.github.com/users/JuliaCI/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaCI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaCI/BenchmarkTools.jl","description":"A benchmarking framework for the Julia language","fork":false,"url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl","forks_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/forks","keys_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/teams","hooks_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/events","assignees_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/tags","blobs_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/subscription","commits_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/merges","archive_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/downloads","issues_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/deployments","created_at":"2016-02-23T20:54:02Z","updated_at":"2016-11-03T02:32:08Z","pushed_at":"2016-11-08T00:50:14Z","git_url":"git://github.com/JuliaCI/BenchmarkTools.jl.git","ssh_url":"git@github.com:JuliaCI/BenchmarkTools.jl.git","clone_url":"https://github.com/JuliaCI/BenchmarkTools.jl.git","svn_url":"https://github.com/JuliaCI/BenchmarkTools.jl","homepage":"","size":198,"stargazers_count":27,"watchers_count":27,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":10,"forks":5,"open_issues":10,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/28"},"html":{"href":"https://github.com/JuliaCI/BenchmarkTools.jl/pull/28"},"issue":{"href":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/28"},"comments":{"href":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaCI/BenchmarkTools.jl/statuses/e6978113897bc5de4a4fcd39db831698c40c496a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"jrevels"}}