[Mono-bugs] [Bug 52395][Wis] Changed - System.Buffer.BlockCopy is slower than System.Array.Copy

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 5 May 2004 06:43:21 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lupus@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=52395

--- shadow/52395	2004-05-05 06:27:01.000000000 -0400
+++ shadow/52395.tmp.17730	2004-05-05 06:43:21.000000000 -0400
@@ -76,6 +76,13 @@
  change 128 to 1280 (so copying time dominates), the two methods have
 approx the same performance.
 
 ------- Additional Comments From bmaurer@users.sf.net  2004-01-09 12:08 -------
 No, because Array.Copy must check arguments. BlockCopy only works 
 with primative structures, otherwise, it does not do any checks.
+
+------- Additional Comments From lupus@ximian.com  2004-05-05 06:43 -------
+BlockCopyInternal could be changed to do the ByteLength checks in
+unmanaged code and return an error code which is check in managed code
+to throw an exception. This would eliminate the two additional icalls.
+See also the other bug report for how to implement ByteLength with a
+fast jit opcode.