Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Use Buffer.BlockCopy with byte[]s #6103

Merged
merged 1 commit into from
Feb 15, 2016

Commits on Feb 14, 2016

  1. Use Buffer.BlockCopy with byte[]

    In particular after dotnet/coreclr#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.
    
    This commit replaces usage of Array.Copy(byte[], ...) in corefx with Buffer.BlockCopy(byte[], ...).  A lot of places were already using it.
    
    (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.)
    stephentoub committed Feb 14, 2016
    Configuration menu
    Copy the full SHA
    3ab3bd6 View commit details
    Browse the repository at this point in the history