X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fbenchmark%2Flife.cs;h=a154fb1c694e74a2d7bfd05e6cc602409ae1b087;hb=79dfbe5192a221d52eda48ad977583ba4bc16a40;hp=a0c8d5b0be80f0827e3127bdadc3aa393f57eabe;hpb=1c14f1ee6d701510c15499d71fc2b324151a8629;p=mono.git diff --git a/mono/benchmark/life.cs b/mono/benchmark/life.cs index a0c8d5b0be8..a154fb1c694 100644 --- a/mono/benchmark/life.cs +++ b/mono/benchmark/life.cs @@ -1,15 +1,15 @@ -// created on 03/03/2002 at 15:12 -using System; - -class App { - static String s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15; - static int[] offsets = {-16, -15, -14, -1, 1, 14, 15, 16}; - public static int Main(String[] args) { - int i2 = 500; - int i0; - double n2; - DateTime start, end; - start = DateTime.Now; +// created on 03/03/2002 at 15:12 +using System; + +class App { + static String s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15; + static int[] offsets = {-16, -15, -14, -1, 1, 14, 15, 16}; + public static int Main(String[] args) { + int i2 = 500; + int i0; + double n2; + DateTime start, end; + start = DateTime.Now; s0 = " "; s1 = " "; s2 = " "; @@ -28,7 +28,7 @@ class App { s15 =""; s15 = s0+s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14; dump(); - i0 =0; + i0 =0; while (i0++ < i2) { generate(); dump(); @@ -38,7 +38,7 @@ class App { Console.WriteLine("{0} generations in {1} milliseconds, {2} gen/sec.", i2, (int)n2, (int)(i2/(n2/1000))); return 0; -} +} static void generate() { int i0, i1, i2, i3; i0 = s15.Length; @@ -50,7 +50,7 @@ static void generate() { i3 = (offset + i0 + i1) % i0; if (s15.Substring(i3, 1) == "*") i2++; - } + } if (s15.Substring(i1, 1) == "*") { if (i2 < 2 || i2 > 3) { s1 += " "; @@ -71,4 +71,4 @@ static void dump() { ; } } - +