[Mono-devel-list] Patch for String.Equals

Ben Maurer 05mauben at hawken.edu
Mon Apr 5 10:31:49 EDT 2004

oops, sorry it is sizeof (char)/sizeof (void*)

The problem with long ops is that we cant optimize as much for them. The
burg rules are simply not there. the benefit seen from this may actually
be from unrolling the loop. It is possible that better performance (on
the 32 bit) would be obtained by just doing two integer compares.

I can take a look at the code we are generating later...

>>> Michal Moskal <malekith at pld-linux.org> 04/05/04 10:27 AM >>>
On Mon, Apr 05, 2004 at 07:43:07AM -0400, Ben Maurer wrote:
> To optimize for both platforms, the native integer size should be
> You can do this by casting the char* to a void**, and using
> string.Length * sizeof (char*) / sizeof (void**).

As far as I can tell sizeof(char*)==sizeof(void**), at least in C on all
sane platforms. So the code above isn't very helpful.

Anyway if the long compares doesn't hurt performance on x86, why avoid

: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: When in doubt, use brute force. -- Ken Thompson :: UL++++$ C++ E--- a?
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com

More information about the Mono-devel-list mailing list