开发者

Buffer.BlockCopy vs unsafe byte* pointer copy

which one has better performance whe开发者_Python百科n copy a block of byte?


Buffer.BlockCopy is pretty optimised - it is basically a wrapper over a raw mem-copy; so it should be pretty fast (and avoids messing with pointers and unsafe code). It should be the default. You could of course measure it each way...


Handling of Large Byte Arrays at http://www.codeproject.com/KB/dotnet/Large_Byte_Array_handling.aspx documents performance versus various methods, include the methods in your question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜