*** empty log message ***
authorDietmar Maurer <dietmar@mono-cvs.ximian.com>
Wed, 26 Mar 2003 15:24:53 +0000 (15:24 -0000)
committerDietmar Maurer <dietmar@mono-cvs.ximian.com>
Wed, 26 Mar 2003 15:24:53 +0000 (15:24 -0000)
svn path=/trunk/mono/; revision=12849

mono/benchmark/Makefile.am
mono/benchmark/inline4.cs [new file with mode: 0755]

index 0d6edeff7f39cb98e833b3bac685c33528047eae..42bd94b4335d3f6e37512f31ee8c2a78ea2d32e3 100644 (file)
@@ -11,6 +11,7 @@ TESTSRC=                      \
        inline1.cs              \
        inline2.cs              \
        inline3.cs              \
+       inline4.cs              \
        muldiv.cs               \
        loops.cs                \
        initlocals.cs           \
diff --git a/mono/benchmark/inline4.cs b/mono/benchmark/inline4.cs
new file mode 100755 (executable)
index 0000000..0e595d9
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+
+public class Tests {
+
+       public static int test (int n) {
+               if ((n % 2) == 0)
+                       return 2;
+               else
+                       return 1;
+       }
+
+       public static int Main (string[] args) {
+               int repeat = 1;
+               int sum = 0;
+               
+               if (args.Length == 1)
+                       repeat = Convert.ToInt32 (args [0]);
+               
+               Console.WriteLine ("Repeat = " + repeat);
+
+               for (int i = 0; i < repeat; i++)
+                       for (int j = 0; j < 500000000; j++)
+                               sum += test (12345);
+               
+               return 0;
+       }
+}
+
+