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

Michal Moskal malekith at pld-linux.org
Mon Apr 5 10:21:43 EDT 2004

On Mon, Apr 05, 2004 at 07:43:07AM -0400, Ben Maurer wrote:
> To optimize for both platforms, the native integer size should be used.
> 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?

More information about the Mono-devel-list mailing list