[Mono-bugs] [Bug 435398] New: Peformance of int switch
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Oct 14 16:19:38 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=435398
Summary: Peformance of int switch
Product: Mono: Runtime
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: JIT
AssignedTo: lupus at novell.com
ReportedBy: msafar at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
compile & run
using System;
using System.Diagnostics;
class C
{
public static int Main ()
{
int r = 0;
Stopwatch sw = new Stopwatch ();
sw.Start ();
for (int i = 0; i < 1000000000; ++i) {
switch (i % 64) {
case 0: case 1: case 2: case 3: case 4:
case 5: case 6: case 7: case 8: case 9:
case 10: case 11: case 12: case 13: case 14:
r = 0;
break;
}
}
sw.Stop ();
Console.WriteLine (sw.Elapsed.ToString ());
return r;
}
}
Executed 3 times on same machine (Intel Dual Core)
NET
00:00:02.7247437
00:00:02.6705713
00:00:02.8542788
Mono
00:00:03.5890848
00:00:03.4114453
00:00:03.7204546
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list