commit micro benchmarks for later experiments
authorjjenista <jjenista>
Sat, 31 Jul 2010 17:13:03 +0000 (17:13 +0000)
committerjjenista <jjenista>
Sat, 31 Jul 2010 17:13:03 +0000 (17:13 +0000)
Robust/src/Benchmarks/oooJava/micro/makefile
Robust/src/Benchmarks/oooJava/micro/test.java
Robust/src/Benchmarks/oooJava/micro2/makefile [new file with mode: 0644]
Robust/src/Benchmarks/oooJava/micro2/test.java [new file with mode: 0644]
Robust/src/Benchmarks/oooJava/micro3/makefile [new file with mode: 0644]
Robust/src/Benchmarks/oooJava/micro3/test.java [new file with mode: 0644]

index da6d1e5b1b98946dacecc777447485a23c02b22f..b6b2f6cfc8f94a081d26ddc1fc483d3e068eefc1 100644 (file)
@@ -5,8 +5,8 @@ SOURCE_FILES=test.java
 
 BUILDSCRIPT=../../../buildscript
 
-USEOOO= -ooojava 8 2  -ooodebug  
-BSFLAGS= -32bit -nooptimize -mainclass test -debug -garbagestats -joptimize
+USEOOO= -ooojava 1 2  -ooodebug  
+BSFLAGS= -64bit -mainclass test -debug -garbagestats -joptimize -optimize
 DISJOINT= -disjoint -disjoint-k 1 -enable-assertions 
 
 default:
index 123c87332151fa8b3476870c4294447c86f9d5b1..b8803cd5d9d6bf91c902fa89c599dd4f6bbfa630 100644 (file)
@@ -2,18 +2,32 @@ public class test {
 
        public static void main(String argv[]) {
 
-           int x=0;
-           int count=500000;
+           long x=0;
+           long count=500000;
 
            if(argv.length>0){
                count=count * Integer.parseInt(argv[0]);
            }
-           for(int i=0;i<count;i++){
+            
+            long s=System.currentTimeMillis();
+
+           for(long i=0;i<count;i++){
                rblock rchild{
                    x++;
+                    for(int j=0;j<1000;j++) {
+                      x++;x--;
+                    }
                }
            }
 
+            long e1=System.currentTimeMillis();
+            System.out.println( "x="+x );
+            long e2=System.currentTimeMillis();
+
+            double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
+            double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
+            System.out.println( "dt1="+dt1+"s" );
+            System.out.println( "dt2="+dt2+"s" );
        }
 
 }
diff --git a/Robust/src/Benchmarks/oooJava/micro2/makefile b/Robust/src/Benchmarks/oooJava/micro2/makefile
new file mode 100644 (file)
index 0000000..5771175
--- /dev/null
@@ -0,0 +1,30 @@
+#raytracer
+PROGRAM=test
+
+SOURCE_FILES=test.java
+
+BUILDSCRIPT=../../../buildscript
+
+USEOOO= -ooojava 1 2  -ooodebug  
+BSFLAGS= -64bit -optimize -mainclass test -debug -garbagestats -joptimize
+DISJOINT= -disjoint -disjoint-k 1 -enable-assertions 
+
+default:
+       $(BUILDSCRIPT) -nojava $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p $(SOURCE_FILES) -builddir par
+
+single:
+       $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES) 
+
+ooo:
+       $(BUILDSCRIPT) $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES) 
+
+clean:
+       rm -f  $(PROGRAM)p.bin $(PROGRAM)s.bin
+       rm -fr par sing
+       rm -f  *~
+       rm -f  *.dot
+       rm -f  *.png
+       rm -f  *.txt
+       rm -f  aliases.txt
+       rm -f  mlpReport*txt
+       rm -f  results*txt
diff --git a/Robust/src/Benchmarks/oooJava/micro2/test.java b/Robust/src/Benchmarks/oooJava/micro2/test.java
new file mode 100644 (file)
index 0000000..6108663
--- /dev/null
@@ -0,0 +1,30 @@
+public class test {
+
+       public static void main(String argv[]) {
+
+           long x=0;
+           long count=500000;
+
+           if(argv.length>0){
+               count=count * Integer.parseInt(argv[0]);
+           }
+
+            long s=System.currentTimeMillis();
+
+           for(long i=0;i<count;i++){
+               rblock rchild{
+               }
+                x++;
+           }
+
+            long e1=System.currentTimeMillis();
+            System.out.println( "x="+x );
+            long e2=System.currentTimeMillis();
+
+            double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
+            double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
+            System.out.println( "dt1="+dt1+"s" );
+            System.out.println( "dt2="+dt2+"s" );
+       }
+
+}
diff --git a/Robust/src/Benchmarks/oooJava/micro3/makefile b/Robust/src/Benchmarks/oooJava/micro3/makefile
new file mode 100644 (file)
index 0000000..5771175
--- /dev/null
@@ -0,0 +1,30 @@
+#raytracer
+PROGRAM=test
+
+SOURCE_FILES=test.java
+
+BUILDSCRIPT=../../../buildscript
+
+USEOOO= -ooojava 1 2  -ooodebug  
+BSFLAGS= -64bit -optimize -mainclass test -debug -garbagestats -joptimize
+DISJOINT= -disjoint -disjoint-k 1 -enable-assertions 
+
+default:
+       $(BUILDSCRIPT) -nojava $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p $(SOURCE_FILES) -builddir par
+
+single:
+       $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES) 
+
+ooo:
+       $(BUILDSCRIPT) $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES) 
+
+clean:
+       rm -f  $(PROGRAM)p.bin $(PROGRAM)s.bin
+       rm -fr par sing
+       rm -f  *~
+       rm -f  *.dot
+       rm -f  *.png
+       rm -f  *.txt
+       rm -f  aliases.txt
+       rm -f  mlpReport*txt
+       rm -f  results*txt
diff --git a/Robust/src/Benchmarks/oooJava/micro3/test.java b/Robust/src/Benchmarks/oooJava/micro3/test.java
new file mode 100644 (file)
index 0000000..731a267
--- /dev/null
@@ -0,0 +1,29 @@
+public class test {
+
+       public static void main(String argv[]) {
+
+           long x=0;
+           long count=500000;
+
+           if(argv.length>0){
+               count=count * Integer.parseInt(argv[0]);
+           }
+
+            long s=System.currentTimeMillis();
+
+           for(long i=0;i<count;i++){
+               rblock rchild{
+               }
+           }
+
+            long e1=System.currentTimeMillis();
+            System.out.println( "x="+x );
+            long e2=System.currentTimeMillis();
+
+            double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
+            double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
+            System.out.println( "dt1="+dt1+"s" );
+            System.out.println( "dt2="+dt2+"s" );
+       }
+
+}