another test
authorDietmar Maurer <dietmar@mono-cvs.ximian.com>
Mon, 14 Apr 2003 12:49:05 +0000 (12:49 -0000)
committerDietmar Maurer <dietmar@mono-cvs.ximian.com>
Mon, 14 Apr 2003 12:49:05 +0000 (12:49 -0000)
svn path=/trunk/mono/; revision=13587

mono/benchmark/string1.cs [new file with mode: 0755]

diff --git a/mono/benchmark/string1.cs b/mono/benchmark/string1.cs
new file mode 100755 (executable)
index 0000000..a185d5f
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+
+public class Tests {
+
+       public static int Main (string[] args) {
+               int res, repeat = 1;
+               string ts1 = "abcdefghijklmnopqrstuvwxyz";
+               
+               if (args.Length == 1)
+                       repeat = Convert.ToInt32 (args [0]);
+               
+               Console.WriteLine ("Repeat = " + repeat);
+
+               int len = ts1.Length;
+                       
+               for (int i = 0; i < (repeat * 50); i++) {
+                       for (int j = 0; j < 100000; j++) {
+                               int k, h = 0;
+
+                               for (k = 0; k < len; ++k)
+                                       h += ts1 [k];
+
+                       }
+               }
+               
+               return 0;
+       }
+}
+
+