[Mono-bugs] [Bug 78642][Wis] New - Bad performance of Mono (JIT-compiler)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jun 14 07:10:48 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-14 07:10:48.000000000 -0400
+++ shadow/78642.tmp.4104	2006-06-14 07:10:48.000000000 -0400
@@ -0,0 +1,146 @@
+Bug#: 78642
+Product: Mono: Runtime
+Version: 1.0
+OS: Red Hat 9.0
+OS Details: Linux skif 2.4.27 #1 SMP Thu Apr 14 15:25:11 MSD 2005 i686 athlon i386 GNU/Linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: Yury at serdyuk.botik.ru               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Bad performance of Mono (JIT-compiler)
+
+Description of Problem: 
+Very bad performance of Mono (JIT-compiler) on
+loops with simple bit/byte arithmetic.
+
+
+Steps to reproduce the problem:
+
+Test Application
+---------------------------
+
+using System;
+public class PerformanceTest   {
+ public static void Main ( String[] args )   {
+ 
+  byte[]  array;
+  int     i, j, k;
+  
+  DateTime  dtime1, dtime2;
+  //*******************************************//
+  array = new byte [ 10000 ];
+     
+  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++ )
+    k = array [ i / 8 ] & (byte) 1 << ( 7 - j % 8 );
+       
+  dtime2 = DateTime.Now;
+  Console.WriteLine ( "Elapsed time =" + dtime2.Subtract ( dtime1
+).TotalSeconds );
+ }
+}
+
+1. >mcs PerformanceTest.cs
+2. >mono PerformanceTest.exe
+
+Actual Results:
+
+1) Windows 2000 SP 4 , AMD Athlon XP 2500+, 256 Mb RAM,
+   .NET Framework 2.0
+
+E:\Palm>csc 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.
+
+E:\Palm>PerformanceTest
+Elapsed time =0,28125
+
+2) Linux, AMD Athlon(TM) MP 2000+ , 1 Gb RAM
+
+a) Mono 1.1.13.8
+---------------------
+[serdyuk at skif Palm]$ mono PerformanceTest.exe
+Elapsed time =5.663394
+[serdyuk at skif Palm]$ mono -V
+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
+[serdyuk at skif Palm]$
+
+b) Mono 1.1.9
+--------------------------------
+[serdyuk at skif serdyuk]$ mono -V
+Mono JIT compiler version 1.1.9, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+        TLS:           __thread
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV      : normal
+        Globalization: normal
+[serdyuk at skif serdyuk]$ mcs --about
+The Mono C# compiler is (C) 2001-2005, Novell, Inc.
+
+The compiler source code is released under the terms of the GNU GPL
+
+For more information on Mono, visit the project Web site
+   http://www.go-mono.com
+
+The compiler was written by Miguel de Icaza, Ravi Pratap, Martin Baulig,
+Marek Safar, Raja R Harinath
+[serdyuk at skif Palm]$ mcs PerformanceTest.cs
+PerformanceTest.cs(8,17): warning CS0168: The variable `k' is declared but
+never used
+Compilation succeeded - 1 warning(s)
+[serdyuk at skif Palm]$ mono PerformanceTest.exe
+Elapsed time =5.662774
+
+c) Mono 1.1.8
+------------------------
+[serdyuk at skif Palm]$ mono -V
+Mono JIT compiler version 1.1.8, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+        TLS:           __thread
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV      : normal
+        Globalization: normal
+[serdyuk at skif Palm]$ mcs --about
+The Mono C# compiler is (C) 2001, 2002, 2003 Ximian, Inc.
+
+The compiler source code is released under the terms of the GNU GPL
+
+For more information on Mono, visit the project Web site
+   http://www.go-mono.com
+
+The compiler was written by Miguel de Icaza, Ravi Pratap, Martin Baulig,
+Marek Safar, Raja R Harinath
+[serdyuk at skif Palm]$ which mcs
+~/m-1.1.8/bin/mcs
+[serdyuk at skif Palm]$ mcs PerformanceTest.cs
+PerformanceTest.cs(8) warning CS0168: The variable 'k' is declared but
+never used
+Compilation succeeded - 1 warning(s)
+[serdyuk at skif Palm]$ mono PerformanceTest.exe
+Elapsed time =5.839955
+[serdyuk at skif Palm]$ mono PerformanceTest.exe
+Elapsed time =5.841952
+
+So Micosoft .NET outperforms Mono approximately 
+(considering different processors) in 15 times !
+
+
+How often does this happen? 
+Always


More information about the mono-bugs mailing list