[Mono-dev] Somebody please test this String patch

Andreas Nahr ClassDevelopment at A-SoftTech.com
Sun Jan 27 19:51:41 EST 2008


This patch tries to get string a little bit out of its miserable shape:

It fixes several bugs, and implements the majority of the remaining
internalcalls with optimized managed code, giving performance increases for
the most cases (sometimes quite a lot).

Fixed is:
Bugs in parameterchecks for StartsWith, IndexOf, LastIndexOf
Marked possible bug in:
Compare
Managed Implementations of:
PadRight, PadLeft, LastIndexOfAny, StringCopy, Trim, TrimStart, TrimEnd,
Split (Char versions), ToCharArray

It is not yet completely tested, but it would be nice if somebody else could
help a little bit - it's an important class after all ;)

The patch also makes most of the String-icall.c file obsolete.

Some raw perfomance numbers for tests I did:

Trim:
1813 -> 1290
631  -> 550
1332 -> 421
7441 -> 2754
6319 -> 9303

Split:
10174 -> 5718
982   -> 871
7921  -> 7170
26809 -> 7980
18506 -> 11290

Pad:
8021 -> 8100
1612 -> 1663
841  -> 861
1642 -> 1682
821  -> 71

LastIndexOfAny:
2253 -> 2243
1773 -> 1362
6990 -> 6470
1883 -> 2240
831  -> 2240
-------------- next part --------------
A non-text attachment was scrubbed...
Name: String.patch
Type: application/octet-stream
Size: 38143 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080128/c4a8ce1e/attachment.obj 


More information about the Mono-devel-list mailing list