X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=demos%2Fperformance%2Ftest-performance2.sh;h=b545771603b3980c30ae6315500075e9da73075d;hb=06ab91f038972610338e77f4f488c7ef5c132e69;hp=a4006d2427f91e51744bb5b8e05129be085ce3ee;hpb=e1fbb836e8f710979f270ba8fdbc92a8e65f7348;p=svn%2FCll1h%2F.git diff --git a/demos/performance/test-performance2.sh b/demos/performance/test-performance2.sh index a4006d2..b545771 100755 --- a/demos/performance/test-performance2.sh +++ b/demos/performance/test-performance2.sh @@ -1,69 +1,111 @@ -#!/bin/sh +#!/bin/bash +echo "------------------------------------------------------------- Ruby" cat print2.rb echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./print2.rb > /dev/null +time ./print2.rb > /dev/null echo +echo "--------------------------------------------------- Python - range" cat print2.py echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./print2.py > /dev/null +time ./print2.py > /dev/null echo +echo "-------------------------------------------------- Python - xrange" cat xrange2.py echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./xrange2.py > /dev/null +time ./xrange2.py > /dev/null echo +echo "------------------------------------------------------------ PHP 5" cat echo2.php echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./echo2.php > /dev/null +time -f "%E total, %U user, %S sys" ./echo2.php > /dev/null echo +echo "-------------------------------------------------- C - gcc - write" cat write2.c echo -n "Compiling..." -time -f "%E total, %U user, %S sys, %F page faults" gcc -O2 write2.c -o write2 +time gcc -O2 write2.c -o write2 echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./write2 > /dev/null +time ./write2 > /dev/null echo +echo "---------------------------------------------- C - g++ - std::cout" cat cout2.cpp echo -n "Compiling..." -time -f "%E total, %U user, %S sys, %F page faults" g++ -O2 cout2.cpp -o cout2 +time g++ -O2 cout2.cpp -o cout2 echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./cout2 > /dev/null +time ./cout2 > /dev/null echo +echo "------------------------------------------------------------- Perl" cat print2.pl echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./print2.pl > /dev/null +time -f "%E total, %U user, %S sys" ./print2.pl > /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..." -time -f "%E total, %U user, %S sys, %F page faults" gcc -O2 printf2.c -o printf2 +time gcc -O2 printf2.c -o printf2 echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./printf2 > /dev/null +time ./printf2 > /dev/null echo - -cat cll1-print2.c +echo "------------------------------------------------- C - gcc - fwrite" +cat fwrite2.c echo -n "Compiling..." -time -f "%E total, %U user, %S sys, %F page faults" gcc -O2 cll1-print2.c -o cll1-print2 +time gcc -O2 fwrite2.c -o fwrite2 echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./cll1-print2 > /dev/null +time ./fwrite2 > /dev/null echo -cat fputs2.c +echo "----------------------------------------------- C<<1 - gcc - print" +cat cll1-print2.c echo -n "Compiling..." -time -f "%E total, %U user, %S sys, %F page faults" gcc -O2 fputs2.c -o fputs2 +time gcc -O2 cll1-print2.c -o cll1-print2 echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./fputs2 > /dev/null +time ./cll1-print2 > /dev/null echo -cat fwrite2.c +echo "-------------------------------------------------- C - gcc - fputs" +cat fputs2.c echo -n "Compiling..." -time -f "%E total, %U user, %S sys, %F page faults" gcc -O2 fwrite2.c -o fwrite2 +time gcc -O2 fputs2.c -o fputs2 echo -n "Running..." -time -f "%E total, %U user, %S sys, %F page faults" ./fwrite2 > /dev/null +time ./fputs2 > /dev/null echo