{"action":"opened","number":7579,"pull_request":{"url":"https://api.github.com/repos/scala/scala/pulls/7579","id":241077090,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMDc3MDkw","html_url":"https://github.com/scala/scala/pull/7579","diff_url":"https://github.com/scala/scala/pull/7579.diff","patch_url":"https://github.com/scala/scala/pull/7579.patch","issue_url":"https://api.github.com/repos/scala/scala/issues/7579","number":7579,"state":"open","locked":false,"title":"TreeMap#keySet creates a TreeSet","user":{"login":"joshlemer","id":5122903,"node_id":"MDQ6VXNlcjUxMjI5MDM=","avatar_url":"https://avatars3.githubusercontent.com/u/5122903?v=4","gravatar_id":"","url":"https://api.github.com/users/joshlemer","html_url":"https://github.com/joshlemer","followers_url":"https://api.github.com/users/joshlemer/followers","following_url":"https://api.github.com/users/joshlemer/following{/other_user}","gists_url":"https://api.github.com/users/joshlemer/gists{/gist_id}","starred_url":"https://api.github.com/users/joshlemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshlemer/subscriptions","organizations_url":"https://api.github.com/users/joshlemer/orgs","repos_url":"https://api.github.com/users/joshlemer/repos","events_url":"https://api.github.com/users/joshlemer/events{/privacy}","received_events_url":"https://api.github.com/users/joshlemer/received_events","type":"User","site_admin":false},"body":"`TreeMap#keySet` currently will create a new Set which, when modified, will trigger a full deep copy of the map keys into a new Set.\r\n\r\nInstead, we change TreeSet to have an underlying tree of type `Tree[A, Any]` rather than `Tree[A, Null]`, and simply ignore any values stored in the `Any`s. This essentially turns `TreeMap#keySet` into a no-op.\r\n\r\n\r\n## Benchmarks!\r\n```\r\n[info] Benchmark                      (size)  Mode  Cnt        Score        Error  Units\r\n[info] MapBenchmark.keyset_excl            0  avgt    6       19.006 ±      2.532  ns/op\r\n[info] MapBenchmark.keyset_excl           10  avgt    6       75.278 ±      9.936  ns/op\r\n[info] MapBenchmark.keyset_excl         1000  avgt    6      179.175 ±     23.782  ns/op\r\n[info] MapBenchmark.keyset_excl        10000  avgt    6      237.307 ±     23.803  ns/op\r\n[info] MapBenchmark.keyset_excl       100000  avgt    6      298.336 ±     59.395  ns/op\r\n[info] MapBenchmark.keyset_excl      1000000  avgt    6      370.251 ±     56.013  ns/op\r\n[info] MapBenchmark.keyset_incl            0  avgt    6       22.552 ±      0.750  ns/op\r\n[info] MapBenchmark.keyset_incl           10  avgt    6       35.853 ±      2.382  ns/op\r\n[info] MapBenchmark.keyset_incl         1000  avgt    6       87.752 ±      6.868  ns/op\r\n[info] MapBenchmark.keyset_incl        10000  avgt    6      114.505 ±      2.039  ns/op\r\n[info] MapBenchmark.keyset_incl       100000  avgt    6      141.777 ±      2.068  ns/op\r\n[info] MapBenchmark.keyset_incl      1000000  avgt    6      170.921 ±      2.001  ns/op\r\n[info] MapBenchmark.old_keyset_excl        0  avgt    6       84.470 ±      3.612  ns/op\r\n[info] MapBenchmark.old_keyset_excl       10  avgt    6      261.250 ±     13.085  ns/op\r\n[info] MapBenchmark.old_keyset_excl     1000  avgt    6     7920.724 ±     51.274  ns/op\r\n[info] MapBenchmark.old_keyset_excl    10000  avgt    6    97249.755 ±   1040.499  ns/op\r\n[info] MapBenchmark.old_keyset_excl   100000  avgt    6  1053655.934 ±  20767.632  ns/op\r\n[info] MapBenchmark.old_keyset_excl  1000000  avgt    6  9570122.164 ± 224791.632  ns/op\r\n[info] MapBenchmark.old_keyset_incl        0  avgt    6       90.871 ±      2.222  ns/op\r\n[info] MapBenchmark.old_keyset_incl       10  avgt    6      172.646 ±      2.270  ns/op\r\n[info] MapBenchmark.old_keyset_incl     1000  avgt    6     7787.613 ±    279.998  ns/op\r\n[info] MapBenchmark.old_keyset_incl    10000  avgt    6    96754.475 ±   3025.751  ns/op\r\n[info] MapBenchmark.old_keyset_incl   100000  avgt    6  1162963.769 ±  35115.460  ns/op\r\n[info] MapBenchmark.old_keyset_incl  1000000  avgt    6  9498622.033 ± 116221.941  ns/op\r\n```","created_at":"2018-12-27T05:19:47Z","updated_at":"2018-12-27T05:19:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scala/scala/pulls/7579/commits","review_comments_url":"https://api.github.com/repos/scala/scala/pulls/7579/comments","review_comment_url":"https://api.github.com/repos/scala/scala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scala/scala/issues/7579/comments","statuses_url":"https://api.github.com/repos/scala/scala/statuses/24755e802b58776e5e9adb343bf7580f23352e0c","head":{"label":"joshlemer:treemap-keyset","ref":"treemap-keyset","sha":"24755e802b58776e5e9adb343bf7580f23352e0c","user":{"login":"joshlemer","id":5122903,"node_id":"MDQ6VXNlcjUxMjI5MDM=","avatar_url":"https://avatars3.githubusercontent.com/u/5122903?v=4","gravatar_id":"","url":"https://api.github.com/users/joshlemer","html_url":"https://github.com/joshlemer","followers_url":"https://api.github.com/users/joshlemer/followers","following_url":"https://api.github.com/users/joshlemer/following{/other_user}","gists_url":"https://api.github.com/users/joshlemer/gists{/gist_id}","starred_url":"https://api.github.com/users/joshlemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshlemer/subscriptions","organizations_url":"https://api.github.com/users/joshlemer/orgs","repos_url":"https://api.github.com/users/joshlemer/repos","events_url":"https://api.github.com/users/joshlemer/events{/privacy}","received_events_url":"https://api.github.com/users/joshlemer/received_events","type":"User","site_admin":false},"repo":{"id":140112893,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAxMTI4OTM=","name":"scala","full_name":"joshlemer/scala","private":false,"owner":{"login":"joshlemer","id":5122903,"node_id":"MDQ6VXNlcjUxMjI5MDM=","avatar_url":"https://avatars3.githubusercontent.com/u/5122903?v=4","gravatar_id":"","url":"https://api.github.com/users/joshlemer","html_url":"https://github.com/joshlemer","followers_url":"https://api.github.com/users/joshlemer/followers","following_url":"https://api.github.com/users/joshlemer/following{/other_user}","gists_url":"https://api.github.com/users/joshlemer/gists{/gist_id}","starred_url":"https://api.github.com/users/joshlemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshlemer/subscriptions","organizations_url":"https://api.github.com/users/joshlemer/orgs","repos_url":"https://api.github.com/users/joshlemer/repos","events_url":"https://api.github.com/users/joshlemer/events{/privacy}","received_events_url":"https://api.github.com/users/joshlemer/received_events","type":"User","site_admin":false},"html_url":"https://github.com/joshlemer/scala","description":"The Scala programming language","fork":true,"url":"https://api.github.com/repos/joshlemer/scala","forks_url":"https://api.github.com/repos/joshlemer/scala/forks","keys_url":"https://api.github.com/repos/joshlemer/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshlemer/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshlemer/scala/teams","hooks_url":"https://api.github.com/repos/joshlemer/scala/hooks","issue_events_url":"https://api.github.com/repos/joshlemer/scala/issues/events{/number}","events_url":"https://api.github.com/repos/joshlemer/scala/events","assignees_url":"https://api.github.com/repos/joshlemer/scala/assignees{/user}","branches_url":"https://api.github.com/repos/joshlemer/scala/branches{/branch}","tags_url":"https://api.github.com/repos/joshlemer/scala/tags","blobs_url":"https://api.github.com/repos/joshlemer/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshlemer/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshlemer/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshlemer/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshlemer/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/joshlemer/scala/languages","stargazers_url":"https://api.github.com/repos/joshlemer/scala/stargazers","contributors_url":"https://api.github.com/repos/joshlemer/scala/contributors","subscribers_url":"https://api.github.com/repos/joshlemer/scala/subscribers","subscription_url":"https://api.github.com/repos/joshlemer/scala/subscription","commits_url":"https://api.github.com/repos/joshlemer/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshlemer/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshlemer/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshlemer/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshlemer/scala/contents/{+path}","compare_url":"https://api.github.com/repos/joshlemer/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshlemer/scala/merges","archive_url":"https://api.github.com/repos/joshlemer/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshlemer/scala/downloads","issues_url":"https://api.github.com/repos/joshlemer/scala/issues{/number}","pulls_url":"https://api.github.com/repos/joshlemer/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/joshlemer/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/joshlemer/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshlemer/scala/labels{/name}","releases_url":"https://api.github.com/repos/joshlemer/scala/releases{/id}","deployments_url":"https://api.github.com/repos/joshlemer/scala/deployments","created_at":"2018-07-07T19:48:13Z","updated_at":"2018-12-23T17:57:19Z","pushed_at":"2018-12-27T05:17:04Z","git_url":"git://github.com/joshlemer/scala.git","ssh_url":"git@github.com:joshlemer/scala.git","clone_url":"https://github.com/joshlemer/scala.git","svn_url":"https://github.com/joshlemer/scala","homepage":"http://www.scala-lang.org/","size":109597,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"2.13.x"}},"base":{"label":"scala:2.13.x","ref":"2.13.x","sha":"3a76f41d531a2aefba5c605f5b1fb738c33c5fa6","user":{"login":"scala","id":57059,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MDU5","avatar_url":"https://avatars2.githubusercontent.com/u/57059?v=4","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"repo":{"id":2888818,"node_id":"MDEwOlJlcG9zaXRvcnkyODg4ODE4","name":"scala","full_name":"scala/scala","private":false,"owner":{"login":"scala","id":57059,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MDU5","avatar_url":"https://avatars2.githubusercontent.com/u/57059?v=4","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/scala/scala","description":"The Scala programming language","fork":false,"url":"https://api.github.com/repos/scala/scala","forks_url":"https://api.github.com/repos/scala/scala/forks","keys_url":"https://api.github.com/repos/scala/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala/scala/teams","hooks_url":"https://api.github.com/repos/scala/scala/hooks","issue_events_url":"https://api.github.com/repos/scala/scala/issues/events{/number}","events_url":"https://api.github.com/repos/scala/scala/events","assignees_url":"https://api.github.com/repos/scala/scala/assignees{/user}","branches_url":"https://api.github.com/repos/scala/scala/branches{/branch}","tags_url":"https://api.github.com/repos/scala/scala/tags","blobs_url":"https://api.github.com/repos/scala/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/scala/scala/languages","stargazers_url":"https://api.github.com/repos/scala/scala/stargazers","contributors_url":"https://api.github.com/repos/scala/scala/contributors","subscribers_url":"https://api.github.com/repos/scala/scala/subscribers","subscription_url":"https://api.github.com/repos/scala/scala/subscription","commits_url":"https://api.github.com/repos/scala/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/scala/scala/contents/{+path}","compare_url":"https://api.github.com/repos/scala/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala/scala/merges","archive_url":"https://api.github.com/repos/scala/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala/scala/downloads","issues_url":"https://api.github.com/repos/scala/scala/issues{/number}","pulls_url":"https://api.github.com/repos/scala/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/scala/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/scala/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala/scala/labels{/name}","releases_url":"https://api.github.com/repos/scala/scala/releases{/id}","deployments_url":"https://api.github.com/repos/scala/scala/deployments","created_at":"2011-12-01T05:02:34Z","updated_at":"2018-12-27T00:40:57Z","pushed_at":"2018-12-27T04:00:13Z","git_url":"git://github.com/scala/scala.git","ssh_url":"git@github.com:scala/scala.git","clone_url":"https://github.com/scala/scala.git","svn_url":"https://github.com/scala/scala","homepage":"http://www.scala-lang.org/","size":110341,"stargazers_count":11105,"watchers_count":11105,"language":"Scala","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2613,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2613,"open_issues":78,"watchers":11105,"default_branch":"2.13.x"}},"_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/7579"},"html":{"href":"https://github.com/scala/scala/pull/7579"},"issue":{"href":"https://api.github.com/repos/scala/scala/issues/7579"},"comments":{"href":"https://api.github.com/repos/scala/scala/issues/7579/comments"},"review_comments":{"href":"https://api.github.com/repos/scala/scala/pulls/7579/comments"},"review_comment":{"href":"https://api.github.com/repos/scala/scala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scala/scala/pulls/7579/commits"},"statuses":{"href":"https://api.github.com/repos/scala/scala/statuses/24755e802b58776e5e9adb343bf7580f23352e0c"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":7,"deletions":5,"changed_files":2}}
{"actor":{"display_login":"joshlemer"}}