X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=demos%2Fperformance%2Ftest-performance2.sh;h=73b0a7f5f6f63bac8ba1b0f0d28d9d9157633c5a;hb=2814fb597e395b54b421123dd51fff55866f1faf;hp=b99b9b11959e54f5de8df0671207d911a469ef18;hpb=bce4b05df61258229122aa6a77aa67ac96462393;p=svn%2FCll1h%2F.git diff --git a/demos/performance/test-performance2.sh b/demos/performance/test-performance2.sh index b99b9b1..73b0a7f 100755 --- a/demos/performance/test-performance2.sh +++ b/demos/performance/test-performance2.sh @@ -1,29 +1,32 @@ #!/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 print2.rb -echo -n "Running..." -time ./print2.rb > /dev/null -echo +if [ "$1" == "all" ] +then + echo "------------------------------------------------------------- Ruby" + cat print2.rb + echo -n "Running..." + time ./print2.rb > /dev/null + echo -echo "--------------------------------------------------- Python - range" -cat print2.py -echo -n "Running..." -time ./print2.py > /dev/null -echo + echo "--------------------------------------------------- Python - range" + cat print2.py + echo -n "Running..." + time ./print2.py > /dev/null + echo -echo "-------------------------------------------------- Python - xrange" -cat xrange2.py -echo -n "Running..." -time ./xrange2.py > /dev/null -echo + echo "-------------------------------------------------- Python - xrange" + cat xrange2.py + echo -n "Running..." + time ./xrange2.py > /dev/null + echo -echo "------------------------------------------------------------ PHP 5" -cat echo2.php -echo -n "Running..." -time -f "%E total, %U user, %S sys" ./echo2.php > /dev/null -echo + echo "------------------------------------------------------------ PHP 5" + cat echo2.php + echo -n "Running..." + time ./echo2.php > /dev/null + echo +fi echo "-------------------------------------------------- C - gcc - write" cat write2.c @@ -44,41 +47,41 @@ echo echo "------------------------------------------------------------- Perl" cat print2.pl echo -n "Running..." -time -f "%E total, %U user, %S sys" ./print2.pl > /dev/null +time ./print2.pl > /dev/null +echo + +echo "------------------------------------------------- C - tcc - printf" +cat printf2.c +echo -n "Compiling..." +time tcc printf2.c -o printf2 +echo -n "Running..." +time ./printf2 > /dev/null +echo + +echo "------------------------------------------------- C - tcc - fwrite" +cat fwrite2.c +echo -n "Compiling..." +time tcc fwrite2.c -o fwrite2 +echo -n "Running..." +time ./fwrite2 > /dev/null +echo + +echo "----------------------------------------------- C<<1 - tcc - print" +cat cll1-print2.c +echo -n "Compiling..." +time tcc cll1-print2.c -o cll1-print2 +echo -n "Running..." +time ./cll1-print2 > /dev/null +echo + +echo "-------------------------------------------------- C - tcc - fputs" +cat fputs2.c +echo -n "Compiling..." +time tcc fputs2.c -o fputs2 +echo -n "Running..." +time ./fputs2 > /dev/null echo -#echo "------------------------------------------------- C - tcc - printf" -#cat printf2.c -#echo -n "Compiling..." -#time tcc -O2 printf2.c -o printf2 -#echo -n "Running..." -#time ./printf2 > /dev/null -#echo -# -#echo "------------------------------------------------- C - tcc - fwrite" -#cat fwrite2.c -#echo -n "Compiling..." -#time tcc -O2 fwrite2.c -o fwrite2 -#echo -n "Running..." -#time ./fwrite2 > /dev/null -#echo -# -#echo "----------------------------------------------- C<<1 - tcc - print" -#cat cll1-print2.c -#echo -n "Compiling..." -#time tcc -O2 cll1-print2.c -o cll1-print2 -#echo -n "Running..." -#time ./cll1-print2 > /dev/null -#echo -# -#echo "-------------------------------------------------- C - tcc - fputs" -#cat fputs2.c -#echo -n "Compiling..." -#time tcc -O2 fputs2.c -o fputs2 -#echo -n "Running..." -#time ./fputs2 > /dev/null -#echo -# echo "------------------------------------------------- C - gcc - printf" cat printf2.c echo -n "Compiling..."