[Mono-dev] [PATCH] String.cs

Phil Garcia phil at thinkedge.com
Mon May 11 22:34:54 EDT 2009


 Attached is a benchmark program that runs each test case ten million
times. Overall the benchmark for the managed version executes 1.35% faster
than the unmanaged one. Also attached is a chart showing the relative change
in performance for each test case.

I believe this demonstrates that overall the patch does not compromise
performance.

Phil

On Sun, May 10, 2009 at 9:46 PM, Atsushi Eno <
atsushieno at veritas-vos-liberabit.com> wrote:

> Hello,
>
> That is a nice challenge :)
> I had a look at the test you attached, and noticed that it counts
> only the time for the entire set of the split operations.
> What about the *each* of the cases?
>
> Atsushi Eno
>
> Phil Garcia wrote:
>
>> Yes, I have performed some benchmark testing. Attached is a copy of the
>> benchmark program. It's runs most of the existing test cases for the Split
>> method in a loop a million times.
>>  The results between the managed and unmanaged versions are statistically
>> the same. The unmanaged version seems to be slightly faster by 1.4%. The
>> unmanaged version was never faster than the managed version in all the
>> benchmark runs.
>>  I only have an ESXi virtual environment (running only two guests) to run
>> the benchmark so my sampling error is higher than if tested on a dedicated
>> machine. I would appreciate some independent verification, if necessary.
>>  Phil
>> (aka tgiphil on #monodev)
>>
>> On Wed, May 6, 2009 at 6:35 AM, Rafael Teixeira <monoman at gmail.com<mailto:
>> monoman at gmail.com>> wrote:
>>
>>    Do you have some benchmarks comparing the two versions? Although we
>>    really like the idea of having less-and-less unmanaged code in the
>>    system class libraries, we need to be sure the solution does not
>>    affect performance too badly.
>>
>>    Thanks for your efforts so far,
>>
>>    On Wed, May 6, 2009 at 7:03 AM, Phil <mono at thinkedge.com
>>    <mailto:mono at thinkedge.com>> wrote:
>>
>>        Hi! This is my first submission to Mono.
>>                The attached patch replaces the unmanaged version of the
>>        String.InternalSplit() method with a managed
>>        implementation. This is a direct port from the existing C code
>>        to C#. I tested this against the 2.0 and 1.1 profiles and there
>>        were no regressions. This patch is contributed under the X11
>>        license.
>>                I hope it can be incorporated into Mono.
>>                Phil
>>                BTW. This is the first patch submission from the MOSA
>> Project team.
>>
>>        _______________________________________________
>>        Mono-devel-list mailing list
>>        Mono-devel-list at lists.ximian.com
>>        <mailto:Mono-devel-list at lists.ximian.com>
>>        http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>>
>>
>>    --    Rafael "Monoman" Teixeira
>>    ---------------------------------------
>>    "To be creative means to be in love with life. You can be creative
>>    only if you love life enough that you want to enhance its beauty,
>>    you want to bring a little more music to it, a little more poetry to
>>    it, a little more dance to it."
>>    Osho
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090511/06cdf467/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StringSplit.png
Type: image/png
Size: 10500 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090511/06cdf467/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test.cs
Type: application/octet-stream
Size: 2397 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090511/06cdf467/attachment-0001.obj 


More information about the Mono-devel-list mailing list