{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/6103","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/6103/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/6103/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/6103/events","html_url":"https://github.com/dotnet/corefx/pull/6103","id":133536616,"number":6103,"title":"Use Buffer.BlockCopy with byte[]s","user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars.githubusercontent.com/u/2642209?v=3","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/2%20-%20In%20Progress","name":"2 - In Progress","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-14T12:52:21Z","updated_at":"2016-02-14T16:39:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/6103","html_url":"https://github.com/dotnet/corefx/pull/6103","diff_url":"https://github.com/dotnet/corefx/pull/6103.diff","patch_url":"https://github.com/dotnet/corefx/pull/6103.patch"},"body":"In particular after https://github.com/dotnet/coreclr/pull/3118, Buffer.BlockCopy has less overhead than Array.Copy when copying byte[]s, such that there's no benefit to using Array.Copy and potential benefit to using Buffer.BlockCopy (in particular for small arrays).\r\n\r\nThis commit replaces usage of Array.Copy(byte[], ...) in corefx with Buffer.BlockCopy(byte[], ...).  A lot of places were already using BlockCopy.\r\n\r\n(In a few places where we weren't passing lower bounds to Array.Copy with T[] arguments, I added explicit lower bounds as well to avoid the overload needing to call GetLowerBound.)\r\n\r\ncc: \r\n@davidsh for networking\r\n@saurabh500 for data\r\n@bartonjs for security\r\n@ianhays for I/O"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/183918743","html_url":"https://github.com/dotnet/corefx/pull/6103#issuecomment-183918743","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/6103","id":183918743,"user":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T16:39:27Z","updated_at":"2016-02-14T16:39:27Z","body":"Security (including parts in Common) LGTM"}}