[Mono-devel-list] [PATCH] Faster String.Equals

Ben Maurer bmaurer at users.sourceforge.net
Fri May 21 21:49:22 EDT 2004


Almost forgot perf data.

[benm at Ben benm]$ /devel/mono/mono/mini/mono t.exe
   1  |    143    131    125    111
   2  |    207    148    127    115
   4  |    225    148    126    108
   8  |    253    154    125    114
  16  |    305    149    124    119
  32  |    462    149    126    113
  64  |    672    146    128    113
 128  |   1087    146    127    113
 256  |   1914    151    128    110
 512  |   3560    149    127    113
1024  |   7246    145    124    111
[benm at Ben benm]$ mono t.exe
   1  |    214    219    175    138
   2  |    321    256    178    135
   4  |    389    253    179    135
   8  |    489    250    179    137
  16  |    701    252    176    140
  32  |   1187    250    179    137
  64  |   2013    254    177    137
 128  |   3689    248    179    140
 256  |   7014    250    179    137
 512  |  13687    255    176    138
1024  |  27266    250    176    140

The code I used is attached.

-- Ben
On Fri, 2004-05-21 at 21:46, Ben Maurer wrote:
> Hello,
> 
> I have written a faster version of String.Equals. What I did was to hand
> code the method in assembly, and allow the JIT to inject the hand tuned
> code in place of the code that would be jitted.
> 
> I also had to make some changes to arch/x86 to allow me to write the
> code I needed.
> 
> The patch is attached.
> 
> -- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.cs
Type: text/x-csharp
Size: 1138 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040521/373b0fdf/attachment.bin 


More information about the Mono-devel-list mailing list