[Mono-bugs] [Bug 78642][Wis] Changed - Bad performance of Mono
(JIT-compiler)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Jun 16 06:54:50 EDT 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by yury at serdyuk.botik.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=78642
--- shadow/78642 2006-06-15 13:59:03.000000000 -0400
+++ shadow/78642.tmp.29494 2006-06-16 06:54:50.000000000 -0400
@@ -218,6 +218,124 @@
------- Additional Comments From vargaz at gmail.com 2006-06-15 13:59 -------
Hmm, it seems those opts were disabled in 1.1.15 too... They are
definitely there in HEAD, and hopefully the next release.
+
+------- Additional Comments From Yury at serdyuk.botik.ru 2006-06-16 06:54 -------
+More correct comparisons
+(tests were performed on the same machine):
+Celeron CPU 1.70GHz, 512 MB of RAM
+
+Microsoft Windows XP Professional Version 2002 Service Pack 2
+--------------------------------------------------------------
+D:\tmp>"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe"
+PerformanceTest.cs
+Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
+for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
+Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
+
+
+D:\tmp>PerformanceTest.exe
+Elapsed time =0.4306192
+
+D:\tmp>PerformanceTest.exe
+Elapsed time =0.3705328
+
+D:\tmp>PerformanceTest.exe
+Elapsed time =0.3805472
+
+D:\tmp>PerformanceTest.exe
+Elapsed time =0.3705328
+
+D:\tmp>PerformanceTest.exe
+Elapsed time =0.3705328
+
+Linux zag 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386
+-------------------------------------------------------------------
+Mono JIT compiler version 1.1.13.8, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+ TLS: __thread
+ GC: Included Boehm (with typed GC)
+ SIGSEGV : normal
+[zag at zag Serdyuk]$ mcs PerformanceTest.cs
+PerformanceTest.cs(8,17): warning CS0168: The variable `k' is declared
+but never used
+Compilation succeeded - 1 warning(s)
+[zag at zag Serdyuk]$ mono PerformanceTest.exe
+Elapsed time =7.819415
+[zag at zag Serdyuk]$ mono PerformanceTest.exe
+Elapsed time =7.817314
+
+Then, more reasonable example
+(and more important for me).
+Test application (PerformanceTest2.cs):
+
+using System;
+public class PerformanceTest2 {
+ public static void Main ( String[] args ) {
+ int N = 7000;
+
+ byte[] array;
+ byte[,] result;
+
+ int i, j;
+
+ DateTime dtime1, dtime2;
+ //*******************************************//
+
+ array = new byte [ N ];
+ result = new byte [ N, N ];
+
+ for ( i = 0; i < array.Length; i++)
+ array [ i ] = 170;
+
+ dtime1 = DateTime.Now;
+
+ for ( i = 0; i < array.Length; i++ )
+ for ( j = 0; j < array.Length; j++ )
+ result [ i, j ] = (byte) ( array [ i / 8 ] & (byte) 1 << ( 7 - j %
+8 ) );
+
+ dtime2 = DateTime.Now;
+ Console.WriteLine ( "Elapsed time =" + dtime2.Subtract ( dtime1
+).TotalSeconds );
+
+ }
+
+}
+
+Microsoft Windows XP Professional Version 2002 Service Pack 2
+--------------------------------------------------------------
+D:\tmp>"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe"
+PerformanceTest2.cs
+Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
+for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
+Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
+
+D:\tmp>PerformanceTest2.exe
+Elapsed time =1.3920016
+
+D:\tmp>PerformanceTest2.exe
+Elapsed time =1.1816992
+
+D:\tmp>PerformanceTest2.exe
+Elapsed time =1.1816992
+
+D:\tmp>PerformanceTest2.exe
+Elapsed time =1.1716848
+
+D:\tmp>PerformanceTest2.exe
+Elapsed time =1.1716848
+
+Linux zag 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386
+-------------------------------------------------------------------
+[zag at zag Serdyuk]$ mono PerformanceTest2.exe
+Elapsed time =3.154643
+[zag at zag Serdyuk]$ mono PerformanceTest2.exe
+Elapsed time =3.153726
+[zag at zag Serdyuk]$ mono PerformanceTest2.exe
+Elapsed time =3.157437
+
+That is, MS .NET outperforms Mono in more than 2,5 times
+on this example.
More information about the mono-bugs
mailing list