Tiny C test added
[svn/Cll1h/.git] / demos / performance / test-performance.sh
index 5da7b513a9f16a6bd04819f84cfdcdea07d1afb6..e2de3e5af668e906853aab711dfba6793b946bf1 100755 (executable)
@@ -1,25 +1,28 @@
 #!/bin/bash
 echo `grep "model name"  /proc/cpuinfo |cut -f 2 -d :` `grep "cpu MHz"  /proc/cpuinfo |cut -f 2 -d :` Mhz  ` grep "bogomips"  /proc/cpuinfo |cut -f 2 -d :` bogomips 
 
-echo "------------------------------------------------------------- Ruby"
-cat print.rb
-echo -n "Running..."
-time ./print.rb > /dev/null
+if [ "$1" == "all" ]
+then
+ echo "------------------------------------------------------------- Ruby"
+ cat print.rb
+ echo -n "Running..."
+ time ./print.rb > /dev/null
 
-echo "--------------------------------------------------- Python - range"
-cat print.py
-echo -n "Running..."
-time ./print.py > /dev/null
+ echo "--------------------------------------------------- Python - range"
+ cat print.py
+ echo -n "Running..."
+ time ./print.py > /dev/null
 
-echo "-------------------------------------------------- Python - xrange"
-cat xrange.py
-echo -n "Running..."
-time ./xrange.py > /dev/null
+ echo "-------------------------------------------------- Python - xrange"
+ cat xrange.py
+ echo -n "Running..."
+ time ./xrange.py > /dev/null
 
-echo "------------------------------------------------------------ PHP 5"
-cat echo.php
-echo -n "Running..."
-time ./echo.php > /dev/null
+ echo "------------------------------------------------------------ PHP 5"
+ cat echo.php
+ echo -n "Running..."
+ time ./echo.php > /dev/null
+fi
 
 echo "-------------------------------------------------- C - gcc - write"
 cat write.c
@@ -47,43 +50,49 @@ time g++ -O2 cout.cpp -o cout
 echo -n "Running..."
 time ./cout > /dev/null
 
-#echo "----------------------------------------------- C<<1 - tcc - print"
-#cat cll1-print.c
-#echo -n "Compiling..."
-#time tcc -O2 cll1-print.c -o cll1-print
-#echo -n "Running..."
-#time ./cll1-print > /dev/null
-#
-#echo "------------------------------------------------- C - tcc - printf"
-#cat printf.c
-#echo -n "Compiling..."
-#time tcc -O2 printf.c -o printf
-#echo -n "Running..."
-#time ./printf > /dev/null
-#
-#echo "--------------------------------------------------- C - tcc - puts"
-#cat puts.c
-#echo -n "Compiling..."
-#time tcc -O2 puts.c -o puts
-#echo -n "Running..."
-#time ./puts > /dev/null
-#
-#echo "-------------------------------------------------- C - tcc - fputs"
-#cat fputs.c
-#echo -n "Compiling..."
-#time tcc -O2 fputs.c -o fputs
-#echo -n "Running..."
-#time ./fputs > /dev/null
-#
-#echo "------------------------------------------------- C - tcc - fwrite"
-#cat fwrite.c
-#echo -n "Compiling..."
-#time tcc -O2 fwrite.c -o fwrite
-#echo -n "Running..."
-#time ./fwrite > /dev/null
-#
-
-echo "-----------------------------------------------= C<<1 - gcc - echo"
+echo "----------------------------------------------- C<<1 - tcc - print"
+cat cll1-print.c
+echo -n "Compiling..."
+time tcc cll1-print.c -o cll1-print
+echo -n "Running..."
+time ./cll1-print > /dev/null
+
+echo "------------------------------------------------- C - tcc - printf"
+cat printf.c
+echo -n "Compiling..."
+time tcc printf.c -o printf
+echo -n "Running..."
+time ./printf > /dev/null
+
+echo "------------------------------------------------ C<<1 - tcc - echo"
+cat cll1-echo.c
+echo -n "Compiling..."
+time tcc cll1-echo.c -o cll1-echo
+echo -n "Running..."
+time ./puts > /dev/null
+
+echo "--------------------------------------------------- C - tcc - puts"
+cat puts.c
+echo -n "Compiling..."
+time tcc puts.c -o puts
+echo -n "Running..."
+time ./puts > /dev/null
+
+echo "------------------------------------------------- C - tcc - fwrite"
+cat fwrite.c
+echo -n "Compiling..."
+time tcc fwrite.c -o fwrite
+echo -n "Running..."
+time ./fwrite > /dev/null
+
+echo "-------------------------------------------------- C - tcc - fputs"
+cat fputs.c
+echo -n "Compiling..."
+time tcc fputs.c -o fputs
+echo -n "Running..."
+time ./fputs > /dev/null
+
+echo "------------------------------------------------ C<<1 - gcc - echo"
 cat cll1-echo.c
 echo -n "Compiling..."
 time gcc -O2 cll1-echo.c -o cll1-echo
This page took 0.15872 seconds and 4 git commands to generate.