From: xchaos Date: Wed, 23 Jan 2008 15:39:47 +0000 (+0000) Subject: facelift, reordered results X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=283bc4971907f85920dde9f545b3eb8fd3884a79;p=svn%2FCll1h%2F.git facelift, reordered results git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@34 4bb87942-c103-4e5a-b51c-0ebff58f8515 --- diff --git a/demos/performance/test-performance.sh b/demos/performance/test-performance.sh index a31b74a..de10bad 100755 --- a/demos/performance/test-performance.sh +++ b/demos/performance/test-performance.sh @@ -1,51 +1,60 @@ #!/bin/sh cat print.rb -echo "Running..." -time ./print.rb > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./print.rb > /dev/null +echo cat print.py -echo "Running..." -time ./print.py > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./print.py > /dev/null +echo cat xrange.py -echo "Running..." -time ./xrange.py > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./xrange.py > /dev/null +echo cat echo.php -echo "Running..." -time ./echo.php > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./echo.php > /dev/null +echo cat print.pl -echo "Running..." -time ./print.pl > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./print.pl > /dev/null +echo cat cout.cpp -echo "Compiling..." -time g++ -O2 cout.cpp -o cout -echo "Running..." -time ./cout > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" g++ -O2 cout.cpp -o cout +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./cout > /dev/null +echo cat cll1-print.c -echo "Compiling..." -time gcc -O2 cll1-print.c -o cll1-print -echo "Running..." -time ./cll1-print > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" gcc -O2 cll1-print.c -o cll1-print +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./cll1-print > /dev/null +echo cat printf.c -echo "Compiling..." -time gcc -O2 printf.c -o printf -echo "Running..." -time ./printf > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" gcc -O2 printf.c -o printf +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./printf > /dev/null +echo cat puts.c -echo "Compiling..." -time gcc -O2 puts.c -o puts -echo "Running..." -time ./puts > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" gcc -O2 puts.c -o puts +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./puts > /dev/null +echo cat fputs.c -echo "Compiling..." -time gcc -O2 fputs.c -o fputs -echo "Running..." -time ./fputs > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" gcc -O2 fputs.c -o fputs +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./fputs > /dev/null diff --git a/demos/performance/test-performance2.sh b/demos/performance/test-performance2.sh index 1df237a..ded38de 100755 --- a/demos/performance/test-performance2.sh +++ b/demos/performance/test-performance2.sh @@ -1,45 +1,54 @@ #!/bin/sh cat print2.rb -echo "Running..." -time ./print2.rb > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./print2.rb > /dev/null +echo cat print2.py -echo "Running..." -time ./print2.py > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./print2.py > /dev/null +echo cat xrange2.py -echo "Running..." -time ./xrange2.py > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./xrange2.py > /dev/null +echo cat echo2.php -echo "Running..." -time ./echo2.php > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./echo2.php > /dev/null +echo cat cout2.cpp -echo "Compiling..." -time g++ -O2 cout2.cpp -o cout2 -echo "Running..." -time ./cout2 > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" g++ -O2 cout2.cpp -o cout2 +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./cout2 > /dev/null +echo cat print2.pl -echo "Running..." -time ./print2.pl > /dev/null - -cat cll1-print2.c -echo "Compiling..." -time gcc -O2 cll1-print2.c -o cll1-print2 -echo "Running..." -time ./cll1-print2 > /dev/null +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./print2.pl > /dev/null +echo cat printf2.c -echo "Compiling..." -time gcc -O2 printf2.c -o printf2 -echo "Running..." -time ./printf2 > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" gcc -O2 printf2.c -o printf2 +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./printf2 > /dev/null +echo + +cat cll1-print2.c +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" gcc -O2 cll1-print2.c -o cll1-print2 +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./cll1-print2 > /dev/null +echo cat fputs2.c -echo "Compiling..." -time gcc -O2 fputs2.c -o fputs2 -echo "Running..." -time ./fputs2 > /dev/null +echo -n "Compiling..." +time -f "%E total, %U user, %S sys, %t KB average size" gcc -O2 fputs2.c -o fputs2 +echo -n "Running..." +time -f "%E total, %U user, %S sys, %t KB average size" ./fputs2 > /dev/null +echo diff --git a/demos/performance/test-results b/demos/performance/test-results index de52fd9..8415d1e 100644 --- a/demos/performance/test-results +++ b/demos/performance/test-results @@ -1,25 +1,22 @@ #!/usr/bin/ruby 10000000.times { print "stuff","\n" } -Running... -14.40user 1.62system 0:16.46elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+456minor)pagefaults 0swaps +Running...0:16.51 total, 14.79 user, 1.51 sys, 0 KB average size + #!/usr/bin/python for i in range(1,10000000): print "stuff" -Running... -8.24user 0.16system 0:08.40elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+39997minor)pagefaults 0swaps +Running...0:09.04 total, 8.58 user, 0.20 sys, 0 KB average size + #!/usr/bin/python for i in xrange(1,10000000): print "stuff" -Running... -7.94user 0.00system 0:08.09elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+701minor)pagefaults 0swaps +Running...0:08.22 total, 8.15 user, 0.00 sys, 0 KB average size + #!/usr/bin/php5 -q -Running... -4.80user 2.08system 0:07.08elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+1282minor)pagefaults 0swaps +Running...0:07.13 total, 5.00 user, 2.10 sys, 0 KB average size + #!/usr/bin/perl my $i=0; @@ -38,9 +34,8 @@ for ($i=0;$i<10000000;$i++) print ("stuff"); } -Running... -2.46user 0.00system 0:02.47elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+424minor)pagefaults 0swaps +Running...0:02.52 total, 2.50 user, 0.00 sys, 0 KB average size + #include #define RUNS 10000000UL @@ -52,12 +47,9 @@ int main() } return 0; } -Compiling... -0.31user 0.04system 0:00.37elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+8691minor)pagefaults 0swaps -Running... -1.02user 0.00system 0:01.03elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+238minor)pagefaults 0swaps +Compiling...0:00.37 total, 0.32 user, 0.04 sys, 0 KB average size +Running...0:01.00 total, 1.00 user, 0.00 sys, 0 KB average size + #include "cll1.h" program @@ -65,12 +57,9 @@ program repeat(10000000) print("stuff"); } -Compiling... -0.07user 0.01system 0:00.09elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+4001minor)pagefaults 0swaps -Running... -0.88user 0.00system 0:00.90elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+131minor)pagefaults 0swaps +Compiling...0:00.09 total, 0.07 user, 0.02 sys, 0 KB average size +Running...0:00.88 total, 0.88 user, 0.00 sys, 0 KB average size + #include #define RUNS 10000000UL @@ -82,12 +71,9 @@ printf("stuff\n"); } return 0; } -Compiling... -0.05user 0.00system 0:00.06elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3781minor)pagefaults 0swaps -Running... -0.61user 0.00system 0:00.61elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+114minor)pagefaults 0swaps +Compiling...0:00.05 total, 0.04 user, 0.00 sys, 0 KB average size +Running...0:00.67 total, 0.65 user, 0.02 sys, 0 KB average size + #include #define RUNS 10000000UL @@ -99,12 +85,9 @@ puts("stuff"); } return 0; } -Compiling... -0.05user 0.00system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3777minor)pagefaults 0swaps -Running... -0.62user 0.00system 0:00.65elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+115minor)pagefaults 0swaps +Compiling...0:00.09 total, 0.06 user, 0.02 sys, 0 KB average size +Running...0:00.62 total, 0.62 user, 0.00 sys, 0 KB average size + #include #define RUNS 10000000UL @@ -116,9 +99,5 @@ fputs("stuff\n",stdout); } return 0; } -Compiling... -0.04user 0.01system 0:00.05elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3785minor)pagefaults 0swaps -Running... -0.57user 0.00system 0:00.57elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+115minor)pagefaults 0swaps +Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 KB average size +Running...0:00.55 total, 0.55 user, 0.00 sys, 0 KB average size diff --git a/demos/performance/test-results2 b/demos/performance/test-results2 index f047a22..e087605 100644 --- a/demos/performance/test-results2 +++ b/demos/performance/test-results2 @@ -1,25 +1,22 @@ #!/usr/bin/ruby 10000000.times { print "stuff1"," ","stuff2","\n" } -Running... -23.56user 1.60system 0:25.50elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+457minor)pagefaults 0swaps +Running...0:24.98 total, 23.33 user, 1.54 sys, 0 KB average size + #!/usr/bin/python for i in range(1,10000000): print "stuff1","stuff2" -Running... -13.38user 0.20system 0:13.60elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+39997minor)pagefaults 0swaps +Running...0:13.82 total, 13.59 user, 0.19 sys, 0 KB average size + #!/usr/bin/python for i in xrange(1,10000000): print "stuff1","stuff2" -Running... -12.78user 0.00system 0:12.81elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+700minor)pagefaults 0swaps +Running...0:13.24 total, 13.22 user, 0.00 sys, 0 KB average size + #!/usr/bin/php5 -q -Running... -9.90user 2.00system 0:11.93elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+1282minor)pagefaults 0swaps +Running...0:11.87 total, 9.74 user, 2.06 sys, 0 KB average size + #include #define RUNS 10000000UL @@ -41,12 +37,9 @@ int main() } return 0; } -Compiling... -0.32user 0.04system 0:00.37elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+8700minor)pagefaults 0swaps -Running... -6.15user 1.99system 0:08.15elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+241minor)pagefaults 0swaps +Compiling...0:00.37 total, 0.34 user, 0.03 sys, 0 KB average size +Running...0:08.07 total, 6.14 user, 1.92 sys, 0 KB average size + #!/usr/bin/perl my $i=0; @@ -54,22 +47,8 @@ for ($i=0;$i<10000000;$i++) { print ("stuff1"," ","stuff2","\n"); } -Running... -5.56user 0.02system 0:05.60elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+425minor)pagefaults 0swaps -#include "cll1.h" +Running...0:05.66 total, 5.64 user, 0.01 sys, 0 KB average size -program -{ - repeat(10000000) - print("stuff1","stuff2"); -} -Compiling... -0.08user 0.00system 0:00.09elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3999minor)pagefaults 0swaps -Running... -1.90user 0.02system 0:01.94elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+131minor)pagefaults 0swaps #include #define RUNS 10000000UL @@ -81,12 +60,19 @@ int main (void) } return 0; } -Compiling... -0.03user 0.02system 0:00.06elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3781minor)pagefaults 0swaps -Running... -2.85user 0.01system 0:02.87elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+122minor)pagefaults 0swaps +Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 KB average size +Running...0:02.85 total, 2.84 user, 0.00 sys, 0 KB average size + +#include "cll1.h" + +program +{ + repeat(10000000) + print("stuff1","stuff2"); +} +Compiling...0:00.10 total, 0.07 user, 0.02 sys, 0 KB average size +Running...0:01.92 total, 1.92 user, 0.00 sys, 0 KB average size + #include #define RUNS 10000000UL @@ -101,9 +87,6 @@ int main (void) } return 0; } -Compiling... -0.05user 0.00system 0:00.05elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3787minor)pagefaults 0swaps -Running... -1.53user 0.00system 0:01.53elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+116minor)pagefaults 0swaps +Compiling...0:00.08 total, 0.04 user, 0.02 sys, 0 KB average size +Running...0:01.53 total, 1.50 user, 0.00 sys, 0 KB average size +