{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37094","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37094/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37094/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37094/events","html_url":"https://github.com/rust-lang/rust/pull/37094","id":182330174,"number":37094,"title":"Specialize Vec::extend to Vec::extend_from_slice","user":{"login":"fhartwig","id":83271,"avatar_url":"https://avatars.githubusercontent.com/u/83271?v=3","gravatar_id":"","url":"https://api.github.com/users/fhartwig","html_url":"https://github.com/fhartwig","followers_url":"https://api.github.com/users/fhartwig/followers","following_url":"https://api.github.com/users/fhartwig/following{/other_user}","gists_url":"https://api.github.com/users/fhartwig/gists{/gist_id}","starred_url":"https://api.github.com/users/fhartwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhartwig/subscriptions","organizations_url":"https://api.github.com/users/fhartwig/orgs","repos_url":"https://api.github.com/users/fhartwig/repos","events_url":"https://api.github.com/users/fhartwig/events{/privacy}","received_events_url":"https://api.github.com/users/fhartwig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-11T17:52:02Z","updated_at":"2016-10-12T03:22:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/37094","html_url":"https://github.com/rust-lang/rust/pull/37094","diff_url":"https://github.com/rust-lang/rust/pull/37094.diff","patch_url":"https://github.com/rust-lang/rust/pull/37094.patch"},"body":"I tried using the existing `SpecExtend` as a helper trait for this, but the instances would always conflict with the instances higher up in the file, so I created a new helper trait.\r\n\r\nBenchmarking `extend` vs `extend_from_slice` with an slice of 1000 `u64`s gives the following results:\r\n\r\n```\r\nbefore:\r\n\r\nrunning 2 tests\r\ntest tests::bench_extend_from_slice ... bench:         166 ns/iter (+/- 78)\r\ntest tests::bench_extend_trait      ... bench:       1,187 ns/iter (+/- 697)\r\n\r\n\r\nafter:\r\nrunning 2 tests\r\ntest tests::bench_extend_from_slice ... bench:         149 ns/iter (+/- 87)\r\ntest tests::bench_extend_trait      ... bench:         138 ns/iter (+/- 70)\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/253108867","html_url":"https://github.com/rust-lang/rust/pull/37094#issuecomment-253108867","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37094","id":253108867,"user":{"login":"apasel422","id":8644784,"avatar_url":"https://avatars.githubusercontent.com/u/8644784?v=3","gravatar_id":"","url":"https://api.github.com/users/apasel422","html_url":"https://github.com/apasel422","followers_url":"https://api.github.com/users/apasel422/followers","following_url":"https://api.github.com/users/apasel422/following{/other_user}","gists_url":"https://api.github.com/users/apasel422/gists{/gist_id}","starred_url":"https://api.github.com/users/apasel422/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apasel422/subscriptions","organizations_url":"https://api.github.com/users/apasel422/orgs","repos_url":"https://api.github.com/users/apasel422/repos","events_url":"https://api.github.com/users/apasel422/events{/privacy}","received_events_url":"https://api.github.com/users/apasel422/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T03:22:21Z","updated_at":"2016-10-12T03:22:21Z","body":"Out of curiosity, what were the conflicts with `SpecExtend`?"}}
{"actor":{"display_login":"apasel422"}}