[Mono-list] Performance

Simon Ask Ulsnes simon@ulsnes.dk
Tue, 14 Jan 2003 22:51:16 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_000F_01C2BC1F.720C9330
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0010_01C2BC1F.720C9330"


------=_NextPart_001_0010_01C2BC1F.720C9330
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

You all probably know this already, but I thought it was quite funny to =
write a tiny performance test program to see if there was any difference =
between Mono and Microsoft .NET Framework 1.0.3705. There was:

Red Hat Linux 8.0 running Mono 0.18: Approx. 7.2 seconds
Windows XP running MS .NET Framework 1.0.3705: Approx 5.02 seconds

My program basically counts 1 million and prints out how long it took.

The test was performed on my computer, which is an Athlon 650 Mhz.

Many of you will probably consider this information irrelevant, but I =
think it is a little interesting.
I don't know whether the difference of about 2 seconds is because one =
was on Linux and the other on Windows or because one was with Mono and =
the other was on .NET Framework.

Source attached...

// Simon
// This sentence no verb.
------=_NextPart_001_0010_01C2BC1F.720C9330
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DTahoma size=3D2>You all probably know this already, =
but I thought=20
it was quite funny to write a tiny performance test program to see if =
there was=20
any difference between Mono and Microsoft .NET Framework 1.0.3705. There =

was:</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>Red Hat Linux 8.0 running Mono 0.18: =
</FONT><FONT=20
face=3DTahoma size=3D2>Approx. 7.2 seconds</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>Windows XP running MS .NET Framework =
1.0.3705:=20
</FONT><FONT face=3DTahoma size=3D2>Approx 5.02 seconds</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>My program basically counts 1 million =
and prints=20
out how long it took.</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>The test was performed on my computer, =
which is an=20
</FONT><FONT face=3DTahoma size=3D2>Athlon 650 Mhz.</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT><FONT face=3DTahoma=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>Many of you will&nbsp;probably =
consider this=20
information irrelevant, but I think it is a little =
interesting.</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>I don't know whether the difference of =
about 2=20
seconds is because one was on Linux and the other on Windows or because =
one was=20
with Mono and the other was on .NET Framework.</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>Source attached...</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>// Simon</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>// This sentence no=20
verb.</FONT></DIV></BODY></HTML>

------=_NextPart_001_0010_01C2BC1F.720C9330--

------=_NextPart_000_000F_01C2BC1F.720C9330
Content-Type: text/plain;
	name="perf.cs"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="perf.cs"

using System;=0A=
=0A=
public class PerformanceTester=0A=
{=0A=
	public static void Main(string[] args)=0A=
	{=0A=
		DateTime dstart =3D DateTime.Now;=0A=
		int i =3D 0;=0A=
		while (i<1000000000)=0A=
		{=0A=
			i++;=0A=
		}=0A=
		Console.WriteLine("Time taken: =
"+DateTime.Now.Subtract(dstart).ToString());=0A=
	}=0A=
}=0A=

------=_NextPart_000_000F_01C2BC1F.720C9330--