[Mono-bugs] [Bug 45046][Wis] Changed - Array.BinarySearch can't search for nulls

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 18 Jun 2003 03:47:36 -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 tum@veridicus.com.

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

--- shadow/45046	Wed Jun 18 03:45:01 2003
+++ shadow/45046.tmp.22748	Wed Jun 18 03:47:36 2003
@@ -57,6 +57,19 @@
 
 
 ------- Additional Comments From tum@veridicus.com  2003-06-18 03:45 -------
 Created an attachment (id=4642)
 the patch
 
+
+------- Additional Comments From tum@veridicus.com  2003-06-18 03:47 -------
+Comments on the patch:
+
+I removed the extranuous checks in the overloaded versions of 
+BinarySearch.  They speed up the case where there is an error in the 
+arguments (by avoiding the overloaded method call) but they slow 
+down the case where the arguments are valid.  Having valid arguments 
+is the most likely path so it would be faster to remove the extra 
+checks.
+
+Having the extra checks also makes it a pain to debug code because 
+it is duplicated code.