From d8394559dce40ff40b40525aa68087863efe7c1f Mon Sep 17 00:00:00 2001 From: xchaos Date: Tue, 22 Jan 2008 12:20:18 +0000 Subject: [PATCH] performance tests updated with .cpp code git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@26 4bb87942-c103-4e5a-b51c-0ebff58f8515 --- demos/performance/cout.cpp | 11 +++++ demos/performance/cout2.cpp | 11 +++++ .../{test-performance => test-performance.sh} | 6 +++ ...test-performance2 => test-performance2.sh} | 6 +++ demos/performance/test-results | 48 +++++++++++++------ demos/performance/test-results2 | 46 ++++++++++++------ 6 files changed, 99 insertions(+), 29 deletions(-) create mode 100644 demos/performance/cout.cpp create mode 100644 demos/performance/cout2.cpp rename demos/performance/{test-performance => test-performance.sh} (84%) rename demos/performance/{test-performance2 => test-performance2.sh} (82%) diff --git a/demos/performance/cout.cpp b/demos/performance/cout.cpp new file mode 100644 index 0000000..df1f138 --- /dev/null +++ b/demos/performance/cout.cpp @@ -0,0 +1,11 @@ +#include + +#define RUNS 10000000UL +int main() +{ + unsigned long i; + for (i=0;i + +#define RUNS 10000000UL +int main() +{ + unsigned long i; + for (i=0;i /dev/null +cat cout.cpp +echo "Compiling..." +time make cout +echo "Running..." +time ./cout > /dev/null + cat print.pl echo "Running..." time ./print.pl > /dev/null diff --git a/demos/performance/test-performance2 b/demos/performance/test-performance2.sh similarity index 82% rename from demos/performance/test-performance2 rename to demos/performance/test-performance2.sh index 736593d..d354826 100755 --- a/demos/performance/test-performance2 +++ b/demos/performance/test-performance2.sh @@ -4,6 +4,12 @@ cat print2.py echo "Running..." time ./print2.py > /dev/null +cat cout2.cpp +echo "Compiling..." +time make cout2 +echo "Running..." +time ./cout2 > /dev/null + cat print2.pl echo "Running..." time ./print2.pl > /dev/null diff --git a/demos/performance/test-results b/demos/performance/test-results index 271bd45..25b6808 100644 --- a/demos/performance/test-results +++ b/demos/performance/test-results @@ -4,8 +4,26 @@ for i in range(1,10000000): print "stuff" Running... -8.72user 0.20system 0:08.93elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+39997minor)pagefaults 0swaps +8.28user 0.16system 0:08.44elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+39996minor)pagefaults 0swaps +#include + +#define RUNS 10000000UL +int main() +{ + unsigned long i; + for (i=0;i @@ -43,11 +61,11 @@ printf("stuff\n"); return 0; } Compiling... -cc printf.c -o printf -0.04user 0.02system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3736minor)pagefaults 0swaps +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 Running... -0.66user 0.00system 0:00.65elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0.63user 0.00system 0:00.63elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+114minor)pagefaults 0swaps #include @@ -62,11 +80,11 @@ return 0; } Compiling... cc puts.c -o puts -0.04user 0.01system 0:00.05elapsed 105%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3734minor)pagefaults 0swaps +0.04user 0.01system 0:00.06elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+3733minor)pagefaults 0swaps Running... -0.64user 0.00system 0:00.63elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+115minor)pagefaults 0swaps +0.60user 0.01system 0:00.62elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+114minor)pagefaults 0swaps #include #define RUNS 10000000UL @@ -80,8 +98,8 @@ return 0; } Compiling... cc fputs.c -o fputs -0.04user 0.01system 0:00.05elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k +0.04user 0.01system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+3735minor)pagefaults 0swaps Running... -0.56user 0.00system 0:00.56elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +0.58user 0.00system 0:00.58elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+115minor)pagefaults 0swaps diff --git a/demos/performance/test-results2 b/demos/performance/test-results2 index 0acdfe5..ada5f26 100644 --- a/demos/performance/test-results2 +++ b/demos/performance/test-results2 @@ -4,8 +4,26 @@ for i in range(1,10000000): print "stuff1","stuff2" Running... -13.52user 0.17system 0:13.70elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+39996minor)pagefaults 0swaps +13.29user 0.16system 0:13.47elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+39998minor)pagefaults 0swaps +#include + +#define RUNS 10000000UL +int main() +{ + unsigned long i; + for (i=0;i #define RUNS 10000000UL @@ -44,9 +62,9 @@ int main (void) Compiling... cc printf2.c -o printf2 0.04user 0.01system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3736minor)pagefaults 0swaps +0inputs+0outputs (0major+3738minor)pagefaults 0swaps Running... -2.93user 0.00system 0:02.93elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k +2.80user 0.00system 0:02.93elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+121minor)pagefaults 0swaps #include @@ -64,8 +82,8 @@ int main (void) } Compiling... cc fputs2.c -o fputs2 -0.06user 0.01system 0:00.08elapsed 102%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+3735minor)pagefaults 0swaps +0.05user 0.00system 0:00.06elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+3737minor)pagefaults 0swaps Running... -1.47user 0.00system 0:01.48elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k -0inputs+0outputs (0major+115minor)pagefaults 0swaps +1.58user 0.01system 0:01.59elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k +0inputs+0outputs (0major+116minor)pagefaults 0swaps -- 2.30.2