From: xchaos Date: Tue, 22 Jan 2008 13:02:01 +0000 (+0000) Subject: updated: performance tests compiled with -O4 (even better results for C<<1 !) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=cc0de701b6a1dd6d8c01352888c1be54676cd8e2;p=svn%2FCll1h%2F.git updated: performance tests compiled with -O4 (even better results for C<<1 !) git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@27 4bb87942-c103-4e5a-b51c-0ebff58f8515 --- diff --git a/demos/performance/test-performance.sh b/demos/performance/test-performance.sh index 9bc731b..45b5675 100755 --- a/demos/performance/test-performance.sh +++ b/demos/performance/test-performance.sh @@ -6,7 +6,7 @@ time ./print.py > /dev/null cat cout.cpp echo "Compiling..." -time make cout +time g++ -O4 cout.cpp -o cout echo "Running..." time ./cout > /dev/null @@ -16,24 +16,24 @@ time ./print.pl > /dev/null cat cll1-print.c echo "Compiling..." -time make cll1-print +time gcc -O4 cll1-print.c -o cll1-print echo "Running..." time ./cll1-print > /dev/null cat printf.c echo "Compiling..." -time make printf +time gcc -O4 printf.c -o printf echo "Running..." time ./printf > /dev/null cat puts.c echo "Compiling..." -time make puts +time gcc -O4 puts.c -o puts echo "Running..." time ./puts > /dev/null cat fputs.c echo "Compiling..." -time make fputs +time gcc -O4 fputs.c -o fputs echo "Running..." time ./fputs > /dev/null diff --git a/demos/performance/test-performance2.sh b/demos/performance/test-performance2.sh index d354826..50f2eef 100755 --- a/demos/performance/test-performance2.sh +++ b/demos/performance/test-performance2.sh @@ -6,7 +6,7 @@ time ./print2.py > /dev/null cat cout2.cpp echo "Compiling..." -time make cout2 +time g++ -O4 cout2.cpp -o cout2 echo "Running..." time ./cout2 > /dev/null @@ -16,18 +16,18 @@ time ./print2.pl > /dev/null cat cll1-print2.c echo "Compiling..." -time make cll1-print2 +time gcc -O4 cll1-print2.c -o cll1-print2 echo "Running..." time ./cll1-print2 > /dev/null cat printf2.c echo "Compiling..." -time make printf2 +time gcc -O4 printf2.c -o printf2 echo "Running..." time ./printf2 > /dev/null cat fputs2.c echo "Compiling..." -time make fputs2 +time gcc -O4 fputs2.c -o fputs2 echo "Running..." time ./fputs2 > /dev/null diff --git a/demos/performance/test-results b/demos/performance/test-results index 25b6808..192a927 100644 --- a/demos/performance/test-results +++ b/demos/performance/test-results @@ -4,8 +4,8 @@ for i in range(1,10000000): print "stuff" Running... -8.28user 0.16system 0:08.44elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+39996minor)pagefaults 0swaps +8.45user 0.16system 0:08.67elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+39997minor)pagefaults 0swaps #include #define RUNS 10000000UL @@ -18,11 +18,10 @@ int main() return 0; } Compiling... -g++ cout.cpp -o cout -0.32user 0.04system 0:00.36elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+8623minor)pagefaults 0swaps +0.32user 0.06system 0:00.47elapsed 81%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (7major+8814minor)pagefaults 0swaps Running... -3.78user 2.08system 0:05.86elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +3.54user 2.18system 0:05.73elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+241minor)pagefaults 0swaps #!/usr/bin/perl @@ -33,8 +32,8 @@ for ($i=0;$i<10000000;$i++) } Running... -2.50user 0.00system 0:02.50elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+424minor)pagefaults 0swaps +2.51user 0.01system 0:02.52elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+425minor)pagefaults 0swaps #include "cll1.h" program @@ -43,11 +42,10 @@ program print("stuff"); } Compiling... -cc cll1-print.c -o cll1-print -0.06user 0.01system 0:00.07elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3905minor)pagefaults 0swaps +0.12user 0.01system 0:00.30elapsed 42%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (17major+3993minor)pagefaults 0swaps Running... -0.99user 0.00system 0:00.99elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0.87user 0.00system 0:00.87elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+130minor)pagefaults 0swaps #include @@ -61,12 +59,11 @@ printf("stuff\n"); return 0; } Compiling... -make: `printf' is up to date. -0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+316minor)pagefaults 0swaps +0.03user 0.02system 0:00.05elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+3783minor)pagefaults 0swaps Running... -0.63user 0.00system 0:00.63elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+114minor)pagefaults 0swaps +0.62user 0.00system 0:00.63elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+115minor)pagefaults 0swaps #include #define RUNS 10000000UL @@ -79,11 +76,10 @@ puts("stuff"); return 0; } Compiling... -cc puts.c -o puts -0.04user 0.01system 0:00.06elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3733minor)pagefaults 0swaps +0.05user 0.00system 0:00.05elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+3780minor)pagefaults 0swaps Running... -0.60user 0.01system 0:00.62elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0.62user 0.00system 0:00.63elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+114minor)pagefaults 0swaps #include @@ -97,9 +93,8 @@ fputs("stuff\n",stdout); return 0; } Compiling... -cc fputs.c -o fputs 0.04user 0.01system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3735minor)pagefaults 0swaps +0inputs+0outputs (0major+3787minor)pagefaults 0swaps Running... -0.58user 0.00system 0:00.58elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+115minor)pagefaults 0swaps +0.54user 0.00system 0:00.53elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+114minor)pagefaults 0swaps diff --git a/demos/performance/test-results2 b/demos/performance/test-results2 index ada5f26..5e4bd74 100644 --- a/demos/performance/test-results2 +++ b/demos/performance/test-results2 @@ -4,8 +4,8 @@ for i in range(1,10000000): print "stuff1","stuff2" Running... -13.29user 0.16system 0:13.47elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+39998minor)pagefaults 0swaps +13.25user 0.17system 0:13.42elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+39997minor)pagefaults 0swaps #include #define RUNS 10000000UL @@ -18,11 +18,10 @@ int main() return 0; } Compiling... -g++ cout2.cpp -o cout2 -0.34user 0.02system 0:00.37elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+8627minor)pagefaults 0swaps +0.35user 0.02system 0:00.37elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+8824minor)pagefaults 0swaps Running... -6.49user 1.96system 0:08.45elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +7.43user 2.18system 0:09.63elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+241minor)pagefaults 0swaps #!/usr/bin/perl @@ -32,7 +31,7 @@ for ($i=0;$i<10000000;$i++) print ("stuff1"," ","stuff2","\n"); } Running... -5.64user 0.00system 0:05.64elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +5.54user 0.00system 0:05.55elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+425minor)pagefaults 0swaps #include "cll1.h" @@ -42,11 +41,10 @@ program print("stuff1","stuff2"); } Compiling... -cc cll1-print2.c -o cll1-print2 -0.07user 0.00system 0:00.07elapsed 102%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3905minor)pagefaults 0swaps +0.09user 0.00system 0:00.09elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+4012minor)pagefaults 0swaps Running... -1.98user 0.00system 0:01.99elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +1.69user 0.01system 0:01.70elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+130minor)pagefaults 0swaps #include @@ -60,12 +58,11 @@ int main (void) return 0; } Compiling... -cc printf2.c -o printf2 -0.04user 0.01system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3738minor)pagefaults 0swaps +0.04user 0.00system 0:00.05elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+3782minor)pagefaults 0swaps Running... -2.80user 0.00system 0:02.93elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+121minor)pagefaults 0swaps +2.94user 0.01system 0:02.95elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+123minor)pagefaults 0swaps #include #define RUNS 10000000UL @@ -81,9 +78,8 @@ int main (void) return 0; } Compiling... -cc fputs2.c -o fputs2 -0.05user 0.00system 0:00.06elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3737minor)pagefaults 0swaps +0.04user 0.01system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+3790minor)pagefaults 0swaps Running... -1.58user 0.01system 0:01.59elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+116minor)pagefaults 0swaps +1.54user 0.00system 0:01.54elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+115minor)pagefaults 0swaps