[Mono-dev] patch for String equality/inequality

Atsushi Eno atsushi at ximian.com
Thu Feb 16 08:22:24 EST 2006


I noticed that String operator != just reuses == i.e. a != b
returns ! (a == b). It could be more effective if operator!=
has actual implementation code. Also, string.Equals() currently
calls operator!= which performs extraneous null check (maybe
static invocation was faster?).

As far as I tried with XMLmark, the attached patch certainly
improves performance (though not big, about 2%). If it looks
good feel free to apply to trunk.

I noticed that string op_Equality is slow, about 2x than MS.
There might be chances to improve it.

Atsushi Eno

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: inequality-and-instance-based-eq.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060216/aa234fe7/attachment.pl 

More information about the Mono-devel-list mailing list