[Mono-bugs] [Bug 535425] New: Slow performance of <string>.Contains(), <string>.BeginsWith etc. Compared to MS'.NET runtime
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Aug 29 01:26:40 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=535425
Summary: Slow performance of <string>.Contains(),
<string>.BeginsWith etc. Compared to MS'.NET runtime
Classification: Mono
Product: Mono: Runtime
Version: 2.4.x
Platform: x86
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: arenvillanueva at yomogi-soft.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=315839)
--> (http://bugzilla.novell.com/attachment.cgi?id=315839)
Edict dictionary File
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13)
Gecko/2009080315 Linux Mint/7 (Gloria) Firefox/3.0.13
The following code:
===============================================
using System;
namespace Hmm
{
class MainClass
{
public static void Main (string[] args)
{
String[] Dict = System.IO.File.ReadAllLines("edict",
System.Text.Encoding.GetEncoding(51932));
DateTime startTime = DateTime.Now;
for (uint i = 0; i < 50; ++i)
{
foreach (String temp in Dict)
{
if (temp.Contains("today"))
{
Console.WriteLine(temp);
}
}
}
TimeSpan duration = DateTime.Now - startTime;
Console.WriteLine(duration.Seconds.ToString());
}
}
}
======================================================
On MS.NET framework, execution time is 2 seconds, with the application
reporting 2 seconds.
On mono framework, execution time is approximately 1 minute 20 seconds with the
application reporting 20 seconds.
the edict file is attached to this bug report.
Reproducible: Always
Steps to Reproduce:
1. compile program
2. run on ms.net framework
3. run on mono framework
Actual Results:
On MS.NET framework, execution time is 2 seconds, with the application
reporting 2 seconds.
On mono framework, execution time is approximately 1 minute 20 seconds with the
application reporting 20 seconds.
Expected Results:
I expected the execution times to be similar on both frameworks, not orders of
magnitudes different.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list