X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=demos%2Fperformance%2Ftest-performance.sh;h=5da7b513a9f16a6bd04819f84cfdcdea07d1afb6;hb=bce4b05df61258229122aa6a77aa67ac96462393;hp=45b5675ff75a0cfdf3aaca32e1422a3b5e363d81;hpb=cc0de701b6a1dd6d8c01352888c1be54676cd8e2;p=svn%2FCll1h%2F.git diff --git a/demos/performance/test-performance.sh b/demos/performance/test-performance.sh index 45b5675..5da7b51 100755 --- a/demos/performance/test-performance.sh +++ b/demos/performance/test-performance.sh @@ -1,39 +1,120 @@ -#!/bin/sh +#!/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 + +echo "--------------------------------------------------- Python - range" cat print.py -echo "Running..." +echo -n "Running..." time ./print.py > /dev/null -cat cout.cpp -echo "Compiling..." -time g++ -O4 cout.cpp -o cout -echo "Running..." -time ./cout > /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 "-------------------------------------------------- C - gcc - write" +cat write.c +echo -n "Compiling..." +time gcc -O2 write.c -o write +echo -n "Running..." +time ./write > /dev/null + +echo "------------------------------------------------------------- Perl" cat print.pl -echo "Running..." +echo -n "Running..." time ./print.pl > /dev/null +echo "----------------------------------------------- C<<1 - gcc - print" cat cll1-print.c -echo "Compiling..." -time gcc -O4 cll1-print.c -o cll1-print -echo "Running..." +echo -n "Compiling..." +time gcc -O2 cll1-print.c -o cll1-print +echo -n "Running..." time ./cll1-print > /dev/null +echo "---------------------------------------------- C - g++ - std::cout" +cat cout.cpp +echo -n "Compiling..." +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" +cat cll1-echo.c +echo -n "Compiling..." +time gcc -O2 cll1-echo.c -o cll1-echo +echo -n "Running..." +time ./cll1-echo > /dev/null + +echo "------------------------------------------------- C - gcc - printf" cat printf.c -echo "Compiling..." -time gcc -O4 printf.c -o printf -echo "Running..." +echo -n "Compiling..." +time gcc -O2 printf.c -o printf +echo -n "Running..." time ./printf > /dev/null +echo "--------------------------------------------------- C - gcc - puts" cat puts.c -echo "Compiling..." -time gcc -O4 puts.c -o puts -echo "Running..." +echo -n "Compiling..." +time gcc -O2 puts.c -o puts +echo -n "Running..." time ./puts > /dev/null +echo "------------------------------------------------- C - gcc - fwrite" +cat fwrite.c +echo -n "Compiling..." +time gcc -O2 fwrite.c -o fwrite +echo -n "Running..." +time ./fwrite > /dev/null + +echo "-------------------------------------------------- C - gcc - fputs" cat fputs.c -echo "Compiling..." -time gcc -O4 fputs.c -o fputs -echo "Running..." +echo -n "Compiling..." +time gcc -O2 fputs.c -o fputs +echo -n "Running..." time ./fputs > /dev/null +